Skip to content

Indicate that role=directory will be deprecated (aria 1.2) #3340

@scottaohara

Description

@scottaohara

ARIA 1.2 is deprecating the directory role, as in reality it had no practical difference between a role=list (core aam maps directory almost identically to list).

ARIA in HTML is being updated to call out that authors should not use this role, and request that conformance checkers warn authors to instead use a HTML list element, or role=list instead.

role=directory test case

The primary objective of this issue is for axe to warn authors about the use of the deprecated role.


The following is additional information / results I came across when testing what axe presently does with the above linked test case.

Presently, axe (4.3.5) reports issues when using directory... which at least presently might steer developers away from using the role. But, technically the issues raised should probably be revised to be more accurate.

"certain aria roles must be contained by particular parents"
this is raised for use of role=listitem with a directory parent. It's actually correct to use role=listitem as a child of directory. The ARIA spec does not specifically call this out, but per the fact that directory and list are essentially the same, this is exactly what authors should be doing if using this deprecated role.

"<li> elements must be contained in a <ul> or <ol>."
I think this is going to be addressed by #3284? But the initial issue desc. should be updated to say "<li> elements must be contained in a <ul>, <ol> or <menu>.

An aside: If authors use role=directory on a ul, for instance, then Chromium suppresses the listitem mapping of the child <li> elements. Which is a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or enhancementprA pr has been created for the issuestandardsIssues in the ARIA standards objects (lib/standards)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions