eslint-plugin-jsx-a11y
eslint-plugin-jsx-a11y copied to clipboard
allowing aria-labelledby in img
The current rules for alt-text
don't allow images with aria-labelledby
to have no alt
. But it seems that the w3 has documentation regarding this technique: https://www.w3.org/WAI/GL/wiki/Using_aria-labelledby_to_provide_a_text_alternative_for_non-text_content
The use case I'm referring to is when I have an image an immediately below it, I have the text for that image, wouldn't that make an screen reader read the same text twice??
Any news regarding this??
@donnanicolas I'm swamped with work-work. If you put up a PR, I'm happy to review!
I'm curious about something similar to this, would <img aria-label="Close" src=.../>
(without alt) be correct?
Today the plugin doesn't like this style.
Likewise for <img title="Close" src=.../>
.
Perhaps I misunderstand the semantics of aria-label/title/alt ?
I'm curious about something similar to this, would
<img aria-label="Close" src=.../>
(without alt) be correct? Today the plugin doesn't like this style. Likewise for<img title="Close" src=.../>
. Perhaps I misunderstand the semantics of aria-label/title/alt ?
@dimaqq you can test the AX Tree output for the variations in Chrome's Accessibility Panel in the DOM Inspector. I think they'll all produce the correct AX Tree output, so functionally they should be equivalent and there's some improvement to be made in this rule's behavior.