Hacker News new | ask | show | jobs
by randomguy0 1328 days ago
Because that’s how screen readers know the image is decorative. It literally is/improves accessibility.
1 comments

Additionally, the developer is more likely to actually write alt text when it's not decorative.
Although I must admit, I've also seen such rules leading to developers writing alt text for decorative images, and I'm not sure if that's much better.