Skip to content

a11y(2.5.8): chip — pad remove button to 24×24 CSS px minimum#3544

Open
rosanusi wants to merge 2 commits into
mainfrom
wcag/2.5.8-chip-remove-button
Open

a11y(2.5.8): chip — pad remove button to 24×24 CSS px minimum#3544
rosanusi wants to merge 2 commits into
mainfrom
wcag/2.5.8-chip-remove-button

Conversation

@rosanusi

Copy link
Copy Markdown
Contributor

Description

The chip remove button (<button><Icon name="close" /></button>) had no padding and no explicit size, so its hit area collapsed to ~16×16 CSS px — below the WCAG 2.5.8 (Target Size Minimum, Level AA) requirement of 24×24.

Fix: add inline-flex items-center justify-center p-1 to the button's class. p-1 is 4 px each side, expanding the hit area to exactly 24×24 (4 + 16 + 4). The visible close icon is unchanged; merge() is already imported in the file. The button's disabled ? 'hidden' : '' hide behaviour is preserved.

The IconButton approach (recommended in the audit issue) was considered but deferred: chip.svelte is already in Svelte 5 runes mode while icon-button.svelte is Svelte 4 — Button explicitly types onclick as never, and using on:click syntax in a runes component triggers deprecation warnings. The padding approach satisfies 2.5.8, has zero interop risk, and keeps the diff minimal. A follow-on migration to IconButton can happen as part of the broader Svelte 5 component migration.

Changed file: src/lib/holocene/chip.svelte — 4 lines added to the remove button's class.

This fix cascades to all Chip consumers in both ui-main and cloud-ui-main (via the @temporalio/ui tarball).

Screenshots

No visual change — close icon stays 16×16 px; padding is transparent. Hit area grows from ~16×16 to 24×24.

Design

No design changes. The chip's outer min-h-7 (28 px) container accommodates the 24-px button height with 2 px headroom each side.

Testing

  • Visit the workflows list with active filter chips visible.
  • Inspect the chip remove button in DevTools: confirm computed size is 24×24 px.
  • Tap-test on a touch device: confirm reliable activation without accidentally hitting adjacent chip content.
  • Keyboard Tab to the remove button, press Enter/Space — chip is removed.
  • Focus-visible ring is visible on the remove button.
  • axe-core: no target-size violations on chip remove buttons.
  • Visual regression: chip layout unchanged across filter-bar, search-attribute filter list, chip-input, and combobox chip variant.

Checklist

  • No new i18n keys
  • No visual change to icon or chip container
  • Cascades to cloud-ui-main via @temporalio/ui tarball

Docs

No documentation changes required.

A11y-Audit-Ref: 2.5.8-chip-remove-button

The remove button rendered at ~16×16 px (bare Icon, no padding),
falling below the WCAG 2.5.8 24×24 minimum. Adding p-1 (4 px per
side) expands the hit area to exactly 24×24 while keeping the visible
close icon unchanged. inline-flex items-center justify-center ensures
the icon stays centred within the enlarged target.

A11y-Audit-Ref: 2.5.8-chip-remove-button

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jun 16, 2026 7:50pm

Request Review

@github-actions github-actions Bot added a11y Accessibility audit PR a11y:broken-ref A11y-Audit-Ref slug not in manifest labels Jun 11, 2026
@rosanusi rosanusi marked this pull request as ready for review June 15, 2026 16:43
@rosanusi rosanusi requested a review from a team as a code owner June 15, 2026 16:43
…erate

Adds the audit fix-doc manifest entry referenced by this PR's
A11y-Audit-Ref trailer, so the triage workflow resolves the slug
instead of labeling it a11y:broken-ref.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions github-actions Bot added a11y:bucket-1 Bucket 1: design-mergeable, CSS / tokens a11y:sc-2.5.8 and removed a11y:broken-ref A11y-Audit-Ref slug not in manifest labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a11y:bucket-1 Bucket 1: design-mergeable, CSS / tokens a11y:sc-2.5.8 a11y Accessibility audit PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants