Skip to content

fix: make the dev panel toggle keyboard operable - #235

Merged
bluebill1049 merged 2 commits into
react-hook-form:masterfrom
Fasping:fix-devtool-toggle-keyboard
Aug 17, 2026
Merged

fix: make the dev panel toggle keyboard operable#235
bluebill1049 merged 2 commits into
react-hook-form:masterfrom
Fasping:fix-devtool-toggle-keyboard

Conversation

@Fasping

@Fasping Fasping commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Closes #230.

The click handler that opens the panel lived on the <svg> inside the toggle button rather than on the button itself. Activating a button with Enter or Space dispatches a click on the button, which never reaches the svg, so the panel could only be opened with a pointer.

  • moves the handler to the <Button>
  • marks the logo as decorative (aria-hidden, focusable="false") and drops its aria-label, so the button keeps a single accessible name
  • adds aria-label="Show dev panel" to the button
  • moves focus to the button that replaces the one being unmounted, in both directions
  • gives the close button an accessible name; it was announcing as "✕"
  • adds a test covering keyboard activation and focus

No visual or API change.

@bluebill1049 bluebill1049 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks.

@Fasping

Fasping commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

Hey @bluebill1049 , looks like we’re still waiting on the second approval... Do you think it’s worth pinging another maintainer, or is there another path to get this merged?

@bluebill1049
bluebill1049 merged commit fb19d4f into react-hook-form:master Aug 17, 2026
1 check passed
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.

The trigger element which hides and shows the DevTools panel is not keyboard operable.

2 participants