Skip to content

[9.3] Fix @elastic/eui/require-aria-label-for-modals lint violations across @elastic/kibana-core files (#259757)#260427

Merged
kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine:backport/9.3/pr-259757
Mar 31, 2026
Merged

[9.3] Fix @elastic/eui/require-aria-label-for-modals lint violations across @elastic/kibana-core files (#259757)#260427
kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine:backport/9.3/pr-259757

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

…ss `@elastic/kibana-core` files (elastic#259757)

Closes: elastic#259747

Adds missing `aria-label` / `aria-labelledby` props to 8 EUI modal-type
components (`EuiFlyout`, `EuiModal`, `EuiPopover`) across 6 files to
satisfy the `@elastic/eui/require-aria-label-for-modals` ESLint rule.

### Changes

- **`connection_details_flyout_content.stories.tsx`** — `aria-label`
with i18n on 3 `EuiFlyout` instances
- **`cloud_id_row/label.tsx`** — `aria-label` with i18n on `EuiPopover`
- **`deployment_details_cloudid_input.tsx`** — `aria-label` with i18n on
`EuiPopover`
- **`deployment_details_modal.tsx`** — `aria-labelledby` via
`useGeneratedHtmlId` linking `EuiModal` to its `EuiModalHeaderTitle`
- **`saved_objects_management/.../flyout.tsx`** — `aria-labelledby` via
`htmlIdGenerator` (class component) linking `EuiFlyout` to its `<h2>`
heading
- **`saved_objects_management/.../table.tsx`** — `aria-label` with i18n
on export `EuiPopover`

Where a visible heading exists, `aria-labelledby` is used (preferred).
Where no heading is present, `aria-label` is used. All new strings use
`i18n.translate()`.

```tsx
// aria-labelledby — preferred when a visible title exists
const modalTitleId = useGeneratedHtmlId();
<EuiModal aria-labelledby={modalTitleId}>
  <EuiModalHeaderTitle id={modalTitleId}>Connection details</EuiModalHeaderTitle>
</EuiModal>

// aria-label — when no visible title is available
<EuiPopover aria-label={i18n.translate('...', { defaultMessage: 'Export options' })}>
```

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `ci-stats.kibana.dev`
> - Triggering command:
`/home/REDACTED/.nvm/versions/node/v22.22.0/bin/node
/home/REDACTED/.nvm/versions/node/v22.22.0/bin/node
scripts/yarn_install_scripts.js run ldd 0.8.2
nibrowser-gtk/sys/lib/libjxl.so.0.8` (dns block)
> - Triggering command:
`/home/REDACTED/.nvm/versions/node/v22.22.0/bin/node
/home/REDACTED/.nvm/versions/node/v22.22.0/bin/node scripts/kbn
bootstrap` (dns block)
> - Triggering command:
`/home/REDACTED/.nvm/versions/node/v22.22.0/bin/node node scripts/eslint
src/platform/packages/shared/cloud/connection_details/connection_details_flyout_content.stories.tsx
src/platform/packages/shared/cloud/connection_details/tabs/endpoints_tab/rows/cloud_id_row/label.tsx
src/platform/packages/shared/cloud/deployment_details/deployment_details_cloudid_input.tsx
src/platform/packages/shared/cloud/deployment_details/deployment_details_modal.tsx
src/platform/plugins/shared/saved_objects_management/public/management_section/objects_table/components/flyout.tsx
src/platform/plugins/shared/saved_objects_management/public/management_section/objects_table/components/table.tsx`
(dns block)
> - `clients3.google.com`
> - Triggering command:
`/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
run :extract-version-dependencies :build-webpack 0.8.2
b/libWPEBackend-fdo-1.0.so.1` (dns block)
> - `detectportal.firefox.com`
> - Triggering command:
`/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
run :extract-version-dependencies :build-webpack 0.8.2
b/libWPEBackend-fdo-1.0.so.1` (dns block)
> - `google.com`
> - Triggering command:
`/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
run :extract-version-dependencies :build-webpack 0.8.2
b/libWPEBackend-fdo-1.0.so.1` (dns block)
> - `googlechromelabs.github.io`
> - Triggering command:
`/home/REDACTED/.nvm/versions/node/v22.22.0/bin/node
/home/REDACTED/.nvm/versions/node/v22.22.0/bin/node install.js p/bin/git
ldd b/li��` (dns block)
> - `iojs.org`
> - Triggering command: `/usr/bin/curl curl -q --fail --compressed -L -s
REDACTED -o -` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/elastic/kibana/settings/copilot/coding_agent)
(admins only)
>
> </details>

<!-- START COPILOT CODING AGENT TIPS -->
---

⌨️ Start Copilot coding agent tasks without leaving your editor —
available in [VS Code](https://gh.io/cca-vs-code-docs), [Visual
Studio](https://gh.io/cca-visual-studio-docs), [JetBrains
IDEs](https://gh.io/cca-jetbrains-docs) and
[Eclipse](https://gh.io/cca-eclipse-docs).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexwizp <20072247+alexwizp@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
(cherry picked from commit 27ab7c3)
@kibanamachine kibanamachine merged commit 00cb4ec into elastic:9.3 Mar 31, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants