Skip to content

Add tabIndex reflection and the Focusable mixin - #120

Open
cowboyd wants to merge 1 commit into
dom-inertfrom
dom-tabindex
Open

cowboyd wants to merge 1 commit into
dom-inertfrom
dom-tabindex

Conversation

@cowboyd

@cowboyd cowboyd commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

This PR is part of of the "Input Stack" which adds the following capabilities to the DOM

  • Focus management: focus(), blur(), activeElement, focus events, and cleanup when focused nodes are removed.
  • Focus navigation: Tab/Shift+Tab, tabindex ordering, wrapping, and disabled/inert filtering.
  • Focus styling: :focus, :focus-within, and :focus-visible under our keyboard-only policy.
  • Input editing: typing, replacing selections, Backspace/Delete, and cancelable beforeinput followed by input.
  • Caret movement: Left/Right across grapheme boundaries; Up/Down to the beginning/end of single-line inputs.
  • Shift-selection: extend, shrink, and reverse a selection while preserving its anchor. Readonly inputs allow movement and selection.
  • Input state APIs: value, selection endpoints/direction, setSelectionRange(), and setRangeText().

What does this PR do?

Reflects tabIndex and gives buttons their default focusability through a shared Focusable mixin, backed by mixin() and createMixin().

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • All tests pass (pnpm test)
  • Files are formatted (pnpm format)
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

@pkg-pr-new

pkg-pr-new Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

commit: d028ab4

@cowboyd
cowboyd added this pull request to stack #114 December 1, 2026 18:03
@cowboyd
cowboyd marked this pull request as ready for review December 1, 2026 19:16
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.

1 participant