-
Notifications
You must be signed in to change notification settings - Fork 784
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
Conversation
There was a problem hiding this 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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails inapplicable example 1
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails inapplicable example 6
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very helpful comment, thanks.
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