Repository navigation
fix(apollo-vertex): enlarge confidence signal chip hit area - #1387
Conversation
The icon-only chip rendered at 18.66 x 14px, below the WCAG 2.5.8 24px target size. Add an invisible ::after hit area, centred on the chip, that is at least 24 x 24px and never smaller than the chip itself. The visual size, inline layout and focus ring are unchanged.
There was a problem hiding this comment.
🟢 Approval recommended
The focused styling change matches the stated intent, with no unresolved blocking issues.
0 open findings
What changed in this PR
Enlarges the Apollo Vertex confidence signal chip’s clickable area without changing its visual size or inline layout.
Changes:
- Anchors a centered, invisible pseudo-element to the button.
- Makes the hit area at least 24 × 24px and no smaller than the chip.
| File | Description |
|---|---|
| packages/apollo-vertex/registry/confidence-signal/confidence-signal-chip.tsx | Adds positioning and minimum hit-area styles. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dependency License Review
License distribution
Excluded packages
|
📊 Coverage + size by packagePer-package coverage and bundle size on this PR. New-line coverage = of the source lines this PR adds or changes, the % hit by tests.
"Coverage" is each package's own |
Storybook visual diff✅ No stories are affected by this PR's changes; nothing to compare. Logs Updated (PT): Oct 16, 2026, 04:50:50 AM |
What
ConfidenceSignalChipnow has an invisible::afterhit area centred on the chip. It is at least 24 x 24px and never smaller than the chip (after:size-full after:min-h-6 after:min-w-6, positioned absolutely, translated to centre). The button getsrelativeso the pseudo-element anchors to it.Why
lintapple flagged the interactive chip: the icon-only (
min) variant rendered at 18.66 x 14px. That is below lintapple's 15px minimum and the WCAG 2.5.8 24px target size. Expanding the hit area invisibly keeps the visual design and inline layout unchanged.How verified
pnpm lint(oxlint type-aware),pnpm typecheck,pnpm format:checkandpnpm testinpackages/apollo-vertexall pass./components/confidence-signal) in headless Chromium:minchips: button box is still 18.66 x 14, and::afteris 24 x 24.elementFromPoint4px above the chip and 2px left of it resolves to the button.med/maxchips:::aftermatches the chip width and is 24px tall, so the area doesn't grow sideways into neighbours.Notes
getBoundingClientRect()may still report 18.66 x 14. If lintapple doesn't account for pseudo-element hit areas, the alternative is padding plus a negative margin on the button.gap-4)..changesetdir, and vertex releases from conventional commits.