Skip to content

[@elastic/eslint-plugin-eui] added new require-table-caption rule. - #9168

Merged
alexwizp merged 6 commits into
elastic:mainfrom
alexwizp:nov-3
Nov 4, 2025
Merged

alexwizp merged 6 commits into
elastic:mainfrom
alexwizp:nov-3

Conversation

@alexwizp

@alexwizp alexwizp commented Nov 3, 2025 •

Copy link
Copy Markdown
Contributor

Summary

Ensure EuiInMemoryTable, EuiBasicTable have a tableCaption property for accessibility.

Why are we making this change?

For accessibility (a11y) reasons, we need to ensure that EuiInMemoryTable,EuiBasicTable include the tableCaption prop:

<EuiBasicTable tableCaption="Descriptive caption for the table" ... />

The tableCaption provides context about the purpose or state of the entire table, helping screen reader users better understand its content. Additionally, this value is used to provide context for the Table -> Pagination component.

Tests

image

@alexwizp alexwizp changed the title [@elastic/eslint-plugin-eui] added new require-table-caption rule. [@elastic/eslint-plugin-eui] added new require-table-caption rule. Nov 3, 2025
@alexwizp
alexwizp marked this pull request as ready for review November 3, 2025 12:37
@alexwizp
alexwizp requested a review from a team as a code owner November 3, 2025 12:37
@weronikaolejniczak
weronikaolejniczak self-requested a review November 3, 2025 15:46
Comment thread packages/eslint-plugin/README.md Resolved

@weronikaolejniczak weronikaolejniczak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks, @alexwizp! I can confirm the tests are passing. Just one nit.

Co-authored-by: Weronika Olejniczak <[email protected]>
Comment thread packages/eslint-plugin/README.md Resolved
Co-authored-by: Weronika Olejniczak <[email protected]>

@weronikaolejniczak weronikaolejniczak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the patience 😅 LGTM now! 🟢

@alexwizp
alexwizp enabled auto-merge (squash) November 4, 2025 12:12
@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@elasticmachine

Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@alexwizp
alexwizp merged commit 4b095d3 into elastic:main Nov 4, 2025
acstll added a commit to elastic/kibana that referenced this pull request Nov 20, 2025
- `@elastic/eui`: `v109.0.0` ⏩ `v109.1.0`
- `@elastic/eslint-plugin-eui`: `v2.5.0` ⏩ `v2.6.0`

---

## Changes

- Updated i18n EUI mapping 6cc95b0
- Updated test in Unified Search
668948f

## Package updates

### `@elastic/eui`
[`v109.1.0`](https://github.com/elastic/eui/releases/v109.1.0)

- Added `--euiBottomBarOffset` CSS variable to `EuiBottomBar` for
positioning other fixed elements relative to the bottom bar's height
([#9211](elastic/eui#9211))
- Updated `boxesVertical` icon and restored `checkInCircleFilled`,
`errorFilled`, and `warningFilled` icons.
([#9194](elastic/eui#9194))
- Updated `EuiSuperDatePicker` with new time zone information, opt-in
via `timeZoneDisplayProps`.
([#9191](elastic/eui#9191))
- Updated the position of `EuiModal` by removing bottom padding in
`EuiOverlayMask` ([#9190](elastic/eui#9190))
- Added `EuiPopover` and `EuiToolTip`'s `repositionOnScroll` to
`componentDefaults` ([#9152](elastic/eui#9152))
- Updated `EuiSuperDatePicker` with new time window buttons for time
shifting and zoom out, opt-in via `showTimeWindowButtons` boolean prop.
([#9151](elastic/eui#9151))
- Added beta prop `hasAriaDisabled` to all base button components:
`EuiButton`, `EuiButtonEmpty`, `EuiButtonIcon`, `EuibuttonGroup`,
`EuiFilterButton` ([#9201](elastic/eui#9201))
- Added `euiDisabledSelector` variable that combines CSS selectors
`:disabled` and `[aria-disabled="true"]`
([#9201](elastic/eui#9201))
- Added custom test matchers that check for both `disabled` and
`aria-disabled` attributes:
([#9201](elastic/eui#9201))
  - React testing Library: `.toBeEuiDisabled()`
  - Enzyme: `.toHaveEuiDisabledProp()`
  - Cypress: `should('be.euiDisabled)`

**Bug fixes**

- Fixed unexpected duplicate columns in `EuiDataGrid` crashing the
column sorting by removing duplicate columns entirely
([#9209](elastic/eui#9209))
- Fixed a visual bug in `EuiTable` where long table row content would be
cut off on mobile screens
([#9206](elastic/eui#9206))
- Fixed virtualized `EuiCodeBlock` rendering blank lines when content
updates if scrolled. ([#9196](elastic/eui#9196))
- Fixed `EuiButtonGroup` button sizing to ensure square buttons when
used with `isIconOnly=true`
([#9170](elastic/eui#9170))

**Accessibility**

- Fixed an issue where portalled components like `EuiPopover` were not
included in `EuiFlyout`'s focus trap through
`includeSelectorInFocusTrap`, making them inaccessible to keyboard users
([#9103](elastic/eui#9103))

### `@elastic/eslint-plugin-eui`
[`v2.6.0`](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2025.md#v260)

- Added new `require-table-caption` rule.
([#9168](elastic/eui#9168))

---------

Co-authored-by: Elastic Machine <[email protected]>
andrimal pushed a commit to andrimal/kibana that referenced this pull request Nov 20, 2025
- `@elastic/eui`: `v109.0.0` ⏩ `v109.1.0`
- `@elastic/eslint-plugin-eui`: `v2.5.0` ⏩ `v2.6.0`

---

## Changes

- Updated i18n EUI mapping 6cc95b0
- Updated test in Unified Search
668948f

## Package updates

### `@elastic/eui`
[`v109.1.0`](https://github.com/elastic/eui/releases/v109.1.0)

- Added `--euiBottomBarOffset` CSS variable to `EuiBottomBar` for
positioning other fixed elements relative to the bottom bar's height
([elastic#9211](elastic/eui#9211))
- Updated `boxesVertical` icon and restored `checkInCircleFilled`,
`errorFilled`, and `warningFilled` icons.
([elastic#9194](elastic/eui#9194))
- Updated `EuiSuperDatePicker` with new time zone information, opt-in
via `timeZoneDisplayProps`.
([elastic#9191](elastic/eui#9191))
- Updated the position of `EuiModal` by removing bottom padding in
`EuiOverlayMask` ([elastic#9190](elastic/eui#9190))
- Added `EuiPopover` and `EuiToolTip`'s `repositionOnScroll` to
`componentDefaults` ([elastic#9152](elastic/eui#9152))
- Updated `EuiSuperDatePicker` with new time window buttons for time
shifting and zoom out, opt-in via `showTimeWindowButtons` boolean prop.
([elastic#9151](elastic/eui#9151))
- Added beta prop `hasAriaDisabled` to all base button components:
`EuiButton`, `EuiButtonEmpty`, `EuiButtonIcon`, `EuibuttonGroup`,
`EuiFilterButton` ([elastic#9201](elastic/eui#9201))
- Added `euiDisabledSelector` variable that combines CSS selectors
`:disabled` and `[aria-disabled="true"]`
([elastic#9201](elastic/eui#9201))
- Added custom test matchers that check for both `disabled` and
`aria-disabled` attributes:
([elastic#9201](elastic/eui#9201))
  - React testing Library: `.toBeEuiDisabled()`
  - Enzyme: `.toHaveEuiDisabledProp()`
  - Cypress: `should('be.euiDisabled)`

**Bug fixes**

- Fixed unexpected duplicate columns in `EuiDataGrid` crashing the
column sorting by removing duplicate columns entirely
([elastic#9209](elastic/eui#9209))
- Fixed a visual bug in `EuiTable` where long table row content would be
cut off on mobile screens
([elastic#9206](elastic/eui#9206))
- Fixed virtualized `EuiCodeBlock` rendering blank lines when content
updates if scrolled. ([elastic#9196](elastic/eui#9196))
- Fixed `EuiButtonGroup` button sizing to ensure square buttons when
used with `isIconOnly=true`
([elastic#9170](elastic/eui#9170))

**Accessibility**

- Fixed an issue where portalled components like `EuiPopover` were not
included in `EuiFlyout`'s focus trap through
`includeSelectorInFocusTrap`, making them inaccessible to keyboard users
([elastic#9103](elastic/eui#9103))

### `@elastic/eslint-plugin-eui`
[`v2.6.0`](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2025.md#v260)

- Added new `require-table-caption` rule.
([elastic#9168](elastic/eui#9168))

---------

Co-authored-by: Elastic Machine <[email protected]>
alexwizp added a commit to elastic/kibana that referenced this pull request Dec 10, 2025
…elastic/kibana-presentation` files (#245661)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!
KodeRad pushed a commit to KodeRad/kibana that referenced this pull request Dec 17, 2025
…@elastic/kibana-core` files (elastic#246014)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Gerard Soldevila <[email protected]>
alexwizp added a commit to elastic/kibana that referenced this pull request Dec 18, 2025
…elastic/security-entity-analytics` files (#246172)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Dec 18, 2025
…@elastic/security-entity-analytics` files (elastic#246172)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 6687a9c)
alexwizp added a commit to elastic/kibana that referenced this pull request Jan 21, 2026
…@elastic/security-threat-hunting` files (#249680)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
alexwizp added a commit to elastic/kibana that referenced this pull request Jan 21, 2026
…elastic/kibana-data-discovery` files (#246176)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
…@elastic/security-threat-hunting` files (elastic#249680)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 55f49cb)
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
…@elastic/security-threat-hunting` files (elastic#249680)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 55f49cb)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 21, 2026
…@elastic/kibana-data-discovery` files (elastic#246176)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

(cherry picked from commit 4d43ef8)
alexwizp added a commit to alexwizp/kibana that referenced this pull request Jan 21, 2026
…@elastic/kibana-data-discovery` files (elastic#246176)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

(cherry picked from commit 4d43ef8)

# Conflicts:
#	src/platform/plugins/shared/data_view_management/public/components/edit_index_pattern/relationships_table/i18n.ts
#	src/platform/plugins/shared/data_view_management/public/components/edit_index_pattern/relationships_table/relationships_table.tsx
#	src/platform/plugins/shared/saved_objects_finder/public/finder/saved_object_finder.tsx
alexwizp added a commit to elastic/kibana that referenced this pull request Jan 22, 2026
…elastic/fleet` files (#250004)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jan 22, 2026
…@elastic/fleet` files (elastic#250004)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit c4e692d)
alexwizp added a commit to alexwizp/kibana that referenced this pull request Jan 23, 2026
…@elastic/fleet` files (elastic#250004)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit c4e692d)

# Conflicts:
#	x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/data_stream/list_page/index.tsx
alexwizp added a commit to elastic/kibana that referenced this pull request Jan 23, 2026
…elastic/ml-ui` files (#249699)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Pete Harverson <[email protected]>
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jan 23, 2026
…@elastic/ml-ui` files (elastic#249699)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Pete Harverson <[email protected]>
(cherry picked from commit 2e91ece)
alexwizp added a commit to alexwizp/kibana that referenced this pull request Jan 23, 2026
…@elastic/ml-ui` files (elastic#249699)

> [!CAUTION]
> ⚠️ **Changes / translations were made by GenAI**. I’ve reviewed them
carefully, but your code owners’ expert eyes will ensure they’re 100%
right.

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-table-caption`.
This rule ensure `EuiInMemoryTable`, `EuiBasicTable` have a
`tableCaption` prop for accessibility.

## Changes

1. 🎯 Added missing `tableCaption` attributes to elements flagged by
`@elastic/eui/require-table-caption` — accessibility leveled up!

## Related
- elastic/eui#9168

This time, to avoid annoying approvals collection, we've broken files
down by teams. Now, we are waiting a review only from your team!

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Pete Harverson <[email protected]>
(cherry picked from commit 2e91ece)

# Conflicts:
#	x-pack/platform/plugins/private/data_visualizer/public/application/file_data_visualizer/new/file_status/docs_preview.tsx
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.

3 participants