Skip to content

Conversation

@bhavyarm
Copy link
Contributor

This PR adds a eslint rule which ensures that interactive elements need to have their aria attributes set.

Please note this rule has already been added in Kibana but only for observability. See https://github.com/elastic/kibana/tree/main/packages/kbn-eslint-plugin-eui-a11y. We want to migrate this rule to EUI so it be implemented easily EUI wide.

@bhavyarm bhavyarm requested a review from alexwizp August 21, 2025 13:40
@alexwizp
Copy link
Contributor

please also update packages/eslint-plugin/README.md file

@bhavyarm bhavyarm force-pushed the addingAriaRequiredInteractiveRule branch from e6e3a57 to a4cbdc2 Compare August 29, 2025 16:42
@bhavyarm bhavyarm marked this pull request as ready for review September 2, 2025 13:53
@bhavyarm bhavyarm requested a review from a team as a code owner September 2, 2025 13:53
@bhavyarm bhavyarm changed the title [wip]Adding aria attributes required for interactive elements eslint rule Adding aria attributes required for interactive elements eslint rule Sep 3, 2025
@bhavyarm bhavyarm self-assigned this Sep 3, 2025
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

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

Awesome contribution, thank you, @bhavyarm! 👏🏻 I have a couple of thoughts, I tried using GH suggestions to speed up the review process. Curious what you think!

@bhavyarm bhavyarm force-pushed the addingAriaRequiredInteractiveRule branch from bee33ad to 27a115c Compare September 4, 2025 21:02
@bhavyarm bhavyarm force-pushed the addingAriaRequiredInteractiveRule branch from c0555c6 to e7fa987 Compare September 8, 2025 19:59
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @bhavyarm

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @bhavyarm

@bhavyarm bhavyarm merged commit e2d7f59 into elastic:main Sep 8, 2025
5 checks passed
weronikaolejniczak added a commit to elastic/kibana that referenced this pull request Sep 16, 2025
- `@elastic/eui`: `v106.5.0` ⏩ `v106.6.0`
- `@elastic/eui-theme-borealis`: `v3.3.2` ⏩ `v3.4.0`
- `@elastic/eslint-plugin-eui`: `v2.3.0` ⏩ `v2.4.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

## Package updates

### `@elastic/eui`

#### [`v106.6.0`](https://github.com/elastic/eui/releases/v106.6.0)

**Accessibility**

- Removed focus state styles for `iconOnClick` on `EuiBadge` to improve
color contrast in dark mode
([#9004](elastic/eui#9004))

### `@elastic/eui-theme-borealis`

####
[`v3.4.0`](https://www.npmjs.com/package/@elastic/eui-theme-borealis/v/3.4.0)

- Updated values for component tokens
([#8983](elastic/eui#8983))
  - `dataGridRowStripesBackgroundHover`
  - `dataGridRowStripesBackgroundStripedHover`
  - `dataGridRowStripesBackgroundSelectHover`
  - `dataGridRowStripesBackgroundHover`
  - `dataGridRowStripesBackgroundStripedHover`

### `@elastic/eslint-plugin-eui`

####
[`v2.4.0`](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.4.0)

- Added new `callout-announce-on-mount` rule.
([#9005](elastic/eui#9005))
- Added new `no-unnamed-interactive-element` rule.
([#8973](elastic/eui#8973))
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
- `@elastic/eui`: `v106.5.0` ⏩ `v106.6.0`
- `@elastic/eui-theme-borealis`: `v3.3.2` ⏩ `v3.4.0`
- `@elastic/eslint-plugin-eui`: `v2.3.0` ⏩ `v2.4.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

## Package updates

### `@elastic/eui`

#### [`v106.6.0`](https://github.com/elastic/eui/releases/v106.6.0)

**Accessibility**

- Removed focus state styles for `iconOnClick` on `EuiBadge` to improve
color contrast in dark mode
([elastic#9004](elastic/eui#9004))

### `@elastic/eui-theme-borealis`

####
[`v3.4.0`](https://www.npmjs.com/package/@elastic/eui-theme-borealis/v/3.4.0)

- Updated values for component tokens
([elastic#8983](elastic/eui#8983))
  - `dataGridRowStripesBackgroundHover`
  - `dataGridRowStripesBackgroundStripedHover`
  - `dataGridRowStripesBackgroundSelectHover`
  - `dataGridRowStripesBackgroundHover`
  - `dataGridRowStripesBackgroundStripedHover`

### `@elastic/eslint-plugin-eui`

####
[`v2.4.0`](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.4.0)

- Added new `callout-announce-on-mount` rule.
([elastic#9005](elastic/eui#9005))
- Added new `no-unnamed-interactive-element` rule.
([elastic#8973](elastic/eui#8973))
niros1 pushed a commit to elastic/kibana that referenced this pull request Sep 30, 2025
- `@elastic/eui`: `v106.5.0` ⏩ `v106.6.0`
- `@elastic/eui-theme-borealis`: `v3.3.2` ⏩ `v3.4.0`
- `@elastic/eslint-plugin-eui`: `v2.3.0` ⏩ `v2.4.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

## Package updates

### `@elastic/eui`

#### [`v106.6.0`](https://github.com/elastic/eui/releases/v106.6.0)

**Accessibility**

- Removed focus state styles for `iconOnClick` on `EuiBadge` to improve
color contrast in dark mode
([#9004](elastic/eui#9004))

### `@elastic/eui-theme-borealis`

####
[`v3.4.0`](https://www.npmjs.com/package/@elastic/eui-theme-borealis/v/3.4.0)

- Updated values for component tokens
([#8983](elastic/eui#8983))
  - `dataGridRowStripesBackgroundHover`
  - `dataGridRowStripesBackgroundStripedHover`
  - `dataGridRowStripesBackgroundSelectHover`
  - `dataGridRowStripesBackgroundHover`
  - `dataGridRowStripesBackgroundStripedHover`

### `@elastic/eslint-plugin-eui`

####
[`v2.4.0`](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.4.0)

- Added new `callout-announce-on-mount` rule.
([#9005](elastic/eui#9005))
- Added new `no-unnamed-interactive-element` rule.
([#8973](elastic/eui#8973))
alexwizp added a commit to elastic/kibana that referenced this pull request Oct 10, 2025
)

> [!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/no-unnamed-interactive-element` Ensure that appropriate
aria-attributes are set for `EuiBetaBadge`, `EuiButtonIcon`,
`EuiComboBox`, `EuiSelect`,
`EuiSelectWithWidth`,`EuiSuperSelect`,`EuiPagination`, `EuiTreeView`,
`EuiBreadcrumbs`. Without this rule, screen reader users lose context,
keyboard navigation can be confusing.

## Changes

1. 🎯 Added missing ARIA attributes to elements flagged by
`@elastic/eui/no-unnamed-interactive-element` — accessibility leveled
up!

## Related
- [elastic/eui#8843](elastic/eui#8973)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Pete Harverson <[email protected]>
Co-authored-by: Cristina Amico <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: Paulina Shakirova <[email protected]>
alexwizp added a commit to alexwizp/kibana that referenced this pull request Oct 13, 2025
…tic#237317)

> [!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/no-unnamed-interactive-element` Ensure that appropriate
aria-attributes are set for `EuiBetaBadge`, `EuiButtonIcon`,
`EuiComboBox`, `EuiSelect`,
`EuiSelectWithWidth`,`EuiSuperSelect`,`EuiPagination`, `EuiTreeView`,
`EuiBreadcrumbs`. Without this rule, screen reader users lose context,
keyboard navigation can be confusing.

## Changes

1. 🎯 Added missing ARIA attributes to elements flagged by
`@elastic/eui/no-unnamed-interactive-element` — accessibility leveled
up!

## Related
- [elastic/eui#8843](elastic/eui#8973)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Pete Harverson <[email protected]>
Co-authored-by: Cristina Amico <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: Paulina Shakirova <[email protected]>
(cherry picked from commit b419244)

# Conflicts:
#	x-pack/platform/plugins/shared/ml/public/application/explorer/anomaly_timeline.tsx
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
- `@elastic/eui`: `v106.5.0` ⏩ `v106.6.0`
- `@elastic/eui-theme-borealis`: `v3.3.2` ⏩ `v3.4.0`
- `@elastic/eslint-plugin-eui`: `v2.3.0` ⏩ `v2.4.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

## Package updates

### `@elastic/eui`

#### [`v106.6.0`](https://github.com/elastic/eui/releases/v106.6.0)

**Accessibility**

- Removed focus state styles for `iconOnClick` on `EuiBadge` to improve
color contrast in dark mode
([elastic#9004](elastic/eui#9004))

### `@elastic/eui-theme-borealis`

####
[`v3.4.0`](https://www.npmjs.com/package/@elastic/eui-theme-borealis/v/3.4.0)

- Updated values for component tokens
([elastic#8983](elastic/eui#8983))
  - `dataGridRowStripesBackgroundHover`
  - `dataGridRowStripesBackgroundStripedHover`
  - `dataGridRowStripesBackgroundSelectHover`
  - `dataGridRowStripesBackgroundHover`
  - `dataGridRowStripesBackgroundStripedHover`

### `@elastic/eslint-plugin-eui`

####
[`v2.4.0`](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.4.0)

- Added new `callout-announce-on-mount` rule.
([elastic#9005](elastic/eui#9005))
- Added new `no-unnamed-interactive-element` rule.
([elastic#8973](elastic/eui#8973))
rylnd pushed a commit to rylnd/kibana that referenced this pull request Oct 17, 2025
…tic#237317)

> [!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/no-unnamed-interactive-element` Ensure that appropriate
aria-attributes are set for `EuiBetaBadge`, `EuiButtonIcon`,
`EuiComboBox`, `EuiSelect`,
`EuiSelectWithWidth`,`EuiSuperSelect`,`EuiPagination`, `EuiTreeView`,
`EuiBreadcrumbs`. Without this rule, screen reader users lose context,
keyboard navigation can be confusing.

## Changes

1. 🎯 Added missing ARIA attributes to elements flagged by
`@elastic/eui/no-unnamed-interactive-element` — accessibility leveled
up!

## Related
- [elastic/eui#8843](elastic/eui#8973)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Pete Harverson <[email protected]>
Co-authored-by: Cristina Amico <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: Paulina Shakirova <[email protected]>
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Oct 23, 2025
…tic#237317)

> [!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/no-unnamed-interactive-element` Ensure that appropriate
aria-attributes are set for `EuiBetaBadge`, `EuiButtonIcon`,
`EuiComboBox`, `EuiSelect`,
`EuiSelectWithWidth`,`EuiSuperSelect`,`EuiPagination`, `EuiTreeView`,
`EuiBreadcrumbs`. Without this rule, screen reader users lose context,
keyboard navigation can be confusing.

## Changes

1. 🎯 Added missing ARIA attributes to elements flagged by
`@elastic/eui/no-unnamed-interactive-element` — accessibility leveled
up!

## Related
- [elastic/eui#8843](elastic/eui#8973)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Pete Harverson <[email protected]>
Co-authored-by: Cristina Amico <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: Paulina Shakirova <[email protected]>
NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Oct 27, 2025
…tic#237317)

> [!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/no-unnamed-interactive-element` Ensure that appropriate
aria-attributes are set for `EuiBetaBadge`, `EuiButtonIcon`,
`EuiComboBox`, `EuiSelect`,
`EuiSelectWithWidth`,`EuiSuperSelect`,`EuiPagination`, `EuiTreeView`,
`EuiBreadcrumbs`. Without this rule, screen reader users lose context,
keyboard navigation can be confusing.

## Changes

1. 🎯 Added missing ARIA attributes to elements flagged by
`@elastic/eui/no-unnamed-interactive-element` — accessibility leveled
up!

## Related
- [elastic/eui#8843](elastic/eui#8973)

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Pete Harverson <[email protected]>
Co-authored-by: Cristina Amico <[email protected]>
Co-authored-by: Julia Rechkunova <[email protected]>
Co-authored-by: Paulina Shakirova <[email protected]>
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.

4 participants