Skip to content
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-alt rule should ignore objects that don't load things #3656

Closed
WilcoFiers opened this issue Sep 9, 2022 · 1 comment
Closed

Object-alt rule should ignore objects that don't load things #3656

WilcoFiers opened this issue Sep 9, 2022 · 1 comment
Assignees
Labels
ACT Rules fix Bug fixes pr A pr has been created for the issue
Milestone

Comments

@WilcoFiers
Copy link
Contributor

The following is from an ACT inapplicable example, axe shouldn't fail this:

<object data="/invalid/url/index.html">
  <img src="/WAI/content-assets/wcag-act-rules/test-assets/shared/w3c-logo.png" alt="W3C logo" />
</object>

I'm not sure how to directly detect whether an object loaded something, but detecting that its pass-through content is displayed can easily be done by just checking that it's children have a position, for example by calling getClientRects() on them. There are probably other ways to do it too.

To do this we'll probably need a new matches method for objects that can filter out objects which show their content.

@WilcoFiers WilcoFiers added this to the Axe-core 4.5 milestone Sep 9, 2022
@WilcoFiers WilcoFiers self-assigned this Sep 23, 2022
@WilcoFiers WilcoFiers added the pr A pr has been created for the issue label Sep 27, 2022
@padmavemulapati
Copy link

Validated with the latest axe-core develop branch code base,
for the test script:

<object data="/invalid/url/index.html">
  <img src="/WAI/content-assets/wcag-act-rules/test-assets/shared/w3c-logo.png" alt="W3C logo" />
</object>

object-alt rule is appearing in inapplicable , not failing

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACT Rules fix Bug fixes pr A pr has been created for the issue
Projects
None yet
Development

No branches or pull requests

2 participants