eui icon indicating copy to clipboard operation
eui copied to clipboard

[EuiBasicTable][A11y] Add empty state to table caption

Open mgadewoll opened this issue 2 weeks ago • 2 comments

Summary

This PR updates EuiBasicTable by adding additional context information to the table caption about the empty state of the table. This helps to clarify when a table has no columns, as the semantic information still resolves in available columns (header and empty body row) that have no actual data content.

// before
Data table No users found Page 1 of 2.  table  with 2 rows and 7 columns

// after
Data table (empty), No users found, Page 1 of 2.  table  with 2 rows and 7 columns

Why are we making this change?

:accessibility: Accessibility: Increase informational clarity

Screenshots #

Screenshot 2025-12-10 at 13 40 53

Impact to users

🟢 There are no updates required on consumer side.

QA

  • [ ] Review the added story with a screen reader and confirm that tables with no items will add an additional "(empty)" text after the tableCaption

General checklist

  • Browser QA
    • [ ] Checked in both light and dark modes
    • [ ] Checked in both MacOS and Windows high contrast modes
    • [ ] Checked in mobile
    • [x] Checked in Chrome, Safari, Edge, and Firefox
    • [x] Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • [ ] A changelog entry exists and is marked appropriately
    • [ ] If applicable, added the breaking change issue label (and filled out the breaking change checklist)
    • [ ] If the changes unblock an issue in a different repo, smoke tested carefully (see Testing EUI features in Kibana ahead of time)
  • Designer checklist
    • [ ] If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

mgadewoll avatar Dec 10 '25 12:12 mgadewoll

:green_heart: Build Succeeded

cc @mgadewoll

elasticmachine avatar Dec 10 '25 13:12 elasticmachine

:green_heart: Build Succeeded

cc @mgadewoll

elasticmachine avatar Dec 10 '25 13:12 elasticmachine