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

ACT: Add fail reason to img_alt_null for conflicts in attributes and map to ACT rule 46ca7f #2013

Closed
philljenkins opened this issue Aug 26, 2024 · 1 comment · Fixed by #2011
Assignees
Labels
engine Issues in the accessibility-checker-engine component T63

Comments

@philljenkins
Copy link
Contributor

philljenkins commented Aug 26, 2024

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. However, the developer may be confused because the alt="" was added in their source code, perhaps thinking 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>

However, the Checker should be a new warning or recommendation notifying the developer of the contradiction (this issue). The Checker should add a new fail reason code in the image_alt_null (rule source code).

There is another issue against ACT to clarify/ask why the Failed 2 above is a valid fail test case for ACT ruleID 46ca7f: Element marked as decorative is not exposed - see w3c/wcag-act-rules#295

@shunguoy shunguoy added T63 engine Issues in the accessibility-checker-engine component labels Aug 26, 2024
@shunguoy shunguoy mentioned this issue Aug 26, 2024
6 tasks
@shunguoy shunguoy self-assigned this Aug 26, 2024
@philljenkins philljenkins changed the title Add fail reason to img_alt_null for conflicts in attributes ACT: Add fail reason to img_alt_null for conflicts in attributes and map to ACT rule 46ca7f Aug 27, 2024
@philljenkins philljenkins self-assigned this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issues in the accessibility-checker-engine component T63
Projects
None yet
4 participants
@philljenkins @shunguoy and others