Skip to content

Commit

Permalink
Improve button explanation and add info about retaining focus and bei…
Browse files Browse the repository at this point in the history
…ng adjacent to the content
  • Loading branch information
ChrisLabattD2L committed Jan 20, 2025
1 parent e43682d commit 9a9944c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/expand-collapse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ The `d2l-expand-collapse-content` element can be used to create expandable and c
To make your usage of `d2l-expand-collapse-content` accessible, it should follow the [W3C Disclosure (Show/Hide) Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/).

To achieve this, the control that toggles the expanded state should:
- Have the [`button`](https://w3c.github.io/aria/#button) role
- Toggle between states when using the `Enter` and `Space` buttons
- Should use the [`d2l-button`](../button) or use an element with the [`button`](https://w3c.github.io/aria/#button) role
- Toggle between states when using the `Enter` and `Space` buttons and retain focus upon toggle
- Have the [`aria-expanded`](https://www.w3.org/TR/wai-aria/#aria-expanded) attribute, so screen reader users will know what state it's in
- Be adjacent to the expanded/collapsed content

0 comments on commit 9a9944c

Please sign in to comment.