Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.16] [Search][a11y] Announce success and error events for screen re…
…aders (#203555) (#204429) # Backport This will backport the following commits from `main` to `8.16`: - [[Search][a11y] Announce success and error events for screen readers (#203555)](#203555) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"José Luis González","email":"joseluisgj@gmail.com"},"sourceCommit":{"committedDate":"2024-12-16T15:55:38Z","message":"[Search][a11y] Announce success and error events for screen readers (#203555)\n\n## Summary\r\n\r\nThis PR fixes this issue https://github.com/elastic/kibana/issues/197400\r\nwere the UI didn't announce that the connector was deleted. As we do\r\nwith indices, after deleting a connector or Web Crawler the UI announces\r\nthis action with a Toast component which is announced by screen readers\r\nlike VoiceOver.\r\n\r\nAdded the attributes `aria-live=\"assertive\"` and `role=\"alert\"` to get\r\nscreen readers priority on this UI element to be announced over the rest\r\nof the UI.\r\nReferences: \r\n-\r\nhttps://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live\r\n-\r\nhttps://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alert_role\r\n\r\nThis change affects and fixes all the calls to the `flashSuccessToast`\r\nmethod used when we delete an Index, a connector, a Search Application\r\nand many more.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b45b3ec4-1895-4c50-b926-a523882d8b25\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"a5e25b2d5d218ba0a4c9dc29eec2f21197b0e6e0","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","v9.0.0","Team:Search","backport:all-open"],"title":"[Search][a11y] Announce success and error events for screen readers","number":203555,"url":"https://github.com/elastic/kibana/pull/203555","mergeCommit":{"message":"[Search][a11y] Announce success and error events for screen readers (#203555)\n\n## Summary\r\n\r\nThis PR fixes this issue https://github.com/elastic/kibana/issues/197400\r\nwere the UI didn't announce that the connector was deleted. As we do\r\nwith indices, after deleting a connector or Web Crawler the UI announces\r\nthis action with a Toast component which is announced by screen readers\r\nlike VoiceOver.\r\n\r\nAdded the attributes `aria-live=\"assertive\"` and `role=\"alert\"` to get\r\nscreen readers priority on this UI element to be announced over the rest\r\nof the UI.\r\nReferences: \r\n-\r\nhttps://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live\r\n-\r\nhttps://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alert_role\r\n\r\nThis change affects and fixes all the calls to the `flashSuccessToast`\r\nmethod used when we delete an Index, a connector, a Search Application\r\nand many more.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b45b3ec4-1895-4c50-b926-a523882d8b25\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"a5e25b2d5d218ba0a4c9dc29eec2f21197b0e6e0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203555","number":203555,"mergeCommit":{"message":"[Search][a11y] Announce success and error events for screen readers (#203555)\n\n## Summary\r\n\r\nThis PR fixes this issue https://github.com/elastic/kibana/issues/197400\r\nwere the UI didn't announce that the connector was deleted. As we do\r\nwith indices, after deleting a connector or Web Crawler the UI announces\r\nthis action with a Toast component which is announced by screen readers\r\nlike VoiceOver.\r\n\r\nAdded the attributes `aria-live=\"assertive\"` and `role=\"alert\"` to get\r\nscreen readers priority on this UI element to be announced over the rest\r\nof the UI.\r\nReferences: \r\n-\r\nhttps://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live\r\n-\r\nhttps://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alert_role\r\n\r\nThis change affects and fixes all the calls to the `flashSuccessToast`\r\nmethod used when we delete an Index, a connector, a Search Application\r\nand many more.\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b45b3ec4-1895-4c50-b926-a523882d8b25\r\n\r\n### Checklist\r\n\r\nCheck the PR satisfies following conditions. \r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_note:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"a5e25b2d5d218ba0a4c9dc29eec2f21197b0e6e0"}}]}] BACKPORT--> Co-authored-by: José Luis González <joseluisgj@gmail.com>
- Loading branch information