You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(material/tree): Apply aria-level to all nodes (#17818)
* fix(material/tree): Apply aria-level to all nodes
Previously, only leaf nodes had aria-level applied.
This is an incremental change since this is an unfamiliar codebase for
me. The main benefit it will have on its own is that it will allow
anyone doing custom dom manipulation to know what level the node is on.
Otherwise by itself there is no change in how NVDA reads nodes with
children. (It currently reads them as literally "grouping"; no
information about the contents is provided).
This change will be necessary for a later change I'm planning, wherein
the role of parent nodes will be changed from "group" to "treeitem", in
accordance with how roles are applied in WAI-ARIA reference examples
such as
https://www.w3.org/TR/wai-aria-practices/examples/treeview/treeview-1/treeview-1b.html
* change aria-level binding to one-based
* change role to treeitem
* always set role to treeitem
* simplify logic for setting role
* add follow up TODO to makr role as deprecated
Co-authored-by: Annie Wang <[email protected]>
(cherry picked from commit aeb6f89)
0 commit comments