Skip to content

[9.1] Auto-fix violations of the @elastic/eui/require-aria-label-for-modals ESLint rule (#227623)#229259

Merged
kibanamachine merged 8 commits intoelastic:9.1from
kibanamachine:backport/9.1/pr-227623
Aug 1, 2025
Merged

[9.1] Auto-fix violations of the @elastic/eui/require-aria-label-for-modals ESLint rule (#227623)#229259
kibanamachine merged 8 commits intoelastic:9.1from
kibanamachine:backport/9.1/pr-227623

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

… ESLint rule (elastic#227623)

> [!CAUTION]
> ⚠️ Changes were made by GenAI. Please review carefully.

> [!NOTE]
> Only `EuiConfirmModal` part

## Summary
This PR applies the auto-fix for the newly introduced
`@elastic/eui/require-aria-label-for-modals` Ensures that EUI modal
components `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.

## Changes

- For **function components**:
1. Verify whether `useGeneratedHtmlId` is imported from the
`@elastic/eui` package. If not, add the following import.
2. Inside the render method, define a new constant: `const
confirmModalTitleId = useGeneratedHtmlId();`
- For **class components**:
1. Verify whether `htmlIdGenerator` is imported from the `@elastic/eui`
package. If not, add the following import.
2. Inside the render method, define a new constant: `const
confirmModalTitleId = htmlIdGenerator()('confirmModalTitle');`

In both cases, add the following props to the `EuiConfirmModal`
component:
- `aria-labelledby={confirmModalTitleId}`
- `titleProps={{ id: confirmModalTitleId }}`

## Related
- elastic/eui#8843

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit f0dbc67)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jul 24, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) July 24, 2025 08:42
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation. Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. labels Jul 24, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Aug 1, 2025

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
alerting 93.7KB 93.9KB +142.0B
apm 2.6MB 2.6MB +335.0B
canvas 1.1MB 1.1MB +67.0B
console 194.9KB 195.0KB +67.0B
contentConnectors 470.1KB 470.4KB +297.0B
crossClusterReplication 137.6KB 138.0KB +425.0B
data 51.7KB 51.8KB +134.0B
datasetQuality 421.4KB 421.5KB +67.0B
dataViewFieldEditor 99.6KB 99.7KB +148.0B
dataViewManagement 120.1KB 120.3KB +233.0B
discover 1.1MB 1.1MB +67.0B
enterpriseSearch 1.1MB 1.1MB +634.0B
fleet 2.1MB 2.1MB +1.6KB
graph 370.8KB 370.9KB +87.0B
imageEmbeddable 110.3KB 110.4KB +67.0B
indexLifecycleManagement 162.0KB 162.2KB +153.0B
indexManagement 674.7KB 675.5KB +773.0B
infra 1.0MB 1.0MB +67.0B
lens 1.5MB 1.5MB +205.0B
licenseManagement 32.2KB 32.3KB +99.0B
maps 3.1MB 3.1MB +361.0B
ml 5.4MB 5.4MB +1.2KB
monitoring 631.1KB 631.3KB +172.0B
observability 1.3MB 1.3MB +207.0B
observabilityAIAssistantApp 175.9KB 176.0KB +81.0B
osquery 1.0MB 1.0MB +309.0B
remoteClusters 71.2KB 71.2KB +85.0B
reporting 160.8KB 160.9KB +85.0B
rollup 103.7KB 103.8KB +85.0B
savedObjectsManagement 82.9KB 82.9KB +68.0B
searchAssistant 102.4KB 102.5KB +81.0B
searchIndices 193.5KB 193.5KB +67.0B
searchInferenceEndpoints 93.2KB 93.2KB +68.0B
searchQueryRules 121.2KB 121.4KB +135.0B
searchSynonyms 52.2KB 52.3KB +135.0B
security 502.7KB 503.4KB +743.0B
securitySolution 9.8MB 9.8MB +1.5KB
serverlessSearch 346.7KB 346.9KB +149.0B
slo 988.5KB 988.9KB +402.0B
snapshotRestore 250.2KB 250.5KB +335.0B
spaces 209.1KB 209.3KB +215.0B
streamsApp 583.7KB 583.7KB +67.0B
synthetics 1.0MB 1.0MB +274.0B
transform 624.5KB 625.1KB +631.0B
triggersActionsUi 1.5MB 1.5MB +819.0B
unifiedSearch 339.2KB 339.3KB +140.0B
upgradeAssistant 203.7KB 203.7KB +67.0B
uptime 491.4KB 491.7KB +363.0B
visualizations 373.7KB 373.8KB +87.0B
workchatApp 126.3KB 126.4KB +68.0B
total +14.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataViewFieldEditor 23.1KB 23.2KB +67.0B
elasticAssistant 273.5KB 273.7KB +135.0B
fleet 169.0KB 169.1KB +81.0B
indexLifecycleManagement 26.7KB 26.7KB +85.0B
triggersActionsUi 112.1KB 112.1KB +52.0B
total +420.0B

History

cc @alexwizp

@kibanamachine kibanamachine merged commit 3ae40be into elastic:9.1 Aug 1, 2025
13 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 ci:project-deploy-observability Create an Observability project Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. Team:Fleet Team label for Observability Data Collection Fleet team Team:obs-ux-infra_services - DEPRECATED DEPRECATED - Use Team:obs-presentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants