You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiFlyout] Make flyout update focus trap shards #9099
The EuiFlyout traps focus. We can include certain elements in that focus trap using: includeFixedHeadersInFocusTrap (docs) or includeSelectorInFocusTrap. That being said, the focus trap shard elements are queried on EuiFlyout render. Any elements that render afterwards, e.g. popovers, tooltips, are not part of the focus trap even when using these props.
Proposed Solution
The proposed solution is to listen to DOM updates and re-query the focus trap shard elements so that includeSelectorInFocusTrap works for elements that are rendered after flyout is.
The gist is updating focusTrapShards on key down (key event outside of the flyout). This will minimize the risk of impacting the performance and causing regression in flyout focus trap.
Use Case
Side nav v2 in Kibana
Value / Impact
High impact, high severity. The mouse works as expected but the keyboard navigation is completely broken in side nav v2. Keyboard users cannot enter the popover and select any menu items inside. It's especially critical for the collapsed mode.
Because navigation is a heavily-used component, this is a big accessibility violation.
Could potentially affect the performance on the consumer side. Needs to be benchmarked in Kibana.
Urgency
It is not a blocker but it's definitely something to fix ASAP.
changed the title [-][EuiFlyout] Make flyout update focus trap shards on DOM update[/-][+][EuiFlyout] Make flyout update focus trap shards[/+]on Oct 14, 2025
Activity
[-][EuiFlyout] Make flyout update focus trap shards on DOM update[/-][+][EuiFlyout] Make flyout update focus trap shards[/+]weronikaolejniczak commentedon Oct 14, 2025
Proposal from @mgadewoll:
Modify
onKeyDownto update thefocusTrapShards. Scope to key event outside of the flyout.eui/packages/eui/src/components/flyout/flyout.tsx
Lines 332 to 340 in 78d5c90
Screen.Recording.2025-10-14.at.15.39.15.mov