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

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

Closed
scottaohara opened this issue Jan 10, 2022 · 1 comment · Fixed by #3952
Closed

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

scottaohara opened this issue Jan 10, 2022 · 1 comment · Fixed by #3952
Labels
feat New feature or enhancement pr A pr has been created for the issue standards Issues in the ARIA standards objects (lib/standards)
Milestone

Comments

@scottaohara
Copy link
Contributor

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.

@WilcoFiers WilcoFiers added feat New feature or enhancement standards Issues in the ARIA standards objects (lib/standards) labels Jan 11, 2022
@WilcoFiers WilcoFiers added this to the Axe-core 4.5 milestone Jan 11, 2022
@WilcoFiers WilcoFiers modified the milestones: Axe-core 4.5, Axe-core 4.6 May 20, 2022
@straker straker added the pr A pr has been created for the issue label Mar 22, 2023
@padmavemulapati
Copy link

Validated with the latest axe-core develop branch code base,

aria-role now deprecated for role=directory . So as it should fail when role=directory is there now on wards(after 4.6.3 releases). Earlier it was passing.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or enhancement pr A pr has been created for the issue standards Issues in the ARIA standards objects (lib/standards)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants