From 25f48d66690c42b22ac3cdec83a32e185e69d112 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon Date: Wed, 17 Jun 2026 10:08:57 +0100 Subject: [PATCH 1/3] Keyboard help tweaks - Unify the Control modifier label on "Ctrl" (was a mix of "Ctrl" and "Control") with a "Control" aria-label so screen readers don't mangle "Ctrl" (which we've chosen for space). - Format the "Move anywhere" modifier as a key so it gets that label too. - Avoid showing the bare menu key for the context menu shortcut on Windows: prefer the first modifier-bearing shortcut (e.g. Ctrl+Enter) because not every keyboard has a menu key. The menu shortcut was new in v13. --- .../src/components/KeyboardControlsHelp.tsx | 14 +++++++++---- webapp/src/shortcut_formatting.ts | 21 +++++++++++++------ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/webapp/src/components/KeyboardControlsHelp.tsx b/webapp/src/components/KeyboardControlsHelp.tsx index 038078d8db0e..5fca36f97cb3 100644 --- a/webapp/src/components/KeyboardControlsHelp.tsx +++ b/webapp/src/components/KeyboardControlsHelp.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import * as Blockly from "blockly"; -import { getShortcutKeysShortAll, LIST_SHORTCUTS_SHORTCUT } from "../shortcut_formatting"; +import { CONTROL_KEY_SHORT, getShortcutKeysShortAll, LIST_SHORTCUTS_SHORTCUT } from "../shortcut_formatting"; const names = Blockly.ShortcutItems.names; const isMacPlatform = pxt.BrowserUtils.isMac(); @@ -10,10 +10,12 @@ const KeyboardControlsHelp = () => { React.useEffect(() => { ref.current?.focus() }, []); - const ctrl = lf("{id:keyboard symbol}Ctrl"); + const ctrl = CONTROL_KEY_SHORT; const cmd = isMacPlatform ? "⌘" : ctrl; const orAsJoiner = lf("or") const enterOrSpace = { shortcuts: getShortcutKeysShortAll(names.PERFORM_ACTION), joiner: orAsJoiner} + // Split around {0} so the modifier renders as a (for its aria-label). + const moveAnywhere = lf("Hold {0} and press arrow keys").split("{0}"); return (