Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.15] [Discover] [Unified Doc Viewer] Fix doc viewer not receiving f…
…ocus on open (#191039) (#194780) # Backport This will backport the following commits from `main` to `8.15`: - [[Discover] [Unified Doc Viewer] Fix doc viewer not receiving focus on open (#191039)](#191039) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Davis McPhee","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-30T03:25:26Z","message":"[Discover] [Unified Doc Viewer] Fix doc viewer not receiving focus on open (#191039)\n\n## Summary\r\n\r\nThis PR fixes an issue where the new resizable doc viewer push flyout\r\nwas not receiving focus on open, resulting in the flyout having to be\r\nmanually focused in before users can navigate between docs using the\r\narrow keys. It also re-adds support for closing the flyout when pressing\r\nthe escape key, improves overall focus management, ensures the proper\r\na11y attributes are used when the push flyout is shown, and introduces a\r\nnew set of functional tests for doc viewer keyboard navigation and a11y.\r\n\r\nFixes #190946.\r\n\r\n### Checklist\r\n\r\n- [x] 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- [x] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\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- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"0ac69658bff4e02b8c477673e091b4e86bddf7b5","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:DataDiscovery","backport:prev-minor","backport:prev-major","v8.16.0"],"number":191039,"url":"https://github.com/elastic/kibana/pull/191039","mergeCommit":{"message":"[Discover] [Unified Doc Viewer] Fix doc viewer not receiving focus on open (#191039)\n\n## Summary\r\n\r\nThis PR fixes an issue where the new resizable doc viewer push flyout\r\nwas not receiving focus on open, resulting in the flyout having to be\r\nmanually focused in before users can navigate between docs using the\r\narrow keys. It also re-adds support for closing the flyout when pressing\r\nthe escape key, improves overall focus management, ensures the proper\r\na11y attributes are used when the push flyout is shown, and introduces a\r\nnew set of functional tests for doc viewer keyboard navigation and a11y.\r\n\r\nFixes #190946.\r\n\r\n### Checklist\r\n\r\n- [x] 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- [x] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\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- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"0ac69658bff4e02b8c477673e091b4e86bddf7b5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191039","number":191039,"mergeCommit":{"message":"[Discover] [Unified Doc Viewer] Fix doc viewer not receiving focus on open (#191039)\n\n## Summary\r\n\r\nThis PR fixes an issue where the new resizable doc viewer push flyout\r\nwas not receiving focus on open, resulting in the flyout having to be\r\nmanually focused in before users can navigate between docs using the\r\narrow keys. It also re-adds support for closing the flyout when pressing\r\nthe escape key, improves overall focus management, ensures the proper\r\na11y attributes are used when the push flyout is shown, and introduces a\r\nnew set of functional tests for doc viewer keyboard navigation and a11y.\r\n\r\nFixes #190946.\r\n\r\n### Checklist\r\n\r\n- [x] 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- [x] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [x] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [x] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\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- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"0ac69658bff4e02b8c477673e091b4e86bddf7b5"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/194368","number":194368,"state":"MERGED","mergeCommit":{"sha":"1ee91ba1b1b0e5f11cfba210b3aa332723f98352","message":"[8.x] [Discover] [Unified Doc Viewer] Fix doc viewer not receiving focus on open (#191039) (#194368)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.x`:\n- [[Discover] [Unified Doc Viewer] Fix doc viewer not receiving focus on\nopen (#191039)](https://github.com/elastic/kibana/pull/191039)\n\n<!--- Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT [{\"author\":{\"name\":\"Davis\nMcPhee\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-09-30T03:25:26Z\",\"message\":\"[Discover]\n[Unified Doc Viewer] Fix doc viewer not receiving focus on open\n(#191039)\\n\\n## Summary\\r\\n\\r\\nThis PR fixes an issue where the new\nresizable doc viewer push flyout\\r\\nwas not receiving focus on open,\nresulting in the flyout having to be\\r\\nmanually focused in before users\ncan navigate between docs using the\\r\\narrow keys. It also re-adds\nsupport for closing the flyout when pressing\\r\\nthe escape key, improves\noverall focus management, ensures the proper\\r\\na11y attributes are used\nwhen the push flyout is shown, and introduces a\\r\\nnew set of functional\ntests for doc viewer keyboard navigation and a11y.\\r\\n\\r\\nFixes\n#190946.\\r\\n\\r\\n### Checklist\\r\\n\\r\\n- [x] Any text added follows [EUI's\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\r\\nsentence case text and includes\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n-\n[\n]\\r\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\r\\nwas\nadded for features that require explanation or tutorials\\r\\n- [x] [Unit\nor\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated or added to match the most common scenarios\\r\\n- [ ] [Flaky\nTest\\r\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\nwas\\r\\nused on any tests changed\\r\\n- [x] Any UI touched in this PR is\nusable by keyboard only (learn more\\r\\nabout [keyboard\naccessibility](https://webaim.org/techniques/keyboard/))\\r\\n- [x] Any UI\ntouched in this PR does not create any new axe failures\\r\\n(run axe in\nbrowser:\\r\\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\\r\\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\\r\\n-\n[ ] If a plugin configuration key changed, check if it needs to\nbe\\r\\nallowlisted in the cloud and added to the\n[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-\n[x] This renders correctly on smaller devices using a\nresponsive\\r\\nlayout. (You can test this [in\nyour\\r\\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\\r\\n-\n[x] This was checked for\n[cross-browser\\r\\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\\r\\n\\r\\n###\nFor maintainers\\r\\n\\r\\n- [ ] This was checked for breaking API changes\nand was\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<[email protected]>\",\"sha\":\"0ac69658bff4e02b8c477673e091b4e86bddf7b5\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.16.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:fix\",\"v9.0.0\",\"Team:DataDiscovery\",\"backport:prev-minor\",\"backport:prev-major\"],\"title\":\"[Discover]\n[Unified Doc Viewer] Fix doc viewer not receiving focus on\nopen\",\"number\":191039,\"url\":\"https://github.com/elastic/kibana/pull/191039\",\"mergeCommit\":{\"message\":\"[Discover]\n[Unified Doc Viewer] Fix doc viewer not receiving focus on open\n(#191039)\\n\\n## Summary\\r\\n\\r\\nThis PR fixes an issue where the new\nresizable doc viewer push flyout\\r\\nwas not receiving focus on open,\nresulting in the flyout having to be\\r\\nmanually focused in before users\ncan navigate between docs using the\\r\\narrow keys. It also re-adds\nsupport for closing the flyout when pressing\\r\\nthe escape key, improves\noverall focus management, ensures the proper\\r\\na11y attributes are used\nwhen the push flyout is shown, and introduces a\\r\\nnew set of functional\ntests for doc viewer keyboard navigation and a11y.\\r\\n\\r\\nFixes\n#190946.\\r\\n\\r\\n### Checklist\\r\\n\\r\\n- [x] Any text added follows [EUI's\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\r\\nsentence case text and includes\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n-\n[\n]\\r\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\r\\nwas\nadded for features that require explanation or tutorials\\r\\n- [x] [Unit\nor\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated or added to match the most common scenarios\\r\\n- [ ] [Flaky\nTest\\r\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\nwas\\r\\nused on any tests changed\\r\\n- [x] Any UI touched in this PR is\nusable by keyboard only (learn more\\r\\nabout [keyboard\naccessibility](https://webaim.org/techniques/keyboard/))\\r\\n- [x] Any UI\ntouched in this PR does not create any new axe failures\\r\\n(run axe in\nbrowser:\\r\\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\\r\\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\\r\\n-\n[ ] If a plugin configuration key changed, check if it needs to\nbe\\r\\nallowlisted in the cloud and added to the\n[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-\n[x] This renders correctly on smaller devices using a\nresponsive\\r\\nlayout. (You can test this [in\nyour\\r\\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\\r\\n-\n[x] This was checked for\n[cross-browser\\r\\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\\r\\n\\r\\n###\nFor maintainers\\r\\n\\r\\n- [ ] This was checked for breaking API changes\nand was\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<[email protected]>\",\"sha\":\"0ac69658bff4e02b8c477673e091b4e86bddf7b5\"}},\"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/191039\",\"number\":191039,\"mergeCommit\":{\"message\":\"[Discover]\n[Unified Doc Viewer] Fix doc viewer not receiving focus on open\n(#191039)\\n\\n## Summary\\r\\n\\r\\nThis PR fixes an issue where the new\nresizable doc viewer push flyout\\r\\nwas not receiving focus on open,\nresulting in the flyout having to be\\r\\nmanually focused in before users\ncan navigate between docs using the\\r\\narrow keys. It also re-adds\nsupport for closing the flyout when pressing\\r\\nthe escape key, improves\noverall focus management, ensures the proper\\r\\na11y attributes are used\nwhen the push flyout is shown, and introduces a\\r\\nnew set of functional\ntests for doc viewer keyboard navigation and a11y.\\r\\n\\r\\nFixes\n#190946.\\r\\n\\r\\n### Checklist\\r\\n\\r\\n- [x] Any text added follows [EUI's\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\nuses\\r\\nsentence case text and includes\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n-\n[\n]\\r\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\r\\nwas\nadded for features that require explanation or tutorials\\r\\n- [x] [Unit\nor\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated or added to match the most common scenarios\\r\\n- [ ] [Flaky\nTest\\r\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\nwas\\r\\nused on any tests changed\\r\\n- [x] Any UI touched in this PR is\nusable by keyboard only (learn more\\r\\nabout [keyboard\naccessibility](https://webaim.org/techniques/keyboard/))\\r\\n- [x] Any UI\ntouched in this PR does not create any new axe failures\\r\\n(run axe in\nbrowser:\\r\\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\\r\\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\\r\\n-\n[ ] If a plugin configuration key changed, check if it needs to\nbe\\r\\nallowlisted in the cloud and added to the\n[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-\n[x] This renders correctly on smaller devices using a\nresponsive\\r\\nlayout. (You can test this [in\nyour\\r\\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\\r\\n-\n[x] This was checked for\n[cross-browser\\r\\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\\r\\n\\r\\n###\nFor maintainers\\r\\n\\r\\n- [ ] This was checked for breaking API changes\nand was\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<[email protected]>\",\"sha\":\"0ac69658bff4e02b8c477673e091b4e86bddf7b5\"}}]}]\nBACKPORT-->\n\nCo-authored-by: Davis McPhee <[email protected]>"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information