Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<dl> role should = list #51

Closed
jasonkiss opened this issue Oct 12, 2016 · 4 comments
Closed

<dl> role should = list #51

jasonkiss opened this issue Oct 12, 2016 · 4 comments
Assignees
Milestone

Comments

@jasonkiss
Copy link
Contributor

From @stevefaulkner on May 10, 2016 14:22

suggest changing dl ARIA mapping to list, from 'no corresponding role' http://w3c.github.io/aria/html-aam/html-aam.html#el-dl

Copied from original issue: w3c/aria#371

@jasonkiss
Copy link
Contributor Author

From @AmeliaBR on May 10, 2016 15:44

Sounds logical, given that the mappings are all to list equivalents in the accessibility APIs.

Based on the same argument, <dt> should map to listitem, and there should be some sort of implicit relationship (aria-owns or aria-describedby) to attach the definitions to the corresponding terms. Probably aria-describedby to allow for multiple terms having the same definition.

@jasonkiss
Copy link
Contributor Author

If we map dl to list, then it implies a formal semantic and default API mappings for dl that don't readily account for its greater complexity of the specific mappings that ATK and AX already have for lists of name-value groupings.

ATK has ROLE_DESCRIPTION_LIST, ROLE_DESCRIPTION_TERM, and ROLE_DESCRIPTION_VALUE expressly for name-value groupings. These would seem to be the preferred ATK mappings for dl, dt, and dd, respectively. But they are are not the default mappings for the list role.

And while AX maps dl to the AXList role, it additionally takes an AXDefinitionList subrole in Chrome (as the HTML-AAM currently recommends), while dd gets the AXDefinition subrole. Meanwhile, Safari uses AXList with the AXDescriptionList subrole for dl, and the AXDescription subrole for dd. Safari keeps the AXDefinition subrole for the dfn element. Safari's AX approach is closer to the way that ATK has it, and more in line with how the HTML spec defines dl, dt and dd. In both Chrome and Safari, the dt element is mapped to AXGroup with an AXTerm subrole.

If dl is mapped to list, its children need to be either listitem or group roles. If dt is mapped to listitem, then what of dd? The group role is seemingly inapplicable since the dd will not itself contain listitems. So dd must also map to listitem.

Maybe UAs could produce an explicit structure in the accessibility tree for the implied group containing each name-value grouping, something along the following lines?

<dl role="list">
    <implied role="group">
        <dt role="listitem">
        <dd role="listitem">
    </implied>
    <implied role="group">
        <dt role="listitem">
        <dd role="listitem">
    </implied>
</dl>

Or maybe, to better support lists of name-value groupings (instead of flat lists like ul or ol), ARIA needs a few more roles, like "descriptionlist" and "descriptionvalue" for dl and dd, respectively? And if term can't get redefined to support both dt and dfn, then maybe also "descriptionitem" for dt?

@schne324
Copy link

Maybe UAs could produce an explicit structure in the accessibility tree for the implied group containing each name-value grouping

👍

having several dts for 1 dd is valid too, so the implied grouping could also look like this in certain situations:

<dl role="list">
    <implied role="group">
        <dt role="listitem">
        <dt role="listitem">
        <dt role="listitem">
        <dd role="listitem">
    </implied>
</dl>

@scottaohara
Copy link
Member

closing this issue as ARIA 1.2 will contain new roles for parity with dl, dd, and dt and will be addressed by issue #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants