Split from - silverstripe/silverstripe-cms#3101
WAI-ARIA Tree View Pattern
The CMS page site tree lacks aria attributes
Context
The site tree in /admin/pages/ had almost no keyboard interactivity even though there were various functions possible with mouse interaction.
The relevant keyboard interaction will have been added through the "related" issues below, but screen readers probably don't give necessary hints to blind users.
Proposed ARIA-attributes
Main Container
- The main container should have
role="tree". This tells screen readers that the element contains a hierarchical structure.
Pages
- Each page item within the tree should have
role="treeitem".
- To indicate nesting levels, use
aria-level (e.g., aria-level="1" for top-level pages, aria-level="2" for their children).
- For pages with nested children, use
aria-expanded="false" when the list is collapsed and aria-expanded="true" when it's open.
Expand/Collapse Arrow
- Icons controlling the expand/collapse action should have a dynamic and descriptive
aria-label, such as "Toggle child pages".
Mouse Drag-and-Drop
Notes
Related
Acceptance criteria
Kitchen-sink CI
PRs
Split from - silverstripe/silverstripe-cms#3101
WAI-ARIA Tree View Pattern
The CMS page site tree lacks aria attributes
Context
The site tree in
/admin/pages/had almost no keyboard interactivity even though there were various functions possible with mouse interaction.The relevant keyboard interaction will have been added through the "related" issues below, but screen readers probably don't give necessary hints to blind users.
Proposed ARIA-attributes
Main Container
role="tree". This tells screen readers that the element contains a hierarchical structure.Pages
role="treeitem".aria-level(e.g.,aria-level="1"for top-level pages,aria-level="2"for their children).aria-expanded="false"when the list is collapsed andaria-expanded="true"when it's open.Expand/Collapse Arrow
aria-label, such as "Toggle child pages".Mouse Drag-and-Drop
The page being dragged should havearia-grabbed="true"while in motion.The invisible drop zones where the page can be inserted should havearia-dropeffect="move".Notes
<ins>elements withtabindex="0"added in ENH Add tabindex to tree icon silverstripe-cms#3116 will need an appropriate role addedRelated
Acceptance criteria
Kitchen-sink CI
^ behat failure is existing
PRs