Shouldn't a11y warn about empty alt attribute on an image? #15867
-
I know it's not described on their website, and I don't think they have a library to enforce their suggestions, but wouldn't it make sense to warn when an alt attribute is assigned to an empty string, or not assigned at all? The rule being that an alt attribute should be present just isn't enough if the idea is to correct accessibility issues. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
No. There are a lot of valid Footnotes |
Beta Was this translation helpful? Give feedback.
No.
There are a lot of valid
<img>
uses that are merely decorative and should not have any text associated with them because it would not provide any value but rather distract 12. A warning for a missing attribute is correct because maybe it was forgotten but an empty value should be considered a conscious choice (and Svelte cannot determine whether that choice is valid in the given context).Footnotes
MDN ↩
WAI ↩