Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While I like the simplicity of this, I would recommend to keep accessibility in mind: information put into a data attribute will not be accessible to screenreaders, and they would miss any information stored via this method.

It may make sense to append the label information to whatever is being used for the image's ALT attribute.



I use data-label because i don't wanna limit labels just for images. but for the images, it's a good idea to use ALT attribute. Thanks.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: