-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<object> accessiblity audit does not consider alt attribute #11649
Comments
I made a note for us to double check this is fixed when we update, if it's not we'll come back here to reopen and discuss :) |
@patrickhulce Audit still fails for me using latest master on LH 7.0.0 |
Hmm @midzer I can reproduce in latest axe now, but they have added guidance about why. It seems Seems like this is WAI then. If you think it's still not, then an issue with axe would be the appropriate next step. Not sure why I couldn't repro before, sorry! (We probably need to update web.dev docs if this is the case 🤔 ) |
Next steps for LH team: figure out if this is WAI and if it is, update the web.dev docs. |
Just hit the same issue and did some investigating and think that Lighthouse (well axe) is correct to flag this, but documentation could certainly do with flagging this, reasonably common, use-case of using This is fine: <object>
This is visible text
</object> However this is not fine: <object type="image/svg+xml">
This text is not exposed to the accessibility tree
</object> and neither is this: <object data="example.svg">
This text is also not exposed to the accessibility tree
</object> In effect, setting the Therefore the last two examples do need an accessible name (unless it's switched to being presentational with either @midzer it looks like you've updated your object to be <object data="/svg/map.svg" type="image/svg+xml" id="world" alt="World map" aria-hidden="true"></object> However it probably should be this: <object data="/svg/map.svg" type="image/svg+xml" id="world" aria-label="World map"></object> |
Merging this into #6146 |
Provide the steps to reproduce
What is the current behavior?
Accessibility audit
<object> does not have [alt] text
fails, although relevant element has[alt]
text.When using extra info https://web.dev/object-alt/#how-to-add-alternative-text-to-lessobjectgreater-elements and putting the alt text as text content in audit passes as expected.
What is the expected behavior?
Mentioned audit should pass with
[alt]
text.Environment Information
I would have time to help out fixing the issue.
Cheers
midzer
The text was updated successfully, but these errors were encountered: