-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Stateful: Indices: Overview page] Missing focus on New button after closing or cancelling Generate API key dialog #196174
Comments
Pinging @elastic/kibana-accessibility (Project:Accessibility) |
Similar to issue #195575 |
@L1nBra Actually, that's not entirely accurate. Our current EUI Modal implementation works as follows: after opening the modal, we set the focus on the root dialog element. When pressing the Tab key for the first time, the focus moves to the Close button, and then follows the tab index priority. On the other hand, in the EUI Modal API we have a few ways to change this, but I prefer to be consistent across all modals, and if you see something different from what I described, it should probably be fixed. @cee-chen, please confirm that this is correct behavior. |
Yes, that is correct. It allows keyboard users to predictably/reliably be able to close a modal quickly if needed. |
Adjusted the issue to reflect only the part where the real issue is. |
…fter closing or cancelling Generate API key dialog Closes: elastic#196174
…fter closing or cancelling Generate API key dialog (elastic#196905) Closes: elastic#196174 ## Description Focus should be visible on any accessible element and in order when navigating through the elements. Especially for the users using assistive technology, only keyboard. For the dialogs, after closing them, focus should be visible on the element which opened it. ## What was changed: 1. Cleaned up `generate_api_key_panel.tsx`. No need to open `GenerateApiKeyModal` from this level. Same logic duplicated in `APIGettingStarted` inner component ## Screen https://github.com/user-attachments/assets/46a23fdd-ba54-4798-9cb7-a78e28d447b8 (cherry picked from commit 47a497c)
…tton after closing or cancelling Generate API key dialog (#196905) (#197069) # Backport This will backport the following commits from `main` to `8.x`: - [fix: [Stateful: Indices: Overview page] Missing focus on New button after closing or cancelling Generate API key dialog (#196905)](#196905) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alexey Antonov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-21T13:59:07Z","message":"fix: [Stateful: Indices: Overview page] Missing focus on New button after closing or cancelling Generate API key dialog (#196905)\n\nCloses: #196174\r\n\r\n## Description \r\n\r\nFocus should be visible on any accessible element and in order when\r\nnavigating through the elements. Especially for the users using\r\nassistive technology, only keyboard.\r\nFor the dialogs, after closing them, focus should be visible on the\r\nelement which opened it.\r\n\r\n## What was changed: \r\n1. Cleaned up `generate_api_key_panel.tsx`. No need to open\r\n`GenerateApiKeyModal` from this level. Same logic duplicated in\r\n`APIGettingStarted` inner component\r\n\r\n## Screen\r\n\r\n\r\nhttps://github.com/user-attachments/assets/46a23fdd-ba54-4798-9cb7-a78e28d447b8","sha":"47a497cf3671eee56adeb4787cb4c9271671f5e8","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","v9.0.0","backport:prev-minor"],"title":"fix: [Stateful: Indices: Overview page] Missing focus on New button after closing or cancelling Generate API key dialog","number":196905,"url":"https://github.com/elastic/kibana/pull/196905","mergeCommit":{"message":"fix: [Stateful: Indices: Overview page] Missing focus on New button after closing or cancelling Generate API key dialog (#196905)\n\nCloses: #196174\r\n\r\n## Description \r\n\r\nFocus should be visible on any accessible element and in order when\r\nnavigating through the elements. Especially for the users using\r\nassistive technology, only keyboard.\r\nFor the dialogs, after closing them, focus should be visible on the\r\nelement which opened it.\r\n\r\n## What was changed: \r\n1. Cleaned up `generate_api_key_panel.tsx`. No need to open\r\n`GenerateApiKeyModal` from this level. Same logic duplicated in\r\n`APIGettingStarted` inner component\r\n\r\n## Screen\r\n\r\n\r\nhttps://github.com/user-attachments/assets/46a23fdd-ba54-4798-9cb7-a78e28d447b8","sha":"47a497cf3671eee56adeb4787cb4c9271671f5e8"}},"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/196905","number":196905,"mergeCommit":{"message":"fix: [Stateful: Indices: Overview page] Missing focus on New button after closing or cancelling Generate API key dialog (#196905)\n\nCloses: #196174\r\n\r\n## Description \r\n\r\nFocus should be visible on any accessible element and in order when\r\nnavigating through the elements. Especially for the users using\r\nassistive technology, only keyboard.\r\nFor the dialogs, after closing them, focus should be visible on the\r\nelement which opened it.\r\n\r\n## What was changed: \r\n1. Cleaned up `generate_api_key_panel.tsx`. No need to open\r\n`GenerateApiKeyModal` from this level. Same logic duplicated in\r\n`APIGettingStarted` inner component\r\n\r\n## Screen\r\n\r\n\r\nhttps://github.com/user-attachments/assets/46a23fdd-ba54-4798-9cb7-a78e28d447b8","sha":"47a497cf3671eee56adeb4787cb4c9271671f5e8"}}]}] BACKPORT--> Co-authored-by: Alexey Antonov <[email protected]>
Description
Focus should be visible on any accessible element and in order when navigating through the elements. Especially for the users using assistive technology, only keyboard.
For the dialogs, after closing them, focus should be visible on the element which opened it.
Preconditions
Stateful Indices -> Overview page is opened.
Steps to reproduce
1.Navigate to New button while using only keyboard by pressing Tab key (in Generate an API key section).
2.Press Enter.
3.Navigate to x (close) button.
4.Press Enter.
3.Observe Generate an API key section.
UI elements
Actual Result
Same behavior with Cancel button.
Expected Result
Notes:
After Cancel/Close button when pressing Tab key, focus moves to the first element on the webpage itself.
Meta Issue
Kibana Version: 8.16.0-SNAPSHOT
OS: Windows 11 Pro
Browser: Chrome Version 129.0.6668.101 (Official Build) (64-bit)
WCAG or Vendor Guidance (optional)
Relevant ARIA spec: Dialog (Modal) Pattern Pattern(https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/)
Related to: https://github.com/elastic/search-team/issues/8256
The text was updated successfully, but these errors were encountered: