-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: a11y-SR row count announcement in DataTable with expandable rows #18457
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18457 +/- ##
=======================================
Coverage 84.13% 84.13%
=======================================
Files 408 408
Lines 14460 14460
Branches 4703 4653 -50
=======================================
Hits 12166 12166
- Misses 2128 2129 +1
+ Partials 166 165 -1 ☔ View full report in Codecov by Sentry. |
Adding it to the stories only solves it for the examples, but not for adopters unless they apply the same fixes on their end. Also I think using aria-rowcount would still announce the hidden rows since its purpose is to announce total rows in a table regardless of what is visible? Maybe the best solution is to add the ARIA attributes to the components directly like you mentioned? |
Closes #16813
Screen reader incorrectly counts expandable content as rows. For a table with 1 header row and 6 data rows (total 7 rows), it announces additional rows by including the hidden expandable content.
Quick Question
Current fix uses
aria-labels
in storybook examples, but baking it into the component with a new prop like arowCount
would make it more semantic (uses properaria-rowcount
) and it will be part of component's accessibilityChangelog
New
added
aria-expanded
andaria-hidden
to correctly announce 7 rowsTesting / Reviewing
open deploy preview and visit datatable with expandable row variants and verify correct no of rows and column are announced for the Table