Conversation
Apple keyboards label the modifier option, not alt, so "Alt+Enter" on the Your turn is done button and in the turn status line names a key a candidate on a Mac cannot find. The chord itself already works there, since Option sets altKey, so only the label was missing a reader. The Run tests button already names both platforms' chords, and this follows it, spelled as a word so that both halves of the hint read alike.
c124420 to
c375f30
Compare
| class="pill-button" | ||
| type="button" | ||
| title="Alt+Enter" | ||
| title="Alt+Enter / Option+Enter" |
There was a problem hiding this comment.
The commit says this follows Run tests, but that button shows the Mac chord as the Command sign with no plus (⌘Enter). To match it, this would show the Option sign the same way (⌥Enter), written as the entity ⌥ like Run tests does, so the file stays ASCII. Otherwise the toolbar names Mac chords two different ways.
| <p id="turn-status" class="muted small" role="status"> | ||
| Take your time. Choose Your turn is done (Alt+Enter) to let Jim | ||
| reply early. | ||
| Take your time. Choose Your turn is done (Alt+Enter / Option+Enter) |
There was a problem hiding this comment.
#turn-status is role="status", so a screen reader reads both chords aloud each time Thinking toggles, and a Windows user hears about an Option key they don't have. A tooltip can list both chords, but a live region should name only the one for the platform it's running on.
| nodes.turnStatus.textContent = thinking | ||
| ? "Jim will wait. Speak again or choose Continue when ready. The timer keeps running." | ||
| : "Take your time. Choose Your turn is done (Alt+Enter) to let Jim reply early."; | ||
| : "Take your time. Choose Your turn is done (Alt+Enter / Option+Enter) to let Jim reply early."; |
There was a problem hiding this comment.
This sentence now lives in two places: here and in the initial copy in interview.html. The chord also appears a third time, in the button title. This PR had to edit all three in step, and the test pins each one separately. Could the page set the initial status from JS so the sentence has one source?
| assert.match(attributes, /aria-keyshortcuts="Alt\+Enter"/); | ||
| // Apple keyboards print the modifier as option, not alt, so the tooltip | ||
| // has to name both spellings or the hint points at no key on a Mac. | ||
| assert.match(attributes, /title="Alt\+Enter \/ Option\+Enter"/); |
There was a problem hiding this comment.
These assertions compare each label to a literal, not to the handler. If isYieldShortcut changes its chord, the labels go stale and this still passes. Exporting the label from lib.js next to isYieldShortcut and building all three strings from it would tie the label to what the handler matches.
The Your turn is done button and the turn status line both name the shortcut as Alt+Enter. A US Apple keyboard prints that modifier as option, never as alt, so a candidate on a Mac reads a hint for a key their keyboard does not have, and the control looks mouse-only.
The chord itself needs no change: Option sets altKey, so isYieldShortcut already accepts it. Only the label was missing a reader.
The Run tests button already names both platforms' chords, so this follows that precedent rather than inventing a second convention. It spells the modifier out instead of reaching for the option glyph, so both halves of the hint read alike. aria-+Enter, the canonical ARIA token, which assistive technology maps to Option on macOS.
The test that alreadyw asserts the tooltip too, so dropping the Mac spelling fails the gate.
Summary by cubic
Labels the yield shortcut for Mac users. U.S. Apple keyboards print the modifier as option, not alt, so Alt+Enter alone pointed Mac candidates at a key they don't have. The tooltip and both turn status lines now list both spellings (Alt+Enter / Option+Enter). The chord itself already works on Mac since Option sets altKey, so only the label changed, and the tooltip test now asserts both spellings.
Written for commit c375f30. Summary will update on new commits.