SegmentedControl is 32px at size="lg", below the 44px touch-target floor at every size · Issue #6013 · facebook/astryx · GitHub
Skip to content

SegmentedControl is 32px at size="lg", below the 44px touch-target floor at every size #6013

Open

Description

@DrunkOnJava

Summary

SegmentedControlItem is 32px tall at size="lg" — the largest size the component offers — which is below the 44px minimum touch target size in the WCAG 2.2 AA "Target Size (Minimum)" / Apple HIG / Material guidance that most mobile products hold themselves to. Because lg is the ceiling, no prop combination reaches the floor; a consumer has to override the height in CSS.

Measured

@astryxdesign/core@0.5.2, Chromium, 390px viewport (iPhone-class width), getBoundingClientRect().height on .astryx-segmented-control-item:

size height
sm 24px
md 28px
lg 32px

Rendered as:

<SegmentedControl size="lg" label="…" value={v} onChange={setV}>
  <SegmentedControlItem value="a" label="Alpha" />
  <SegmentedControlItem value="b" label="Beta" />
</SegmentedControl>

For comparison, in the same render Button and ToggleButton take min-height: 44px from our own phone floor and measure 44px; the segmented control does not, because its class was not in that floor's selector list. We have added it locally — this issue is about the shipped default.

Why it matters

A segmented control is frequently a primary phone affordance (a view switcher, a filter). At 32px it is the smallest interactive control in a typical Astryx phone surface, and it is the one users hit while walking.

Suggested

Either raise size="lg" to a 44px minimum on coarse pointers, or expose the height so a theme can. A @media (pointer: coarse) floor inside the component would fix it for every consumer without changing desktop density — which is the part consumers cannot safely do themselves, since a blanket min-height on Astryx classes changes non-control density too.

Activity

  1. cixzhang commented on Sep 4, 2026

    @cixzhang
    Contributor

    Thank you for checking the touch-target sizing here and for calling out the standard explicitly.

    One correction: 44×44 CSS px is the WCAG AAA target under SC 2.5.5, not the AA minimum. Astryx targets WCAG 2.2 AA, where SC 2.5.8 sets the minimum at 24×24 CSS px, subject to its spacing and other exceptions.

    At 32px, the SegmentedControl item therefore clears the AA dimensional minimum. We may still choose a larger target as an Astryx design standard in a particular context, but we should not describe 44px as the WCAG 2.2 AA requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions