Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: expando-row accessibility #537

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

ppvg
Copy link
Member

@ppvg ppvg commented May 13, 2024

Warning

This is a breaking change

This PR attempts to address two a11y issues with expando-rows:

  1. The expand button's label incorrectly changes between "open details" and "close details", rather than relying on the aria-expanded state.
    • This PR removes the data-open-label/data-close-label behaviour from expando-row.js. This is a breaking change.
    • The docs now instruct the user to use a button label that uniquely identifies the row (e.g. "lorem ipsum details").
  2. The relationship between the visible and expandable rows is not clear (Expando row a11y #415).
    • This PR tries to address this by instructing the user to use the headers attribute to link the expanded row's table cell to the corresponding row's header and the "details" column header.

Online preview: https://manon-expando-row-preview.netlify.app/components/table-expando-row

Screenreader example (NVDA 2024.1 + FF 125.0.3):

Closes #415
BREAKING CHANGE: Remove the data-open-label and data-close-label attributes from expando-buttons and replace the button label with one that uniquely identifies the contents of the expando-row (e.g. "lorem ipsum details"). Consult the documentation for further accessibility improvements to the epando-rows.

@ppvg ppvg requested a review from a team as a code owner May 13, 2024 12:18
Copy link
Member

@ricklambrechts ricklambrechts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that it is possible to add a specific header for the expando row.

@ppvg ppvg marked this pull request as draft May 17, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expando row a11y
2 participants