fix(a11y): include leftover-pair evidence in button names - #977
Conversation
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.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
left a comment
There was a problem hiding this comment.
Two repair findings, preserving this PR's valid evidence-name delta rather than closing it.
-
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.
-
WCAG 2.2 SC 2.5.3 Label in Name. The visible button label starts with the localized
kindLabel(for exampleClosest leftover: …), while the explicit accessible name startsOpen 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 computedaria-label, while retaining the existing fail-closed handling for non-finite evidence metrics.
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
a7f099d1684c18bc0fdd9eafe2ef9b65a4bdd12fis 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
5131642217also found a WCAG 2.2 SC 2.5.3 Label in Name defect in the proposed composition: visible button text begins with the localizedkindLabel(Closest leftover: …/Farthest leftover: …) while the explicit accessible name beginsOpen 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.