-
Notifications
You must be signed in to change notification settings - Fork 860
feat(eslint-plugin): add new @elastic/eui/require-aria-label-for-modals rule
#8811
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
Merged
alexwizp
merged 5 commits into
elastic:main
from
alexwizp:eslint/require-aria-label-for-modals
Jun 20, 2025
Merged
feat(eslint-plugin): add new @elastic/eui/require-aria-label-for-modals rule
#8811
alexwizp
merged 5 commits into
elastic:main
from
alexwizp:eslint/require-aria-label-for-modals
Jun 20, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
weronikaolejniczak
requested changes
Jun 20, 2025
Contributor
weronikaolejniczak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weronikaolejniczak
approved these changes
Jun 20, 2025
Contributor
weronikaolejniczak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collaborator
💚 Build SucceededHistory
|
Collaborator
💚 Build Succeeded
History
|
weronikaolejniczak
added a commit
to elastic/kibana
that referenced
this pull request
Jul 15, 2025
`@elastic/eslint-plugin-eui`: `2.0.0` ⏩ `2.1.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) ## Changes This PR updates the `@elastic/eslint-plugin-eui` version to latest: [`v2.1.0`](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.1.0) ### `@elastic/eui/require-aria-label-for-modals` (fixed with GenAI: #227623) Ensures that EUI modal components (`EuiModal`, `EuiFlyout`, `EuiConfirmModal`) have either an `aria-label` or `aria-labelledby` prop for accessibility. This helps screen reader users understand the purpose and content of modal dialogs. ### `@elastic/eui/consistent-is-invalid-props` (auto-fix available) Ensures that form control components within `EuiFormRow` components have matching `isInvalid` prop values. This maintains consistent validation state between parent form rows and their child form controls, leading to a more predictable and accessible user experience. ### `@elastic/eui/sr_output_disabled_tooltip` (auto-fix available) Ensures `disableScreenReaderOutput` is set when `EuiToolTip` content matches `EuiButtonIcon`'s `aria-label`. > [!NOTE] > `@elastic/eui/sr_output_disabled_tooltip` will be renamed to `@elastic/eui/sr-output-disabled-tooltip` for consistent rule naming. ## Package updates ### `@elastic/eslint-plugin-eui` - Added new `sr_output_disabled_tooltip` rule. ([#8848](elastic/eui#8848)) - Added new `consistent-is-invalid-props` rule. ([#8843](elastic/eui#8843)) - Added new `require-aria-label-for-modals` rule. ([#8811](elastic/eui#8811))
Bluefinger
pushed a commit
to Bluefinger/kibana
that referenced
this pull request
Jul 22, 2025
`@elastic/eslint-plugin-eui`: `2.0.0` ⏩ `2.1.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) ## Changes This PR updates the `@elastic/eslint-plugin-eui` version to latest: [`v2.1.0`](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.1.0) ### `@elastic/eui/require-aria-label-for-modals` (fixed with GenAI: elastic#227623) Ensures that EUI modal components (`EuiModal`, `EuiFlyout`, `EuiConfirmModal`) have either an `aria-label` or `aria-labelledby` prop for accessibility. This helps screen reader users understand the purpose and content of modal dialogs. ### `@elastic/eui/consistent-is-invalid-props` (auto-fix available) Ensures that form control components within `EuiFormRow` components have matching `isInvalid` prop values. This maintains consistent validation state between parent form rows and their child form controls, leading to a more predictable and accessible user experience. ### `@elastic/eui/sr_output_disabled_tooltip` (auto-fix available) Ensures `disableScreenReaderOutput` is set when `EuiToolTip` content matches `EuiButtonIcon`'s `aria-label`. > [!NOTE] > `@elastic/eui/sr_output_disabled_tooltip` will be renamed to `@elastic/eui/sr-output-disabled-tooltip` for consistent rule naming. ## Package updates ### `@elastic/eslint-plugin-eui` - Added new `sr_output_disabled_tooltip` rule. ([elastic#8848](elastic/eui#8848)) - Added new `consistent-is-invalid-props` rule. ([elastic#8843](elastic/eui#8843)) - Added new `require-aria-label-for-modals` rule. ([elastic#8811](elastic/eui#8811))
kertal
pushed a commit
to kertal/kibana
that referenced
this pull request
Jul 25, 2025
`@elastic/eslint-plugin-eui`: `2.0.0` ⏩ `2.1.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) ## Changes This PR updates the `@elastic/eslint-plugin-eui` version to latest: [`v2.1.0`](https://www.npmjs.com/package/@elastic/eslint-plugin-eui/v/2.1.0) ### `@elastic/eui/require-aria-label-for-modals` (fixed with GenAI: elastic#227623) Ensures that EUI modal components (`EuiModal`, `EuiFlyout`, `EuiConfirmModal`) have either an `aria-label` or `aria-labelledby` prop for accessibility. This helps screen reader users understand the purpose and content of modal dialogs. ### `@elastic/eui/consistent-is-invalid-props` (auto-fix available) Ensures that form control components within `EuiFormRow` components have matching `isInvalid` prop values. This maintains consistent validation state between parent form rows and their child form controls, leading to a more predictable and accessible user experience. ### `@elastic/eui/sr_output_disabled_tooltip` (auto-fix available) Ensures `disableScreenReaderOutput` is set when `EuiToolTip` content matches `EuiButtonIcon`'s `aria-label`. > [!NOTE] > `@elastic/eui/sr_output_disabled_tooltip` will be renamed to `@elastic/eui/sr-output-disabled-tooltip` for consistent rule naming. ## Package updates ### `@elastic/eslint-plugin-eui` - Added new `sr_output_disabled_tooltip` rule. ([elastic#8848](elastic/eui#8848)) - Added new `consistent-is-invalid-props` rule. ([elastic#8843](elastic/eui#8843)) - Added new `require-aria-label-for-modals` rule. ([elastic#8811](elastic/eui#8811))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Summary
This PR introduces the first in a new series of accessibility (a11y) rules for the
EUI ESLintplugin:-
@elastic/eui/require-aria-label-for-modalsThis rule enforces that all EUI modal components—
EuiModal,EuiFlyout, andEuiConfirmModal—include either anaria-labeloraria-labelledbyprop. This ensures modal dialogs are accessible to screen reader users by providing meaningful context about the modal’s purpose and content.Screens:
EuiModal,EuiFlyout:EuiConfirmModal: