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 23a2a8 Image has non-empty accessible name: Pass 6 & 7 test cases do not follow ARIA in HTML spec #218

Closed
philljenkins opened this issue May 23, 2023 · 1 comment

Comments

@philljenkins
Copy link

philljenkins commented May 23, 2023

https://www.w3.org/WAI/standards-guidelines/act/rules/23a2a8/#test-cases

  • Pass Example 6
    <img role="presentation" style="width:72px; height:48px; background-image: url(/test-assets/shared/background.png)" />
  • Pass Example 7
    <img role="none" src="/test-assets/shared/background.png" />

These test cases do not follow the latest spec in ARIA in HTML https://www.w3.org/TR/html-aria/ (see screenshot below)
which says that

  • img without an alt attribute, then No aria-* attributes allowed except aria-hidden="true"
  • role=" presentation is only allowed when alt="" is also provided
  • img without an alt attribute, then No role other than img, so "presentation" or "none" would not be valid in the test cases
  • img with alt="some text" allows many roles, none of which include "presentation" or "none"

So, either the spec needs to change or test cases 6 & 7 need to change.

Background - Equal Access Accessibility Checker

The Checker rules "aria_role_valid" and "img_alt_valid" currently fail both of these test cases with a couple of issue messages each:

  • The image has neither an alt attribute nor an ARIA label or title
  • ARIA roles must be valid for the element to which they are assigned
    • The ARIA role none is not valid for the element <img>
    • The ARIA role presentation is not valid for the element <img> and may be ignored by the browser since the element may be focusable

The help guidance for "aria_role_valid" says:

What to do

ARIA in HTML https://www.w3.org/TR/html-aria/ (see screenshot below)
image

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

2 participants