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

[DOCS]: EuiTable examples updated with unique checkbox labels. #7578

Merged
merged 2 commits into from
Mar 13, 2024
Merged

[DOCS]: EuiTable examples updated with unique checkbox labels. #7578

merged 2 commits into from
Mar 13, 2024

Conversation

1Copenut
Copy link
Contributor

@1Copenut 1Copenut commented Mar 13, 2024

Summary

This PR came about from my investigation into #7542. That issue requested a way to add accessible aria-labels for EuiDataGrid. After confirming we could create unique labels in the data grid, I looked closer at EuiBasicTable to see if a similar mechanism was available.

The selectableMessage() callback accepts a second argument item: User, which was exactly the API I was looking for. Using that second argument, I refactored examples to concatenate accessible labels for the EuiCheckbox columns.

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

  • Browser QA
    • Checked in mobile
    • Checked in dark and light theme
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA

@1Copenut 1Copenut added documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog accessibility - screen reader labels Mar 13, 2024
@1Copenut 1Copenut self-assigned this Mar 13, 2024
@1Copenut 1Copenut marked this pull request as ready for review March 13, 2024 17:29
@1Copenut 1Copenut requested a review from a team as a code owner March 13, 2024 17:29
@cee-chen
Copy link
Contributor

cee-chen commented Mar 13, 2024

I think this PR is totally great, but I just want to make sure I want to understand the outcome of our a11y recommendations as related to the discussions in #7542:

  1. EUI will not be baking in any default selection checkbox screenreader copy into EuiBasicTable/EuiInMemoryTable
  2. If consumers/Kibana have any axe failures around missing checkbox labels, EUI instead directs them to use the selectableMessage API and to write their own screenreader text

Is my understanding correct?

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @1Copenut

@1Copenut
Copy link
Contributor Author

Is my understanding correct?

Yes, your understanding is correct. Per the discussion in Slack, we're in agreement it's best to provide product teams the hooks to create accessible labels for EuiCheckbox columns without being overly prescriptive about what the labels should say.

@1Copenut 1Copenut merged commit 52b41e1 into elastic:main Mar 13, 2024
7 checks passed
@1Copenut 1Copenut deleted the docs/euiBasicTable-checkbox-labels branch March 13, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility - screen reader documentation Issues or PRs that only affect documentation - will not need changelog entries skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants