Skip to content

fix: Keyboard activation & inert when collapsed#102

Closed
alexcarpenter wants to merge 1 commit intobenjitaylor:mainfrom
alexcarpenter:alexcarpenter/keyboard-functionality
Closed

fix: Keyboard activation & inert when collapsed#102
alexcarpenter wants to merge 1 commit intobenjitaylor:mainfrom
alexcarpenter:alexcarpenter/keyboard-functionality

Conversation

@alexcarpenter
Copy link

Couple of small keyboard interaction improvements:

  • Ensure nested button elements are not focusable unless the toolbar is active.
    • Uses inert attribute to prevent interactions.
  • Allow opening via keyboard.
    • Since the trigger element is not actual button element, we were missing opening via space or enter

@vercel
Copy link

vercel bot commented Feb 17, 2026

@alexcarpenter is attempting to deploy a commit to the Benji Taylor's Projects Team on Vercel.

A member of the Team first needs to authorize it.

@benjitaylor benjitaylor requested a review from tofuness February 17, 2026 18:25
@benjitaylor
Copy link
Owner

Thanks for this @alexcarpenter — the inert attribute and keyboard activation are the right ideas. I ran into an issue in practice though: the toolbar is portaled to document.body, so it's last in tab order behind every other focusable element on the page. Makes the Enter/Space activation hard to reach.

There's already a keyboard shortcut to toggle the toolbar (Cmd+Shift+F / Ctrl+Shift+F) which covers the activation case. The inert improvement is interesting but probably needs a different approach. Going to close this for now — appreciate you thinking about a11y here.

@benjitaylor benjitaylor closed this Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants