Hacker News new | ask | show | jobs
by lancer383 4778 days ago
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.

1 comments

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.