Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
The Tree component would pass a11y audits out of the box.
What is the current behavior?
Using the current Tree schematic as an example
The DOM includes no elements with role="treeitem"
. This isn't valid.
What are the steps to reproduce?
https://material.angular.io/components/tree/examples
https://beta-angular-material-io.firebaseapp.com/components/tree/examples
What is the use-case or motivation for changing an existing behavior?
https://dequeuniversity.com/rules/axe/2.2/aria-required-children?application=lighthouse
https://www.w3.org/TR/wai-aria/#tree
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 6.0.9, 7.0.0-rc.0
Material: 6.4.7, 7.0.0-rc.0
TypeScript: 2.7.2, 3.1.1
Browsers: Chrome, but assumed to affect all
Is there anything else we should know?
The tree becomes valid and passes the audit as soon as it is expanded to a leaf node which will be a role="treeitem"
.
This issue means that the tree
Schematic will generation code that does not pass an a11y audit by default.