| ▲ | chrismorgan 4 hours ago | |||||||||||||
> <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 4 hours ago | parent | next [-] | |||||||||||||
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. | ||||||||||||||
| ||||||||||||||
| ▲ | brewmarche 2 hours ago | parent | prev | next [-] | |||||||||||||
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 | ||||||||||||||
| ||||||||||||||
| ▲ | huflungdung 3 hours ago | parent | prev [-] | |||||||||||||
[dead] | ||||||||||||||