Skip to content

Don't focus trap tab by default#115

Open
riasvdv wants to merge 1 commit into
panphora:mainfrom
riasvdv:editor-tab-accessibility
Open

Don't focus trap tab by default#115
riasvdv wants to merge 1 commit into
panphora:mainfrom
riasvdv:editor-tab-accessibility

Conversation

@riasvdv

@riasvdv riasvdv commented Jun 12, 2026

Copy link
Copy Markdown

Fixes #113

  • Collapsed Tab/Shift+Tab now fall through to native focus behavior, while selected text still indents/outdents.
  • Added public indentSelection() / outdentSelection() line transforms, using two spaces and setRangeText(..., 'preserve').
  • Added Ctrl/Cmd+] and Ctrl/Cmd+[ to shortcuts.
  • Added preview inert / aria-hidden syncing

Summary by cubic

Stop trapping focus on Tab: collapsed Tab/Shift+Tab now move focus while selections still indent/outdent (Fixes #113). Also adds indent/outdent shortcuts and improves preview accessibility.

  • New Features

    • Public APIs: indentSelection() and outdentSelection().
    • Shortcuts: Ctrl/Cmd + ] to indent, Ctrl/Cmd + [ to outdent.
  • Bug Fixes

    • Tab no longer traps focus; with a selection it indents/outdents, otherwise it follows native focus.
    • Preview stays out of the tab order with inert/aria-hidden until Preview mode.
    • Prevent duplicate global listener initialization.

Written for commit a554161. Summary will update on new commits.

Review in cubic

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.

Markdown editor traps keyboard focus

1 participant