-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(core): floor SegmentedControlItem to a 44px touch target on coarse pointers - #6084
Open
ManoharPaturi wants to merge 1 commit into
Open
fix(core): floor SegmentedControlItem to a 44px touch target on coarse pointers #6084ManoharPaturi wants to merge 1 commit into
ManoharPaturi wants to merge 1 commit into
Conversation
ManoharPaturi
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
September 6, 2026 06:33
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@meta-cla
meta-cla
Bot
added
the
CLA Signed
This label is managed by the Meta Open Source bot.
label
Sep 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
@github-actions
github-actions
Bot
added
community
Authored by a community contributor (not on the eng/design team)
needs:code-review
High-risk change (new package/component/API) — needs human code review before merge
labels
Sep 6, 2026
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsSegmentedControl (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual RegressionStatus: No visual change across 4 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
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.
Fixes #6013
Summary
SegmentedControlItemtopped out at 32px (size="lg"=--size-element-lg− 4px), below the 44px minimum touch target of WCAG 2.2 AA "Target Size (Minimum)" / Apple HIG / Material — and sincelgis the ceiling, no prop combination could reach the floor.ButtonandToggleButtonalready honour the floor on phone surfaces; the segmented control's class was simply not in it.Change
A
@media (pointer: coarse)min-height: 44pxfloor on the item's base style — mirroringTouchDateField'smonthArrowfloor (min-heightscoped to coarse pointers,default: null). Every size is floored on touch; desktop density is unchanged (no unconditional rule), which is the part consumers cannot safely do themselves.Tests
New case in
SegmentedControl.test.tsxusing the repo'sinjectedRules()CSSOM pattern (mirroringInputClearButton): the item's classes have a coarse-pointer rule carryingmin-height: 44px, and no unconditional min-height exists. Verified the test fails on the unfloored component and passes with the fix.vitest run packages/core/src/SegmentedControl→ 44 passed; coretsc --noEmit, eslint,check:sync, andcheck:changesetsclean. Doc note on thesizeprop; changeset included.