Open lenzls opened 3 years ago
What about browsers that don’t understand aria, but do understand alt text?
Good point.
Although, one could argue that if you use aria-hidden
, then obviously your target browser is recent enough to support it.
Also, I don't see another way of hiding an <object>
from the AST.
I don't think that's obvious; aria is designed to gracefully degrade in older browsers.
Hello,
the jsx-a11y/alt-text rule does complain about elements which are out of the accessibility tree.
In my example I'm having an embedded SVG image that is purely for aesthetics and should therefore be ignored by screenreaders and the like.
Even though I've specified
aria-hidden="true"
, I still get a warning about the missing alt-text.Would you agree, that the rule should ignore elements out of the accessibility tree?
If yes, I can supply a pull request.