Accessible Headers with Graphics

The issue is that a lot of web sites use graphical images for headings. But images don’t use heading tags (H1, H2, etc.) which create the semantic code we all want, which are ideal for screenreaders, SEO, etc.

So the “image replacement” technique uses valid code and CSS to display header images within a heading tag. The challenge is to solve the screen reader problem, and it must also address the “images off, CSS on” problem (ponder that one!), and to reduce the need for empty elements (like SPAN, DIV, etc.).

Download Web Axe Episode 23 (Accessible Headers with Graphics)

[Transcript]

Links:

Sample Code:

Sample CSS:
#header {
position: relative;
width: 750px;
height: 100px;
margin:0;
padding:0;
overflow: hidden;
}
#header span {
position: absolute;
background-image: url(../images/headerback.jpg);
background-repeat: no-repeat;
width: 750px;
height: 100px;
margin:0;
padding:0;
overflow: hidden;
}

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>