Keyboard hints: a switch for the key badges, apart from the switch for the keys themselves #658
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#658
Loading…
Reference in a new issue
No description provided.
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?
From the maintainer's list, under User settings: “Enable/disable Basecoat's Kbd.” Read as: a person can turn the small key badges (Basecoat's
kbd, drawn as keycaps) on or off. Postulo already has a switch for the keys' behaviour; it has no switch for what tells somebody the keys exist, and hardly any badges to switch.What exists today
kbd.cssis imported (assets/css/app.css:33) and painted as a keycap (assets/css/basecoat.css:556-570, with dark variants).<kbd>is rendered in four lines:templates/jobs/capture_review.html:207-208and:212(a sentence of help under the review) andtemplates/server/design.html:107(the gallery).Ctrlor⌘withEntersaves and moves on,ddiscards and moves on,jskips (src/postulo/static/js/app.js:1098-1123, on the buttons markeddata-key-save-next,data-key-discard-nextanddata-key-next);/jumps to the search box (:1344-1366). The masthead's search over everything says it as text in its placeholder, “Search /”, only when shortcuts are on (src/postulo/templates/cotton/site_search.html:103) and sets noaria-keyshortcuts; the variant that narrows a page's table setsaria-keyshortcuts="/"when shortcuts are on (:78) and has no “/” in its placeholder.Profile.keyboard_shortcuts(accounts/models.py:336, default on) turns the single-key shortcuts off, which WCAG 2.1.4 requires at level A (#227); it is on Settings → Accessibility (src/postulo/accounts/forms.py:664-701,templates/settings/accessibility.html:31). Shortcuts with Ctrl are outside it and always work. The help sentence on the review tells the truth about it: it namesdandjonly while they work (capture_review.html:200-214).capture_review.html:173-197) carry no badge.keyboard_shortcutsand others are not in the archive.Checked against
mainatf09b6010b.Proposal
Profile.show_key_hints, default on, under Settings → Accessibility beside the behaviour switch, in whatever list of exported preferences #464 settles.Ctrl+Enter), Discard and next (d), Skip to the next (j), and the search box (/, replacing the text in its placeholder; the box over everything gains thearia-keyshortcutsthe table variant already has). Each badge isaria-hidden; the control carriesaria-keyshortcutswhether or not the badge is shown, so assistive technology is told either way, and a visible badge never becomes part of the control's accessible name.d,jor/, because a hint for a dead key is a lie (the sentence's own rule); theCtrl+Enterbadge follows the hint switch alone.Decisions
Ctrlor⌘. The server cannot tell the platform. Recommended: drawCtrl, and let the script that already handlesmetaKeyreplace it with⌘on Apple platforms, since a hint only matters where the script runs.msgid "Enter"does not collide with another use.Builds on
Issues #291 (kbd adopted), #281 (the Accessibility page), #227 (the switch), #464 (preferences in the archive).
Done when
tests/e2e/test_keyboard_and_focus.pyandtests/test_keyboard_and_focus.py(existing) gain: with hints on, the capture review's three buttons and the search box show their badge,aria-hidden, witharia-keyshortcutsset; with hints off there is no badge and the attribute is still there; with shortcuts off nod,jor/badge shows.tests/test_contrast.pyholds.kbdat 4.5:1 in both themes; axe is clean in both schemes on the review page.PROFILE_FIELDSgains a name; candidate format (4), API, search and the processing record are untouched. Strings (key names, the switch's label and help) in en-GB, fr-FR and pt-PT (drafts) and Weblate (#349); the wiki's Accessibility page, which names the switches.From the list of improvements of 2026-10-02.
Done in
98b2c1a65and89e73dafc(on main; CI green at15e6d7ee4). Settings → Accessibility has a separate switch for the key badges; the controls still announce their keys. Wiki: Accessibility page.