✅ test: add tests for PhoneNumberInput, Input and Command - #673
Merged
Conversation
futjesus
force-pushed
the
fix/a11y-focus-and-roles
branch
2 times, most recently
from
July 27, 2026 15:03
605bd9a to
1ba36c2
Compare
- PhoneNumberInput: country selection, prefix updates, typing, Escape and outside-click close, axe (6 tests) - Fix two a11y bugs the axe test surfaced: the flag selector button had no accessible name, and the label used id instead of htmlFor so it never associated with the input - Input: label association, required marker, onChange, error/helper precedence, password visibility toggle, axe (7 tests) - Command: open/filter/keyboard-select/Escape via CommandProvider, axe (5 tests)
futjesus
force-pushed
the
test/component-backlog
branch
from
July 27, 2026 15:09
4a34ea6 to
3b3120a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fourth PR of the audit series (stacked on #672). Adds behavior tests for the three riskiest components that shipped with zero coverage.
Changes
onChange, Escape and outside-click close the selector, axe check. The country list is virtualized (TanStack Virtual), so the tests mockoffsetHeight/offsetWidthfor jsdom.<button>had no accessible name (nowaria-label="Select country, <name>"+aria-expanded), and the<label>usedid={id}instead ofhtmlFor={id}so it never associated with the input (and duplicated the input's id).useId, required marker,onChange, error state +data-error, error/helper-text precedence, password visibility toggle, axe.CommandProvider/CommandInput/CommandListas the stories do), axe.Testing
18 new tests, full suite green (lint, types, prettier, coverage thresholds).