-
-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Describe the bug
Headless Tree doesn't set aria-expanded attribute correspondingly for expanded/collapsed folder items.
To Reproduce
Simply use any storybook example such as https://headless-tree.lukasbach.com/storybook/react/?path=/story/react-general-example--example.
Expand a tree item and check the attributes.
Expected behavior
According to W3C https://www.w3.org/WAI/ARIA/apg/patterns/treeview/#examples:
Each element with role treeitem that serves as a parent node has aria-expanded set to false when the node is in a closed state and set to true when the node is in an open state. End nodes do not have the aria-expanded attribute because, if they were to have it, they would be incorrectly described to assistive technologies as parent nodes.
Additional context
