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

Clarify mapping of a ‘generic’ element to the accessibility API in ARIA spec #1829

Closed
shunguoy opened this issue Oct 7, 2022 · 8 comments · Fixed by #1949
Closed

Clarify mapping of a ‘generic’ element to the accessibility API in ARIA spec #1829

shunguoy opened this issue Oct 7, 2022 · 8 comments · Fixed by #1949
Assignees
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Milestone

Comments

@shunguoy
Copy link

shunguoy commented Oct 7, 2022

Describe your concern

The ARIA spec (https://www.w3.org/TR/wai-aria-1.2/#generic) describes a ‘generic’ element as a container with no semantic meaning on its own, and it also indicates generic elements are exposed in accessibility APIs to assistive technology. It is understandable if a generic element has a native attribute (such as tabindex=‘0’) or a global aria attribute (e.g., aria-live) so such state or property can be provided to an AT. However, for a generic element (e.g., div) without any native semantic or aria attribute (including one that can exclude the element from the accessibility tree), such as <div> a div </div>, if it maps to the accessibility API, what semantic meaning in the generic element is conveyed to an AT? If not mapped over, the spec should be clear on this.
During our test, we noticed that Chrome displays a ‘generic’ role in the accessibility tree only if the element is in focus (e.g., with tabindex=‘0’) or with an accessible name (title attribute).
Please clarify the mapping of the ‘generic’ role.

Link to the version of the specification or documentation you were looking at at.

https://w3c.github.io/aria/#generic

Link to documentation:

Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?
Yes

@jnurthen
Copy link
Member

@schne324 can you please give your opinion on this

@smhigley
Copy link
Contributor

Also related to #1454, since the mapping of otherwise-generics that get focus or have e.g. aria-live, aria-label, etc. could affect how they are treated inside composite widgets.

@schne324
Copy link
Contributor

I think a div should only be generic if it needs to be in the accessibility tree (focusable, target of aria-owns, etc). Otherwise, a div should have no role (or role=presentation).

It seems a bit weird for ARIA to introduce a role that is sometimes in the accessibility tree but sometimes not. It makes defining things like Owned Child much easier if the spec doesn’t need to special-case generic, because of this weird behavior.

@brennanyoung
Copy link
Contributor

Graphics ARIA and the SVG AAM describe a particularly complicated relationship between SVG/graphic content and implicit generic and presentation roles. I'd hope this could be simplified if generic were more clearly defined.

@scottaohara
Copy link
Member

It seems a bit weird for ARIA to introduce a role that is sometimes in the accessibility tree but sometimes not.

ARIA didn't introduce this behavior.

@pkra
Copy link
Member

pkra commented Jun 28, 2023

@scottaohara could this move to html-aam or can we close it in favor of the discussions there, e.g., w3c/html-aam#454, w3c/html-aam#489.

@pkra pkra added this to the ARIA 1.3 milestone Jun 28, 2023
@scottaohara
Copy link
Member

@pkra, i would submit this is resolved by #1949 -= which resolves html aam 489

@pkra
Copy link
Member

pkra commented Jun 28, 2023

Great! I've edited the top card there to automatically close this one upon merging.

@pkra pkra added the clarification clarifying or correcting language that is either confusing, misleading or under-specified label Jun 28, 2023
pkra pushed a commit that referenced this issue Jul 25, 2023
closes w3c/html-aam#489
closes #1829

reworded the last paragraph of the generic definition to indicate that it can be ignored when not providing information important to the a11y tree, but if it does provide such information, then the generic element should be exposed.
jnurthen pushed a commit that referenced this issue Oct 10, 2023
closes w3c/html-aam#489
closes #1829

reworded the last paragraph of the generic definition to indicate that it can be ignored when not providing information important to the a11y tree, but if it does provide such information, then the generic element should be exposed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants