A new (and easy) way to hide content accessibly
Published on:When I want to hide content accessibly, I always turn to [Jonathan Snook's snippet][1].
.element-invisible {
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
}
But yesterday, I happened to chance upon Scott O'Hara's [article on hiding content][2]. Scott says we only want to hide content in three different contexts:
- Hide it completely
- Hide it visually
- Hide it from screen readers