Skip to content

fix(a11y): include leftover-pair evidence in button names - #977

Draft
seonghobae wants to merge 2 commits into
feat/leftover-map-segment-explained-share-v2300from
feat/leftover-pair-list-accessible-evidence-20260907
Draft

fix(a11y): include leftover-pair evidence in button names#977
seonghobae wants to merge 2 commits into
feat/leftover-map-segment-explained-share-v2300from
feat/leftover-pair-list-accessible-evidence-20260907

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Issue #976. Preserve the valid LeftoverPairList evidence-in-accessible-name delta while its serialized parent is repaired. The pair action must expose the same finite persisted leftover evidence (R, Y/E, rank, unexplained leftover, shares, reconstruction, coordinates, distance) that the buyer sees, without deriving psychometric truth or changing click/keyboard behavior.

Current authority and repair findings

This product head a7f099d1684c18bc0fdd9eafe2ef9b65a4bdd12f is still based on historical #802 (32f1cda10a2a1a6cabd64a3ae6f59bd6f0b20fd6). Issue #976 requires the lane to start from the then-current serialized product parent after #829/#830 ancestry settles. Therefore this head is evidence-only until #830 converges; preserve the valid delta, keep Draft, then reconstruct/retarget non-force rather than patching the stale parent or closing the PR.

Review 5131642217 also found a WCAG 2.2 SC 2.5.3 Label in Name defect in the proposed composition: visible button text begins with the localized kindLabel (Closest leftover: … / Farthest leftover: …) while the explicit accessible name begins Open leftover {kind} pair: …. The programmatic name must contain the visible text, preferably at the start. Authoritative guidance: https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html . Current-parent reconstruction must prefix the accessible name with the exact rendered visible label and then append localized action/evidence context.

Acceptance boundary

Existing focused LeftoverPairList tests and period-report assertions on this historical head are evidence only. They do not transfer across the required parent movement. No self-approval, force-push, destructive rebase, source copy, psychometric reimplementation, or gate weakening.

Pair actions were named only by kind, title, and criterion, so
assistive technology could not read the finite leftover badges
already shown on the same control. Keep those formatters as the
only evidence source.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The pair action already kept NaN residual and distance out of the
accessible name, but the visible badges still rendered R — and
d NaN. Use the same formatters for both surfaces.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two repair findings, preserving this PR's valid evidence-name delta rather than closing it.

  1. Wrong serialized parent. Issue #976 explicitly requires this lane to start from the then-current serialized product parent after #829/#830 ancestry settles. This head is still based on the older #802 branch. Keep the PR Draft and reconstruct/retarget it after #830 is promoted; do not patch the stale parent in place or replay cumulative history.

  2. WCAG 2.2 SC 2.5.3 Label in Name. The visible button label starts with the localized kindLabel (for example Closest leftover: …), while the explicit accessible name starts Open leftover closest pair: …. The visible label text therefore is not contained in the accessible name. W3C SC 2.5.3 requires the programmatic name to contain the text presented visually, and recommends putting that visible text at the start: https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html . When this lane is reconstructed on the current parent, use the exact visible label as the accessible-name prefix, then append the action/evidence context. Add a realistic regression that compares rendered visible text with the computed aria-label, while retaining the existing fail-closed handling for non-finite evidence metrics.

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.

1 participant