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

Change Fail test case 2 in ACT rule 46ca7f: Element marked as decorative is not exposed - label is exposed in accessibility tree #295

Open
philljenkins opened this issue Aug 26, 2024 · 2 comments

Comments

@philljenkins
Copy link

In the ACT test case below the ARIA label does go into the accessibility tree in Chrome and FF, so the accessible name is not empty. Although the developer may be confused because alt="" was added in their source code, perhaps thinking or hoping it would mark the img as decorative, but it wasn't, due to the alt attribute being ignored/overridden by the aria attribute because of the accessible name calculation spec for browsers.

Failed Example 2 Open in a new tab
This img element is marked as decorative through its empty alt attribute but has a non-empty aria-labelledby attribute causing it to be included in the accessibility tree with its implicit role of img.

<img src="/test-assets/shared/w3c-logo.png" alt="" aria-labelledby="label" /> 
<span hidden id="label">W3C logo</span>

Perhaps the implementers should report a warning or recommendation notifying the developer of the contradiction.

ACT should clarify why the Failed 2 above is a valid fail test case for ACT ruleID 46ca7f: Element marked as decorative is not exposed - see label (accessible name) results in accessibility tree in browsers

Other references:

IBM Equl Access Accessibility Checker IBMa/equal-access#2013

@philljenkins
Copy link
Author

This clause can be revisited and/or clarified:

Implementation of the Presentational Roles Conflict Resolution differs slightly from one user agent to the other. Hence, some elements might be exposed by one user agent and not by another, and consequently might create accessibility issues only for some users. Nevertheless, triggering the conflict is a bad practice.

@tombrunet
Copy link
Contributor

@WilcoFiers The rule notes that this rule is because that some agents don't resolve the role conflict, but Chrome, Firefox, and Safari all recognize this test case as an image. Do you know what user agent doesn't handle this correctly?

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

No branches or pull requests

4 participants
@philljenkins @tombrunet and others