I'm trying to get a site I'm working on to be WCAG 2 compliant. The site uses image sprites and it would be a challenge to replace the usage of image sprites throughout. As such I'm trying to determine whether the following technique:
<div style="background: url(flower.png); height: 20px; width:20px;">
<div style="text-indent: 100%; white-space: wrap; overflow: hidden">
A red rose
</div>
</div>
Is sufficiently compliant. From reading the documentation... it's unclear.
For a non-decorative img
tag use of alt
is definitely a requirement: H37: Using alt attributes on img elements
And for a media object
s, wrapping content is sufficient: H53: Body of Object
But whether using the body of a a div
that has a non-decorative image background
passes muster isn't very clear.
Can anyone speak to this or point me to the relevant page in the standard?