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

fix(object-alt): ignore unloaded objects #3680

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

WilcoFiers
Copy link
Contributor

@WilcoFiers WilcoFiers commented Sep 27, 2022

Skip objects on the object-alt rule if they either have no data attribute, or if any of their fallback content is visible.

Closes issue: #3656

I was having difficulty getting the ACT tests to pass because the server doesn't correctly map the URLs. I opened a separate PR for that: #3681

Copy link
Contributor

@straker straker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't thing this is the right approach. Before we only failed 1 of the inapplicable examples (the one this pr fixed), but with the change we now fail 3 others. From reading the ACT rule I don't think it requires looking at if a resource loaded or not. The applicability states that it should only be run on object elements that match the following criteria:

  • The object element is included in the accessibility tree; and
  • The object element has no explicit role; and
  • The object element embeds a resource whose MIME type is either image, or audio or video.

If we want to be more conformant, should we look at the 3rd point rather than if content is loaded or not?

></object>
<object
id="violation8"
role="img"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACT Covers this in a different rule. We don't.

<object id="violation2" data="data:text/html,Object%20content">
<div></div>
</object>
<object id="violation3" data="data:text/html,Object%20content">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACT doesn't cover this, but this is still an issue.

const vNode = await delayedQueryFixture(
`<object data="invalid" height="30" id="target"></object>`
);
// Ideally, this should be false, don't know it can be done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very helpful comment, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants