Skip to content

fix: Enlarge SideNavigation expandable caret pointer target to 24px (WCAG 2.5.8) - #4907

Open
Harsh-Anand-Singh wants to merge 1 commit into
mainfrom
wcag-258-side-nav-caret-pointer-target
Open

fix: Enlarge SideNavigation expandable caret pointer target to 24px (WCAG 2.5.8)#4907
Harsh-Anand-Singh wants to merge 1 commit into
mainfrom
wcag-258-side-nav-caret-pointer-target

Conversation

@Harsh-Anand-Singh

@Harsh-Anand-Singh Harsh-Anand-Singh commented Aug 14, 2026

Copy link
Copy Markdown
Member

Description

Fixes a WCAG 2.5.8 (Target Size Minimum) finding: the SideNavigation expandable-link-group chevron caret button had a pointer target only as wide as its icon glyph, 12px in One Theme, 16px in Classic/Visual Refresh, below the 24px minimum.

This is a width-only change. The vertical target was already conformant: the caret button stretches to the full row height (28px comfortable / 24px compact) via flex stretch.

The clickable box is widened to 24px using inline padding compensated by an equal negative margin, so the extra width lands entirely in the adjacent non-interactive gutter:

  • Start icon position (default): grows into the ~20px leading gutter (the space-l negative-margin seating).
  • End icon position (withIcons): grows into the trailing gutter instead, because the label link's own click box (its negative-margin overhang) sits flush against the caret's inline-start edge, growing start-ward there would capture the link's clicks.

Zero layout shift: the caret glyph and the label link do not move (verified pixel-identical positions before/after in both themes), and pixel probes at the caret/link boundary confirm click ownership is unchanged. Behavior is the same across Classic, Visual Refresh, and One Theme, the tokens involved resolve identically; only the padding delta differs because the icon glyph is 16px vs 12px. Stacked link groups tile cleanly (24px target ≤ 24px compact row pitch), with no target overlap between rows.

Related links, issue #, if available: n/a

How has this been tested?

  • Measured in devtools on the SideNavigation permutations dev page across One Theme / Visual Refresh, comfortable / compact, and both expand icon positions: caret button box is 24×28 (comfortable) and 24×24 (compact) after the change; glyph and label positions unchanged; before/after pixel probes at the caret/label boundary show identical click ownership.
  • Functional check: clicking the newly added far-edge pixels toggles the section without triggering the header link.
  • Existing unit suites: src/expandable-section + src/side-navigation (365 tests) pass.
  • Existing integration suites: src/expandable-section/__integ__ + src/side-navigation/__integ__ pass.
  • No new unit test: pure target-size CSS change, matching the inline-icon-pointer-target precedent; coverage is the a11y audit re-run plus existing permutation screenshots (visual regression runs in CI on this PR).
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The expandable-link-group chevron button had a pointer target only as
wide as its icon glyph (12px one-theme, 16px classic/VR), below the
24px minimum required by WCAG 2.5.8. Widen the clickable box to 24px
using inline padding compensated by an equal negative margin, growing
into the adjacent non-interactive gutter: inline-start for the start
icon position, inline-end for the end icon position (where the label
link's own click box sits flush against the caret's start edge).

Width-only change: the glyph and label positions are unchanged, the
label link keeps all of its clicks, and the vertical target already
spans the full row height via flex stretch.
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.66%. Comparing base (f066dd8) to head (1dba7ac).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4907   +/-   ##
=======================================
  Coverage   97.66%   97.66%           
=======================================
  Files         958      958           
  Lines       31317    31317           
  Branches    11566    11566           
=======================================
  Hits        30585    30585           
  Misses        686      686           
  Partials       46       46           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Harsh-Anand-Singh
Harsh-Anand-Singh added this pull request to the merge queue Aug 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 17, 2026
@Harsh-Anand-Singh
Harsh-Anand-Singh added this pull request to the merge queue Aug 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 17, 2026
@Harsh-Anand-Singh
Harsh-Anand-Singh added this pull request to the merge queue Aug 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 17, 2026
@Harsh-Anand-Singh
Harsh-Anand-Singh added this pull request to the merge queue Aug 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants