Skip to content

[@elastic/eslint-plugin-eui] added new badge-accessibility-rules rule.#9354

Merged
alexwizp merged 2 commits intoelastic:mainfrom
alexwizp:badge-eslint-rule
Feb 4, 2026
Merged

[@elastic/eslint-plugin-eui] added new badge-accessibility-rules rule.#9354
alexwizp merged 2 commits intoelastic:mainfrom
alexwizp:badge-eslint-rule

Conversation

@alexwizp
Copy link
Copy Markdown
Contributor

@alexwizp alexwizp commented Feb 3, 2026

Related to: elastic/kibana#211173

Summary
Add a new badge-accessibility-rules rule to @elastic/eslint-plugin-eui to enforce accessibility requirements for EuiBadge usage.

Why are we making this change?
For accessibility (a11y) reasons, we need to ensure EuiBadge follows consistent, screen-reader-friendly patterns and avoids common a11y pitfalls. The new badge-accessibility-rules ESLint rule helps catch issues at review time by enforcing best practices directly in code.

Screens

image image

Tests
image

@alexwizp alexwizp changed the title [@elastic/eslint-plugin-eui] added new badge-accessibility-rules rule. [@elastic/eslint-plugin-eui] added new badge-accessibility-rules rule. Feb 3, 2026
@alexwizp alexwizp marked this pull request as ready for review February 3, 2026 17:29
@alexwizp alexwizp requested a review from a team as a code owner February 3, 2026 17:29
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

@weronikaolejniczak weronikaolejniczak self-requested a review February 4, 2026 07:47
Copy link
Copy Markdown
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.

LGTM! 🟢 Thanks, Aliaksei!

@alexwizp alexwizp merged commit d7a00a8 into elastic:main Feb 4, 2026
6 checks passed
mgadewoll added a commit to elastic/kibana that referenced this pull request Feb 10, 2026
## Dependency updates

- `@elastic/eui`: v112.2.0 ⏩ v112.3.0
- `@elastic/eslint-plugin-eui`: v2.7.0 ⏩ v2.8.0

---

## Package updates

### `@elastic/eui`
[v112.3.0](https://github.com/elastic/eui/releases/tag/v112.3.0)

- Added new `server` icon.
([#9355](elastic/eui#9355))
- Added `className` support to `EuiMarkdownEditor`'s `toolbarProps` for
custom toolbar styling
([#9349](elastic/eui#9349))
- Updated `EuiFilePicker` to use the `upload` icon to better indicate
uploads. ([#9351](elastic/eui#9351))
- Exported the flyout system store singleton and added an event observer
for emitting close session events
([#9347](elastic/eui#9347))
- Updated `EuiIcon` to use standard dynamic imports for icon assets,
enabling native support for modern bundlers (Rollup, Parcel) and
improving initial load performance
([#9342](elastic/eui#9342))

**Bug fixes**

- Fixed a potential crash in the flyout system: due to asynchronous
state updates and React's batching behavior, it was possible to
experience a crash when closing a managed flyout.
([#9356](elastic/eui#9356))

### `@elastic/eslint-plugin-eui` v2.8.0

- Added new `icon-accessibility-rules` rule.
([#9357](elastic/eui#9357))
- Added new `badge-accessibility-rules` rule.
([#9354](elastic/eui#9354))
alexwizp added a commit to elastic/kibana that referenced this pull request Feb 18, 2026
…ule in Kibana code. (#251665)

**PR description**
This PR fixes newly reported ESLint violations in Kibana introduced by
the new `@elastic/eslint-plugin-eui` rule
`@elastic/eui/badge-accessibility-rules`. The updates bring affected
badge usages into compliance with the rule’s accessibility requirements,
with no intended functional changes beyond a11y/lint conformance.

**Why**
The violations were surfaced after the rule was added to
`@elastic/eslint-plugin-eui`.

**References**
`@elastic/eui `repo — Add `badge-accessibility-rules` rule:
elastic/eui#9354


Closes:  #211173

---------

Co-authored-by: Pete Harverson <pete@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
alexwizp added a commit to alexwizp/kibana that referenced this pull request Feb 18, 2026
…ule in Kibana code. (elastic#251665)

**PR description**
This PR fixes newly reported ESLint violations in Kibana introduced by
the new `@elastic/eslint-plugin-eui` rule
`@elastic/eui/badge-accessibility-rules`. The updates bring affected
badge usages into compliance with the rule’s accessibility requirements,
with no intended functional changes beyond a11y/lint conformance.

**Why**
The violations were surfaced after the rule was added to
`@elastic/eslint-plugin-eui`.

**References**
`@elastic/eui `repo — Add `badge-accessibility-rules` rule:
elastic/eui#9354

Closes:  elastic#211173

---------

Co-authored-by: Pete Harverson <pete@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 3044fa8)

# Conflicts:
#	x-pack/platform/plugins/shared/streams_app/public/components/stream_detail_significant_events_view/significant_events_table.tsx
alexwizp added a commit to alexwizp/kibana that referenced this pull request Feb 18, 2026
…ule in Kibana code. (elastic#251665)

**PR description**
This PR fixes newly reported ESLint violations in Kibana introduced by
the new `@elastic/eslint-plugin-eui` rule
`@elastic/eui/badge-accessibility-rules`. The updates bring affected
badge usages into compliance with the rule’s accessibility requirements,
with no intended functional changes beyond a11y/lint conformance.

**Why**
The violations were surfaced after the rule was added to
`@elastic/eslint-plugin-eui`.

**References**
`@elastic/eui `repo — Add `badge-accessibility-rules` rule:
elastic/eui#9354

Closes:  elastic#211173

---------

Co-authored-by: Pete Harverson <pete@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 3044fa8)

# Conflicts:
#	x-pack/platform/plugins/shared/streams_app/public/components/stream_detail_significant_events_view/significant_events_table.tsx
alexwizp added a commit to elastic/kibana that referenced this pull request Feb 19, 2026
…les` rule in Kibana code. (#251665) (#253698)

# Backport

This will backport the following commits from `main` to `9.2`:
- [Fixed EsLint violations of `@elastic/eui/badge-accessibility-rules`
rule in Kibana code.
(#251665)](#251665)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"alexwizp@gmail.com"},"sourceCommit":{"committedDate":"2026-02-18T10:08:25Z","message":"Fixed
EsLint violations of `@elastic/eui/badge-accessibility-rules` rule in
Kibana code. (#251665)\n\n**PR description**\nThis PR fixes newly
reported ESLint violations in Kibana introduced by\nthe new
`@elastic/eslint-plugin-eui`
rule\n`@elastic/eui/badge-accessibility-rules`. The updates bring
affected\nbadge usages into compliance with the rule’s accessibility
requirements,\nwith no intended functional changes beyond a11y/lint
conformance.\n\n**Why**\nThe violations were surfaced after the rule was
added to\n`@elastic/eslint-plugin-eui`.\n\n**References**\n`@elastic/eui
`repo — Add `badge-accessibility-rules`
rule:\nhttps://github.com/elastic/eui/pull/9354\n\n\nCloses:
https://github.com/elastic/kibana/issues/211173\n\n---------\n\nCo-authored-by:
Pete Harverson <pete@elastic.co>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3044fa8a1c7d7719151378e0cb3acdd843b0cd7a","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","Team:Fleet","backport:version","v9.4.0","Team:obs-presentation","Team:obs-ux-management","v9.3.1","v9.2.6"],"title":"Fixed
EsLint violations of `@elastic/eui/badge-accessibility-rules` rule in
Kibana
code.","number":251665,"url":"https://github.com/elastic/kibana/pull/251665","mergeCommit":{"message":"Fixed
EsLint violations of `@elastic/eui/badge-accessibility-rules` rule in
Kibana code. (#251665)\n\n**PR description**\nThis PR fixes newly
reported ESLint violations in Kibana introduced by\nthe new
`@elastic/eslint-plugin-eui`
rule\n`@elastic/eui/badge-accessibility-rules`. The updates bring
affected\nbadge usages into compliance with the rule’s accessibility
requirements,\nwith no intended functional changes beyond a11y/lint
conformance.\n\n**Why**\nThe violations were surfaced after the rule was
added to\n`@elastic/eslint-plugin-eui`.\n\n**References**\n`@elastic/eui
`repo — Add `badge-accessibility-rules`
rule:\nhttps://github.com/elastic/eui/pull/9354\n\n\nCloses:
https://github.com/elastic/kibana/issues/211173\n\n---------\n\nCo-authored-by:
Pete Harverson <pete@elastic.co>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3044fa8a1c7d7719151378e0cb3acdd843b0cd7a"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251665","number":251665,"mergeCommit":{"message":"Fixed
EsLint violations of `@elastic/eui/badge-accessibility-rules` rule in
Kibana code. (#251665)\n\n**PR description**\nThis PR fixes newly
reported ESLint violations in Kibana introduced by\nthe new
`@elastic/eslint-plugin-eui`
rule\n`@elastic/eui/badge-accessibility-rules`. The updates bring
affected\nbadge usages into compliance with the rule’s accessibility
requirements,\nwith no intended functional changes beyond a11y/lint
conformance.\n\n**Why**\nThe violations were surfaced after the rule was
added to\n`@elastic/eslint-plugin-eui`.\n\n**References**\n`@elastic/eui
`repo — Add `badge-accessibility-rules`
rule:\nhttps://github.com/elastic/eui/pull/9354\n\n\nCloses:
https://github.com/elastic/kibana/issues/211173\n\n---------\n\nCo-authored-by:
Pete Harverson <pete@elastic.co>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3044fa8a1c7d7719151378e0cb3acdd843b0cd7a"}},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
alexwizp added a commit to elastic/kibana that referenced this pull request Feb 19, 2026
…les` rule in Kibana code. (#251665) (#253696)

# Backport

This will backport the following commits from `main` to `9.3`:
- [Fixed EsLint violations of `@elastic/eui/badge-accessibility-rules`
rule in Kibana code.
(#251665)](#251665)

<!--- Backport version: 10.2.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"alexwizp@gmail.com"},"sourceCommit":{"committedDate":"2026-02-18T10:08:25Z","message":"Fixed
EsLint violations of `@elastic/eui/badge-accessibility-rules` rule in
Kibana code. (#251665)\n\n**PR description**\nThis PR fixes newly
reported ESLint violations in Kibana introduced by\nthe new
`@elastic/eslint-plugin-eui`
rule\n`@elastic/eui/badge-accessibility-rules`. The updates bring
affected\nbadge usages into compliance with the rule’s accessibility
requirements,\nwith no intended functional changes beyond a11y/lint
conformance.\n\n**Why**\nThe violations were surfaced after the rule was
added to\n`@elastic/eslint-plugin-eui`.\n\n**References**\n`@elastic/eui
`repo — Add `badge-accessibility-rules`
rule:\nhttps://github.com/elastic/eui/pull/9354\n\n\nCloses:
https://github.com/elastic/kibana/issues/211173\n\n---------\n\nCo-authored-by:
Pete Harverson <pete@elastic.co>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3044fa8a1c7d7719151378e0cb3acdd843b0cd7a","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","Team:Fleet","backport:version","v9.4.0","Team:obs-presentation","Team:obs-ux-management","v9.3.1","v9.2.6"],"title":"Fixed
EsLint violations of `@elastic/eui/badge-accessibility-rules` rule in
Kibana
code.","number":251665,"url":"https://github.com/elastic/kibana/pull/251665","mergeCommit":{"message":"Fixed
EsLint violations of `@elastic/eui/badge-accessibility-rules` rule in
Kibana code. (#251665)\n\n**PR description**\nThis PR fixes newly
reported ESLint violations in Kibana introduced by\nthe new
`@elastic/eslint-plugin-eui`
rule\n`@elastic/eui/badge-accessibility-rules`. The updates bring
affected\nbadge usages into compliance with the rule’s accessibility
requirements,\nwith no intended functional changes beyond a11y/lint
conformance.\n\n**Why**\nThe violations were surfaced after the rule was
added to\n`@elastic/eslint-plugin-eui`.\n\n**References**\n`@elastic/eui
`repo — Add `badge-accessibility-rules`
rule:\nhttps://github.com/elastic/eui/pull/9354\n\n\nCloses:
https://github.com/elastic/kibana/issues/211173\n\n---------\n\nCo-authored-by:
Pete Harverson <pete@elastic.co>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3044fa8a1c7d7719151378e0cb3acdd843b0cd7a"}},"sourceBranch":"main","suggestedTargetBranches":["9.3","9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/251665","number":251665,"mergeCommit":{"message":"Fixed
EsLint violations of `@elastic/eui/badge-accessibility-rules` rule in
Kibana code. (#251665)\n\n**PR description**\nThis PR fixes newly
reported ESLint violations in Kibana introduced by\nthe new
`@elastic/eslint-plugin-eui`
rule\n`@elastic/eui/badge-accessibility-rules`. The updates bring
affected\nbadge usages into compliance with the rule’s accessibility
requirements,\nwith no intended functional changes beyond a11y/lint
conformance.\n\n**Why**\nThe violations were surfaced after the rule was
added to\n`@elastic/eslint-plugin-eui`.\n\n**References**\n`@elastic/eui
`repo — Add `badge-accessibility-rules`
rule:\nhttps://github.com/elastic/eui/pull/9354\n\n\nCloses:
https://github.com/elastic/kibana/issues/211173\n\n---------\n\nCo-authored-by:
Pete Harverson <pete@elastic.co>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3044fa8a1c7d7719151378e0cb3acdd843b0cd7a"}},{"branch":"9.3","label":"v9.3.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.2","label":"v9.2.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
patrykkopycinski pushed a commit to patrykkopycinski/kibana that referenced this pull request Feb 19, 2026
…ule in Kibana code. (elastic#251665)

**PR description**
This PR fixes newly reported ESLint violations in Kibana introduced by
the new `@elastic/eslint-plugin-eui` rule
`@elastic/eui/badge-accessibility-rules`. The updates bring affected
badge usages into compliance with the rule’s accessibility requirements,
with no intended functional changes beyond a11y/lint conformance.

**Why**
The violations were surfaced after the rule was added to
`@elastic/eslint-plugin-eui`.

**References**
`@elastic/eui `repo — Add `badge-accessibility-rules` rule:
elastic/eui#9354


Closes:  elastic#211173

---------

Co-authored-by: Pete Harverson <pete@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
ersin-erdal pushed a commit to ersin-erdal/kibana that referenced this pull request Feb 19, 2026
…ule in Kibana code. (elastic#251665)

**PR description**
This PR fixes newly reported ESLint violations in Kibana introduced by
the new `@elastic/eslint-plugin-eui` rule
`@elastic/eui/badge-accessibility-rules`. The updates bring affected
badge usages into compliance with the rule’s accessibility requirements,
with no intended functional changes beyond a11y/lint conformance.

**Why**
The violations were surfaced after the rule was added to
`@elastic/eslint-plugin-eui`.

**References**
`@elastic/eui `repo — Add `badge-accessibility-rules` rule:
elastic/eui#9354


Closes:  elastic#211173

---------

Co-authored-by: Pete Harverson <pete@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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