Skip to content

fix(component-library): make mt-select a single tab stop - #1394

Open
Arnold Stoba (arnoldstoba) wants to merge 2 commits into
mainfrom
fix/select-single-tab-stop
Open

Arnold Stoba (arnoldstoba) wants to merge 2 commits into
mainfrom
fix/select-single-tab-stop

Conversation

@arnoldstoba

@arnoldstoba Arnold Stoba (arnoldstoba) commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What?

Shift+Tab in mt-select works like Tab: it opens the select on the way in, and on the way out it focuses the previous element without clicking it.

Why?

Shift+Tab out of a select called .click() on the previous focusable element. In a form like this, Shift+Tab from the currency select toggled "Active":

<mt-checkbox v-model="active" label="Active" />
<mt-select v-model="currency" label="Currency" :options="currencies" />

A button or link before a select was triggered the same way. Shift+Tab into a select also landed on its inner input without opening it.

How?

The inner input gets tabindex="-1", so the select wrapper is the only tab stop and opens on focus in both directions. On Shift+Tab out, the select focuses the previous focusable element (skipping disabled, inert, hidden and tabindex="-1" elements) instead of clicking it.

Testing?

  • mt-select.spec.ts: Shift+Tab focuses the previous element, skips an inert one and clicks nothing.
  • Interaction story: Tab and Shift+Tab through two selects between two buttons, checking focus and the open state at every step.

Anything Else?

#1397 also changes mt-select-base.vue; the two merge without conflicts.

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
meteor-docs Ready Ready Preview Oct 6, 2026 9:38am UTC
meteor-storybook Ready Ready Preview Oct 6, 2026 9:38am UTC

Request Review

This branch was successfully deployed

2 active deployments
Preview – meteor-docs — af4109ec Deployed Oct 6, 2026 by vercel[bot]
Preview – meteor-storybook — af4109ec Deployed Oct 6, 2026 by vercel[bot]
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