[ObsUX] [A11y] Fix focus on metadata table content#216628
[ObsUX] [A11y] Fix focus on metadata table content#216628MiriamAparicio merged 2 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
| const handleToggle = () => { | ||
| toggle(); | ||
|
|
||
| setTimeout(() => { |
There was a problem hiding this comment.
Q: why is the timeout of 0 needed here?
There was a problem hiding this comment.
I used here to delay the focus shift until after the React state update (toggle()) has fully applied.
But I think it's better to use useEffect here, to have the same result, I will change it
There was a problem hiding this comment.
Now I remember why I used the timeout, I changed to use useEffect() but need to add another state check to avoid the focus to be always set on show more / less on reload.
💚 Build Succeeded
Metrics [docs]Async chunks
|
|
Starting backport for target branches: 8.18, 8.x, 9.0 https://github.com/elastic/kibana/actions/runs/14216164527 |
Closes elastic#195014 ### Summary Host Detail page has a Metadata tab with expandable table rows. These rows add content to the page in an unexpected reading order. Content should be expanded underneath the show more / less trigger. Focus should stay on the toggle. Before https://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c After https://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b (cherry picked from commit 7b1d7bf)
Closes elastic#195014 ### Summary Host Detail page has a Metadata tab with expandable table rows. These rows add content to the page in an unexpected reading order. Content should be expanded underneath the show more / less trigger. Focus should stay on the toggle. Before https://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c After https://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b (cherry picked from commit 7b1d7bf)
Closes elastic#195014 ### Summary Host Detail page has a Metadata tab with expandable table rows. These rows add content to the page in an unexpected reading order. Content should be expanded underneath the show more / less trigger. Focus should stay on the toggle. Before https://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c After https://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b (cherry picked from commit 7b1d7bf)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…216779) # Backport This will backport the following commits from `main` to `9.0`: - [[ObsUX] [A11y] Fix focus on metadata table content (#216628)](#216628) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Miriam","email":"31922082+MiriamAparicio@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-02T09:25:05Z","message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:obs-ux-infra_services","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[ObsUX] [A11y] Fix focus on metadata table content","number":216628,"url":"https://github.com/elastic/kibana/pull/216628","mergeCommit":{"message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216628","number":216628,"mergeCommit":{"message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
…216778) # Backport This will backport the following commits from `main` to `8.x`: - [[ObsUX] [A11y] Fix focus on metadata table content (#216628)](#216628) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Miriam","email":"31922082+MiriamAparicio@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-02T09:25:05Z","message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:obs-ux-infra_services","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[ObsUX] [A11y] Fix focus on metadata table content","number":216628,"url":"https://github.com/elastic/kibana/pull/216628","mergeCommit":{"message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216628","number":216628,"mergeCommit":{"message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
1 similar comment
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
…216777) # Backport This will backport the following commits from `main` to `8.18`: - [[ObsUX] [A11y] Fix focus on metadata table content (#216628)](#216628) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Miriam","email":"31922082+MiriamAparicio@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-02T09:25:05Z","message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:obs-ux-infra_services","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[ObsUX] [A11y] Fix focus on metadata table content","number":216628,"url":"https://github.com/elastic/kibana/pull/216628","mergeCommit":{"message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216628","number":216628,"mergeCommit":{"message":"[ObsUX] [A11y] Fix focus on metadata table content (#216628)\n\nCloses https://github.com/elastic/kibana/issues/195014\n\n### Summary\n\nHost Detail page has a Metadata tab with expandable table rows. These\nrows add content to the page in an unexpected reading order. Content\nshould be expanded underneath the show more / less trigger. Focus should\nstay on the toggle.\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b","sha":"7b1d7bf08a8e48b0f0f5b57573e250faa7acf265"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
Closes #195014
Summary
Host Detail page has a Metadata tab with expandable table rows. These rows add content to the page in an unexpected reading order. Content should be expanded underneath the show more / less trigger. Focus should stay on the toggle.
Before
Screen.Recording.2025-04-01.at.12.39.56.mov
After
Screen.Recording.2025-04-01.at.12.10.15.mov