Repository navigation
fix(desktop): stop a read-only choice card promising a pick - #1623
Merged
Merged
Conversation
A reply may hold two `futureos-choice` fences, and only the last one is interactive — but the earlier card still printed "Pick one and it lands in the input" over rows that answered nothing, and only a `sr-only` span hinting it was stale told a screen-reader user apart. A button that looks pressable and isn't is the defect; the criterion that produced it is deterministic (the parsed card count), so it is fixed in the render layer rather than by asking the model to behave. - a card without an answer surface prints `choice.hint.readonly` instead of the answering hint, and so replaces the model's own `hint` (it describes picking too); the same sentence is what `aria-describedby` reads - the group says `aria-disabled`, and a read-only row drops `tabindex` rather than holding `-1`, which is out of the tab order but still takes focus from script - remove `choice.stale`: its only use was the sr-only span this replaces Docs: §2 said a sent card keeps a highlighted row. It does not — the answer is the tag on the user message, and backfilling the card would mean reading the message after it, a cross-entry timing dependency for a decorative effect. §2 now describes the behaviour, says why it is not built, and §3 gained the read-only subtitle rule next to the tolerance table. Tests assert text, `aria-disabled` and focus — never colour: a two-card body must leave the first card unbrowsable and unfocusable, and reverting either the criterion or the mobile subtitle turns them red.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
A reply can hold more than one
futureos-choicefence, and only the last card stays interactive; the earlier ones are read-only. Those read-only cards still printed the answering subtitle ("Pick one and it lands in the input") over rows that answer nothing, and only a screen-reader-only span hinted that they were stale. This branch makes a read-only card say so, removes the now-unusedchoice.stalestring, and corrects the design doc, which claimed a sent card keeps its chosen row highlighted (it does not — the answer is the tag on the user message).choice.hint.readonlyinstead of the answering hint (the model's ownhintis replaced too, since it also describes picking); the card carriesaria-disabledandaria-describedby; a read-only row dropstabindexinstead of holding-1.choice.staleis removed from the copy table.Commits
Verification
desktop:npx tsc --noEmitclean;npx eslinton the three changed TS/TSX files clean;npx vitest runonChoiceCard.test.tsxandMarkdownContent.test.tsx26 passed, and oni18n.test.ts/localeKeys.test.ts9 passed.mobile:npx tsc --noEmitclean;npx eslinton the changed files clean; fullnpx jest171 suites / 3239 tests passed.make check-docs: 421 docs checked OK, 0 pairs pending, provider matrix 13 rows.choice.stalein desktop, mobile or packages.ulimit -n 8192. The sharednode_moduleswas repaired from the committed lock withnpm cibefore testing (it was broken independently of this branch);package-lock.jsonis unchanged.User-visible changes
aria-disabledand out of the tab order. Before: the inert card advertised a pick. Revertefd0ce564.