Repository navigation
Add digit shortcuts for clarify card answers - #3307
Merged
Merged
Conversation
Every answer on a clarify, permission or confirmation card now carries its number in a small square at the button's right edge, and typing that digit picks it. These cards interrupt a run and are usually settled with one click, so the keyboard is the faster path. The number lives in a data attribute that the stylesheet draws through ::after, not in the button's text. A card restored from saved chat HTML sends its own label back as the answer, so a digit inside that text would change what WebBrain receives. The empty alt text after the slash keeps the digit out of the button's accessible name, and aria-keyshortcuts announces the shortcut instead. A digit only counts as a shortcut where nothing else claims the keyboard: no focus, the composer, or the card itself, and only while that field is empty. Someone typing "2 pages please" into the composer keeps the character, and so does an answer that starts with a digit in the card's own field. The handler clicks the button instead of answering directly, so a permission card's label bookkeeping and a scheduled card's tab still go through one path. The skip-all-prompts button is not an answer and gets no number. The help panel's shortcut list gained the line in all 23 languages, and the lists that had drifted are back in step with en.js. Fifteen locales advertised Ctrl/Cmd+M for voice input, which neither build has a handler for, and left out Escape, which both of them do. Dutch held a "..." placeholder where the list belongs, and the Firefox German list claimed a second Escape stops a recording, which only Chrome can do. test/clarify-option-shortcuts.mjs runs the real card renderer, the real submit path and the keydown handler in Chromium and Firefox: the numbering, the square drawn from the attribute, the answer a digit sends, and the two cases where the digit stays text. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Number the answers on clarify cards and answer them with a digit
|
@esokullu is attempting to deploy a commit to the esokullu's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
No description provided.