views:

27

answers:

2

I am using a CMS for images which is by default not generating alt attributes in image tags unless the alt text is provided.

I can provide an empty space " " into the alt tag to produce :

<img src="../.." alt=" "/>

Would this be a problem with screen readers, and web accessibility ?

A: 

If you are not using an alt text, you can go without the alt attribute. It won't validate, but it won't change a thing, it will work exactly the same. You are just pleasing the validator.

Using a space shouldn't bring any problems.

voyager
A: 

only problem is the customer wants the site to state that it is XHTML compliant - so we need the pages to validate :(