Closed philljenkins closed 1 year ago
This issue closes the duplicate at https://github.com/w3c/wcag-act-rules/issues/218
I think HTML in ARIA is stricter than WCAG here. I think that's okay, this isn't good code. Lots of things HTML in ARIA says you shouldn't do don't result in WCAG violations. I think these are important examples to have in this rule, which tests for WCAG conformance issues. It doesn't test HTML in ARIA, but if we ever add such a rule I would think it fails that.
Personally, I think nothing is needed here, but if you want we can certainly add some note or additional description to those examples.
I have mixed feelings about this one…
One one hand, I agree that the rule check WCAG, not ARIA in HTML and that these examples are important to test the limit of the rule (and adding alt=""
to them wouldn't make them as unitary).
On the other hand, we normally try to avoid Passed Examples that go against official specs, and ARIA in HTML being a W3C Recommendation, we should probably respect it 🤔 This feels a bit like <img role="none" aria-label="hello" src="foo.jpg">
which would be OK as far as WCAG 1.1.1 is concerned (because the presentational conflict triggers and the role is ignored). But it goes against ARIA spec by using a prohibited aria-label
attribute. I feel like we would change that example precisely because the attribute is prohibited and then I'm not sure why we'd keep examples going against the ARIA in HTML spec.
I guess we need to discuss that within the group.
we normally try to avoid Passed Examples that go against official specs, and ARIA in HTML being a W3C Recommendation, we should probably respect it 🤔
"we" should include the browsers and AT developers too, not only the ACT working group and rules. If all three resect the "official specification" the web will be more interoperable and predictable and harmonize the checking rules to achieve such for our end users.
I talked to Scott O'Hara about this one. It looks like there's a PR to change this on the ARIA in HTML side: https://github.com/w3c/html-aria/pull/453/files . He said the current spec was due to some issues with HTML validation, but seems the industry has chosen to ignore that.
We will implement a change to the Checker rules as follows:
<img role="presentation">
is allowed.
<img alt="" role="presentation">
is allowed, but not recommended.
<img alt="something" role="presentation">
is not allowed.
Let's close this since ARIA in HTML is going to update.
ACT 23a2a8 Image has non-empty accessible name
https://www.w3.org/WAI/standards-guidelines/act/rules/23a2a8/#test-cases
<img role="presentation" style="width:72px; height:48px; background-image: url(/test-assets/shared/background.png)" />
<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 whenalt=""
is also providedimg
without an alt attribute, then No role other than img, so "presentation" or "none" would not be valid in the test casesimg
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_rolevalid" and "_img_altvalid" currently fail both of these test cases with a couple of issue messages each:
none
is not valid for the element<img>
presentation
is not valid for the element<img>
The help guidance for "_aria_rolevalid" says:
What to do
ARIA in HTML https://www.w3.org/TR/html-aria/ (see screenshot below)![image](https://github.com/w3c/wcag-act-rules/assets/16193609/296082fc-223b-486a-ad61-8766d0a8c90b)