act-rules / act-rules.github.io

Accessibility conformance testing rules for HTML
https://act-rules.github.io/
Other
136 stars 68 forks source link

Visible label is part of accessible name (2ee8b8): should common abrevations be accepted? #1619

Open Jym77 opened 3 years ago

Jym77 commented 3 years ago

The rule currently fails <a href="#" aria-label="123 avenue George Washington">123 ave G. Washington</a> since the text node is not contained in the accessible name. Maybe it should pass?

Even worse-ish, the rule passes <a href="#" aria-label="123 avenue George Washington"><span>123 ave</span> <span>G.</span> <span>Washington</span></a> since now there are 3 text nodes and each of them is included in the accessible name. It does feel wrong to accept the second but reject the first…

Related to #1458 and #1615

WilcoFiers commented 3 years ago

I think your first example would fail the SC, so I think it's reasonable for it to fail the rule too.

As for the second one, I don't think that should pass either. It definitely does, I wonder if we can do something about considering each word in order. Passing "G." Because the letter "G" is part of the accessible name seems a bit odd.

joesaiyang commented 3 years ago

I have a use case were incident reports are given a unique incident number (e.g. INC004). VoiceOver will announce this as "Incorporated" and NVDA will announce this as "Ink". Neither are technically correct as this is an abbreviation for "Incident."

In the following example, when saying "click ink" Voice Control activates the link. However, when saying "click I N C 004" no action is performed. <a href="#">INC004</a>

This example would be clearer for a SR user, but fail label in name. Should it fail though? <a href="#" aria-label="incident 004">INC004</a>

WilcoFiers commented 3 years ago

@joesaiyang Yes I believe that probably should fail the SC.

WilcoFiers commented 2 years ago

Talking to Carlos; we think the rule should be kept the way it is. What would be useful is to update the background to explain that abbreviations should fail, and that texts can be split up, which is to avoid false positives.

kengdoj commented 1 year ago

Other examples to consider:

kengdoj commented 1 year ago

March 9 Task Force discussion/conclusion: expansions of visible label abbreviations in accessible name would fail.