docs-bug(cdk/accordion): Accordion example code uses ARIA attributes incorrectly, cannot be operated using keyboard #30041
Labels
area: cdk/accordion
docs
This issue is related to documentation
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Documentation Feedback
The example code displayed for the CDK accordion component contains some accessibility issues:
role="button"
-- so when it's open, the accordion body is considered part of the accordion item's name. (This also makes it invalid to put interactive elements inside the accordion.)The code should probably look more like the WAI-ARIA accordion example, where the header (not the entire accordion item) is a
<button>
that gets thearia-expanded
andaria-controls
attributes. This seems to be how<mat-expansion-panel>
works already.Affected documentation page
https://material.angular.io/cdk/accordion/examples
The text was updated successfully, but these errors were encountered: