feat(a11y): soft length hint on @mention search input (>=90 chars) #639
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
PR #629 introduced
MAX_QUERY_LENGTH = 100(CWE-400 layered cap, Nora #1) in the @mention search input. The cap is silent — pasted long strings are truncated with no user signal, and a long visible historical name (e.g. "Seine Hochwohlgeboren Friedrich Wilhelm Heinrich Karl Ludwig von Hohenzollern-Sigmaringen…") loses its tail without explanation. WCAG 3.3.1 Error Identification calls for an honest signal when the system is silently transforming input.Reviewer rationale: Leonie #11068 (S-2) on PR #629 round 3.
Required
searchQuery.length >= 90, render a small inline hint below the input:text-xs text-ink-3 px-3 pb-2 font-sans(consistent with the dropdown's secondary copy).aria-describedbyon the<input>so screen readers announce it when focus is on the input.mentionConstants.tsnext toMAX_QUERY_LENGTH(e.g.MAX_QUERY_LENGTH_HINT_THRESHOLD = 90).MAX_QUERY_LENGTH - 10(i.e. 90) leaves a 10-char leading-edge buffer so the hint appears before the user can paste over the cap. Picking 99 would only warn after the silent truncation already happened; picking 50 would warn far too early for typical names.Acceptance
aria-describedbywired and validated via axe-core (or manual NVDA spot-check).length === 89→ hint absent;length === 95→ hint present + correct text).Depends on / interacts with
aria-controls/aria-activedescendant) — thearia-describedbyshould be a third ID on the input alongside whatever #636 wires.MAX_QUERY_LENGTH = 100clip (Nora #1 / PR #629).Out of scope
maxlength.Reviewer rationale: Leonie #11068 (S-2) on PR #629 round 3; threshold rationale per Elicit/Sara polish on PR #629 round 4.