Skip to content

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

Merged
WilcoFiers merged 2 commits intodevelopfrom
ignore-passthrough-objects
Oct 4, 2022
Merged

fix(object-alt): ignore unloaded objects#3680
WilcoFiers merged 2 commits intodevelopfrom
ignore-passthrough-objects

Conversation

@WilcoFiers
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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.

@WilcoFiers WilcoFiers dismissed straker’s stale review September 30, 2022 17:23

Please check again

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
Copy Markdown
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