chrismorgan
today at 3:00 PM
> <dl aria-label="Ability Scores">
This is incorrect:
1. <dl> has no corresponding (viz. implicit) role, but can be given the role group, list, none or presentation <https://w3c.github.io/html-aria/#el-dl>.
2. Youāre only allowed to define aria-label on elements that have a compatible role, implicit or explicit <https://w3c.github.io/html-aria/#docconformance-naming>.
3. aria-label is allowed on all but a handful of roles <https://www.w3.org/TR/wai-aria-1.2/#aria-label>, which in this case knocks out presentation and none, leaving group and list.
4. group doesnāt feel right, list feels acceptable.
In summary: either ditch the aria-label, or add role="list" (meaning also role="listitem" on children).
āāā
One thing the article misses is that you can have multiple <dt> in a row too, not just <dd>. The spec has a good example: https://html.spec.whatwg.org/multipage/grouping-content.html...
Theyāre not nameāvalue pairs, theyāre nameāvalue groups.
redmatter
today at 3:55 PM
Wow I have never noticed that, thanks for the heads up! Out of curiosity, would you put `role="listitem"` on `<div>` elements that wrap the `<dt>` && `<dd>` elements? It looks like `role="listitem"` is allowed on the `<dt>` element, but that doesn't feel like it would be accurate in the case where multiple `<dt>` elements are grouped together, and I'm not sure if that would mess with how the element is interpreted natively as as term.
chrismorgan
today at 4:28 PM
I know the fundamentals of this sort of thing, but I havenāt done much practical with it, so I donāt feel that I can comment on this point.
brewmarche
today at 5:38 PM
Your comment put me on a side quest to research the differences between i.e., e.g., viz. and sc. and I have to admit that Iām still not 100% sure
HappMacDonald
today at 6:39 PM
Concordantly, vis a vis, ergo..
huflungdung
today at 4:22 PM
[dead]