If I am using a background image in an anchor tag as a menu, what is the best way to provide a text label equivalent for screen readers and SEO?
Assume the HTML is like this:
<h2><a class='menuItem1'></a></h2>
And the CSS is like this
.menuItem1 {
display:block;
width:100px;
height:25px;
background-image:url(../Images.menuitem1.png);
}
Should I use title="..."
as well at alt="..."
on the A
tag? My test using the Lynx browser seems to only show a label if there is text in the A
tag as well.