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

If you have no alt attribute, then screen readers read the URL!

Empty strings are the way to go for decorative images



Alt is a required attribute of the <img> tag, so requiring it is just basic validation. C code won't compile if you omit the semicolon after statements, either.


What if I have an app that no screen reader will ever read?


Then write your own component that extends and removes the requirement. Until then, web tooling is better off explicitly acknowledging that accessibility is an explicit goal.




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

Search: