0

I am working on web accessibility and it is important to have alternate text when images are not displayed. Problem is that 'a' tag do not have alt attribute, and it is not option to replace all with 'img' (too much buttons, too much work)

<a id="btnID" class="saveButton" data-tabindex="0" aria-disabled="false" role="button" tabindex="0" title="Save search" href="#">
</a>

css is

a.saveButton {
  background: url(../Images/toolbars/saveButton.png) 0px -54px no-repeat;
}

Any ideas? When images are not displayed button is invisible.

Raskolnikov
  • 3,791
  • 9
  • 43
  • 88
  • So you would like to know if the `href` attribute of an `a` tag is valid or not? – Logan Murphy Sep 22 '14 at 12:55
  • well, the problem is that it's really hard to find out if images have loaded correctly through css or not, I find in this case it will be really more easy to make some a tags and inside them put the img tag. – Teo Sep 22 '14 at 12:57
  • take a look at the answers to this question: (possible duplicate of) http://stackoverflow.com/q/4216035/2460773 – Nitsan Baleli Sep 22 '14 at 12:58
  • try this [JSFiddle](http://jsfiddle.net/y2xh0xf6/2/) – Vikram Sep 22 '14 at 13:15
  • @Vikram Smart solution, but problem is that I can't be sure what z-index to set. Button is sometimes in popup, sometimes not. I have 3-4 different z-indexes. It is not straightforward , can't use same css class for all buttons. – Raskolnikov Sep 22 '14 at 13:52

0 Answers0