lundi 13 avril 2015

Do you need an image 'alt' attribute if you have a descriptive filename with hyphens?

I have written descriptive filenames including hyphens such as src="yellow-apple-half-eaten.jpg".


Do I really need to also write alt="Yellow apple half eaten"?


Also if you are using <figure><figcaption> tags do you really also need <alt="">?


It's a big hassle when I have hundreds of images. Should I go through the trouble of writing a PHP script to replace the hyphens with spaces for example, or is this not neccessary? I'm using HTML5.


Aucun commentaire:

Enregistrer un commentaire