aria
aria copied to clipboard
Apparent contradiction in handling of 'generic' in parent/child relationships
There appears to be a contradiction in the handling of generic
when dealing with a parent/child relationship:
https://w3c.github.io/aria/#scope
To determine whether an element has a parent with the required role, user agents MUST ignore any elements with the role generic or none.
https://w3c.github.io/aria/#generic
However, unlike elements with role presentation, generic elements are exposed in accessibility APIs
How would a user agent ignore the generic
elements while also being required to expose them? Is the intent that an AT would ignore those generic elements, but a browser would not ignore them when generating the AOM?
To expose an element with the role generic is not the same as to not taking it in account by computing parent/child relationship of non-generic element roles. E.g. the parent of an element with the role "option" has as parent an element with the role "listbox" also when its DOM parent is a
related https://github.com/w3c/aria/pull/1949
To expose an element with the role generic is not the same as to not taking it in account by computing parent/child relationship of non-generic element roles. E.g. the parent of an element with the role "option" has as parent an element with the role "listbox" also when its DOM parent is a element which is DOM child of the element with the role "listbox" so beeing between an accessibility parent and child.
My impression is that the intent of the spec is that for something like:
div role='list'
> div aria-live='polite'
> div role='listitem'
that ARIA 1.3 would like to allow this. But, user agents either include the generic element in the accessibility tree or they don't. The user agent generally isn't the consumer of that information, and therefore isn't determining whether the child has the required role. It would only do that by omitting the generic node.
I think the intent is that consumers of the accessibility tree would ignore the generic node, but the browser is the user agent, not the screen reader.
Just for clarity, Scott's PR above is related to generic, but does not address this particular issue of how user agents MUST ignore generic, but at the same time can't ignore generic to satisfy the spec.
@spectranaut any word on this?
i think @tombrunet's point here is a good one:
I think the intent is that consumers of the accessibility tree would ignore the generic node, but the browser is the user agent, not the screen reader.
seems to me that either this requirement needs to change to tell AT they should ignore a generic if it intervenes between the parent/child roles. Or, the spec needs to update to indicate that UAs must ignore generic elements that do not expose any properties important to accessibility (e.g., global aria attributes, tabindex, which are the common properties which result in UAs exposing these generics) - but if generics are exposed due to these properties, then that might be problematic.
@scottaohara do you know who we can prod to get some attention on this?