[ObsUX][A11y] Fix focus for popover in details flyout (#218095)

Closes https://github.com/elastic/kibana/issues/212633

## Summary

Fixed navigation by keeping focus on Popover opener element

### How to test
Observability -> Infrastructure -> Infrastructure inventory page.
1. Navigate to any square below All button.
2. Press Enter.
3. Navigate to infographic for Host IP.
4. Press Enter.
5. Press Esc.

Expected result: Navigation continues to next element when Tab key is
pressed.

BEFORE 


https://github.com/user-attachments/assets/e9ee6ff6-895d-408f-b165-0f8edd4eb197

AFTER


https://github.com/user-attachments/assets/b01e6955-b659-4d9a-abcf-1ece48adc161
This commit is contained in:
Miriam 2025-04-14 15:15:25 +01:00 committed by GitHub
parent 1a6cea5589
commit 26d9f5f7d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,7 +29,7 @@ export const Popover = ({
<EuiPopover
panelPaddingSize="s"
focusTrapProps={{
returnFocus: false,
returnFocus: true,
}}
button={
<button