4 ms·
Adding an empty alt tag is often the correct thing yes. Rule of thumb: if someone read the page out to you, would you prefer if they read that alt tag you are
by reitanqild 4y ago
Adding an empty alt tag is often the correct thing yes.
Rule of thumb: if someone read the page out to you, would you prefer if they read that alt tag you are thinking of adding or not?
- Wowfunhappy 4y agoI wish omitting alt text was the equivalent of empty alt text. Nothing else works this way. If a page doesn't have a favicon, you don't add an empty icon href. I know empty alt text is preferred because otherwise, screen readers will usually revert to reading the file name. But I wish screen readers didn't do that.
- perilunar 4y ago> If a page doesn't have a favicon, you don't add an empty icon href. You can though — it prevents a 404 error being logged in the browser console. e.g. <link rel="icon" href="data:,">
- reitanqild 4y agoI always thought it was standardized that way in an effort to get people to care about accessibility. But FWIK it might just be because someone on the standards committee wanted it that way.
- Wowfunhappy 4y agoDoes that work though? If you don't care about accessibility, you can still leave out the tags. Screen readers will then default to reading the file name, which I'd argue is worse than skipping over images in the general case.
- reitanqild 4y agoIt probably worked better when everyone validated their pages and (I think) html quality used to be a ranking factor in Google.