Skip to content

extensions: fix command palette accessibility

Warren Gifford requested to merge tjk/cmd-pal-a11y into main

Created by: tjkandala

Part of #36751 (closed) Closes #36858 (closed), #36859 (closed), and #36861 (closed)

  • Allow <CommandListPopoverButton> to be a button. For unknown reasons, it was a <span> by default. This makes it focusable, and I didn't observe visual regressions on web (didn't change browser extension/native integration usage).
  • Capture active element on open in order to restore focus on close.
  • Limit command palette width on mobile.

Test plan

  • Existing automated tests pass
  • Ensure focus works through manual testing
    • Tab through global navbar
      • Observe that the command palette icon is now focusable.
      • Screen Shot 2022-06-21 at 4 27 13 PM
    • Focus some element on the page. Activate the command palette with the ctrl + p shortcut.
      • Execute an action or press escape
      • Observe that focus returns to the previously focused element

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading