angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.39k stars 6.76k forks source link

docs-bug(cdk/accordion): Accordion example code uses ARIA attributes incorrectly, cannot be operated using keyboard #30041

Open cartr opened 1 week ago

cartr commented 1 week ago

Documentation Feedback

The example code displayed for the CDK accordion component contains some accessibility issues:

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 the aria-expanded and aria-controls attributes. This seems to be how <mat-expansion-panel> works already.

Affected documentation page

https://material.angular.io/cdk/accordion/examples

Sepandard commented 1 hour ago

Hi, everyone. Is anybody working on this issue? I can try to fix it if you don't mind.