w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.13k stars 257 forks source link

Technique H28 should not be sufficient to meet 3.1.4: Abbreviations #3019

Open jialiang opened 1 year ago

jialiang commented 1 year ago

Technique H28:Providing definitions for abbreviations by using the abbr element

Technically the <abbr> tag is used to indicate and define abbreviations. E.g. <abbr title="pound">lb.</abbr>.

But in reality, to quote the WHATWG (https://html.spec.whatwg.org/multipage/dom.html#the-title-attribute):

Relying on the title attribute is currently discouraged as many user agents do not expose the attribute in an accessible manner as required by this specification (e.g., requiring a pointing device such as a mouse to cause a tooltip to appear, which excludes keyboard-only users and touch-only users, such as anyone with a modern phone or tablet).

True enough, in major browsers like Chrome and Firefox, you can't get the text in the title attribute to show up in any way if you're using touch or keyboard.

patrickhlauke commented 5 months ago

I would be in favour of removing this technique, or demoting it from sufficient to advisory, exactly because <abbr> is not keyboard-supported - so following this technique would lead to a 2.1.1 failure.