Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions packages/blockly/msg/json/en.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"@metadata": {
"author": "Ellen Spertus <ellen.spertus@gmail.com>",
"lastupdated": "2026-05-01 14:09:40.345417",
"lastupdated": "2026-05-05 15:35:14.081817",
"locale": "en",
"messagedocumentation" : "qqq"
},
Expand Down Expand Up @@ -426,7 +426,7 @@
"CUT_SHORTCUT": "Cut",
"COPY_SHORTCUT": "Copy",
"PASTE_SHORTCUT": "Paste",
"HELP_PROMPT": "Press %1 for help on keyboard controls",
"HELP_PROMPT": "Press %1 for help on keyboard controls.",
"SHORTCUTS_GENERAL": "General",
"SHORTCUTS_EDITING": "Editing",
"SHORTCUTS_CODE_NAVIGATION": "Code navigation",
Expand All @@ -451,8 +451,8 @@
"SHORTCUTS_DUPLICATE": "Duplicate",
"SHORTCUTS_CLEANUP": "Clean up workspace",
"SHORTCUTS_SHOW_TOOLTIP": "Show tooltip",
"KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT": "Hold %1 and use arrow keys to move freely, then %2 to accept the position",
"KEYBOARD_NAV_CONSTRAINED_MOVE_HINT": "Use the arrow keys to move, then %1 to accept the position",
"KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT": "Hold %1 and use arrow keys to move freely, then %2 to accept the position.",
"KEYBOARD_NAV_CONSTRAINED_MOVE_HINT": "Use the arrow keys to move, then %1 to accept the position.",
"KEYBOARD_NAV_COPIED_HINT": "Copied. Press %1 to paste.",
"KEYBOARD_NAV_CUT_HINT": "Cut. Press %1 to paste.",
"WORKSPACE_LABEL_1_STACK": "Blocks workspace. 1 stack of blocks",
Expand All @@ -464,8 +464,8 @@
"WORKSPACE_CONTENTS_BLOCKS_ZERO": "No blocks%2 in workspace.",
"WORKSPACE_CONTENTS_COMMENTS_MANY": " and %1 comments",
"WORKSPACE_CONTENTS_COMMENTS_ONE": " and one comment",
"KEYBOARD_NAV_BLOCK_NAVIGATION_HINT": "Use the right arrow key to navigate inside of blocks",
"KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT": "Use the arrow keys to navigate",
"KEYBOARD_NAV_BLOCK_NAVIGATION_HINT": "Use the right arrow key to navigate inside of blocks.",
"KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT": "Use the arrow keys to navigate.",
"BLOCK_LABEL_BEGIN_STACK": "Begin stack",
"BLOCK_LABEL_BEGIN_PREFIX": "Begin %1",
"BLOCK_LABEL_TOOLBOX_CATEGORY": "%1 category",
Expand All @@ -479,13 +479,13 @@
"BLOCK_LABEL_VALUE": "value",
"BLOCK_LABEL_STACK_BLOCKS": "%1 stack blocks",
"INPUT_LABEL_INDEX": "input %1",
"ANNOUNCE_MOVE_WORKSPACE": "moving %1 on workspace",
"ANNOUNCE_MOVE_BEFORE": "moving %1 before %3",
"ANNOUNCE_MOVE_AFTER": "moving %1 after %3",
"ANNOUNCE_MOVE_INSIDE": "moving %1 inside %3 %4",
"ANNOUNCE_MOVE_AROUND": "moving %1 %2 around %3",
"ANNOUNCE_MOVE_TO": "moving %1 %2 to %3 %4",
"ANNOUNCE_MOVE_CANCELED": "Canceled movement",
"ANNOUNCE_MOVE_WORKSPACE": "Moving %1 on workspace.",
"ANNOUNCE_MOVE_BEFORE": "Moving %1 before %3.",
"ANNOUNCE_MOVE_AFTER": "Moving %1 after %3.",
"ANNOUNCE_MOVE_INSIDE": "Moving %1 inside %3 %4.",
"ANNOUNCE_MOVE_AROUND": "Moving %1 %2 around %3.",
"ANNOUNCE_MOVE_TO": "Moving %1 %2 to %3 %4.",
"ANNOUNCE_MOVE_CANCELED": "Canceled movement.",
"FIELD_LABEL_EMPTY": "empty",
"ARIA_TYPE_FIELD_INPUT": "input",
"ARIA_TYPE_FIELD_TEXT_INPUT": "text",
Expand Down
10 changes: 5 additions & 5 deletions packages/blockly/msg/json/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,11 @@
"BLOCK_LABEL_STACK_BLOCKS": "Accessibility label for a block that indicates it is a stack of two or more blocks.",
"INPUT_LABEL_INDEX": "Accessibility label for an unlabeled input that communicates its index on the block. \n\nParameters:\n* %1 - the index of the input, starting at 1",
"ANNOUNCE_MOVE_WORKSPACE": "ARIA live region message announcing a block is being moved on the workspace, without specifying a target location or specific movement direction.",
"ANNOUNCE_MOVE_BEFORE": "ARIA live region message announcing a block is being moved before another block \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks\n* %3 - the label of the target (neighbour) block \n\nExamples:\n* 'moving before repeat 10, times, do'\n* 'moving 2 stack blocks before repeat 10, times, do'",
"ANNOUNCE_MOVE_AFTER": "ARIA live region message announcing a block is being moved after another block \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks\n* %3 - the label of the target (neighbour) block \n\nExamples:\n* 'moving after repeat 10, times, do'\n* 'moving 2 stack blocks after repeat 10, times, do' \n* 'moving block A after Function block output'",
"ANNOUNCE_MOVE_INSIDE": "ARIA live region message announcing a block is being moved inside another block, optionally including connection-specific label for disambiguation.",
"ANNOUNCE_MOVE_AROUND": "ARIA live region message announcing a block is being moved around another block, optionally including connection-specific label for disambiguation. \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks \n* %2 - optional phrase describing the local connection label \n* %3 - the label of the target (neighbour) block \n\nExamples:\n* 'moving around print abc'\n* 'moving if, do else statement around print abc'",
"ANNOUNCE_MOVE_TO": "ARIA live region message announcing a block is being moved to a workspace location where the relationship is not specifically known. \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks \n* %2 - optional phrase describing the local connection label \n* %3 - the label of the target (neighbour) block or location \n* %4 - optional phrase describing the target connection label \n\nExamples:\n* 'moving to repeat 10, times, do'\n* 'moving 2 stack blocks else statement to repeat 10, times, do previous connection'",
"ANNOUNCE_MOVE_BEFORE": "ARIA live region message announcing a block is being moved before another block \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks\n* %3 - the label of the target (neighbour) block \n\nExamples:\n* 'Moving before repeat 10, times, do.'\n* 'Moving 2 stack blocks before repeat 10, times, do.'",
"ANNOUNCE_MOVE_AFTER": "ARIA live region message announcing a block is being moved after another block \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks\n* %3 - the label of the target (neighbour) block \n\nExamples:\n* 'Moving after repeat 10, times, do.'\n* 'Moving 2 stack blocks after repeat 10, times, do.'",
"ANNOUNCE_MOVE_INSIDE": "ARIA live region message announcing a block is being moved inside another block via vertical connection, optionally including connection-specific label for disambiguation.",
"ANNOUNCE_MOVE_AROUND": "ARIA live region message announcing a block is being moved around another block, optionally including connection-specific label for disambiguation. \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks \n* %2 - optional phrase describing the local connection label \n* %3 - the label of the target (neighbour) block \n\nExamples:\n* 'Moving around print abc.'\n* 'Moving if, do else statement around print abc.'",
"ANNOUNCE_MOVE_TO": "ARIA live region message announcing a block is being moved to a workspace location where the relationship is not specifically known. \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks \n* %2 - optional phrase describing the local connection label \n* %3 - the label of the target (neighbour) block or location \n* %4 - optional phrase describing the target connection label \n\nExamples:\n* 'Moving to repeat 10, times, do.'\n* 'Moving 2 stack blocks else statement to repeat 10, times, do previous connection.'",
"ANNOUNCE_MOVE_CANCELED": "ARIA live region message announcing a block movement has been canceled.",
"FIELD_LABEL_EMPTY": "Label for an empty field, used by screen readers to identify fields that have no content.",
"ARIA_TYPE_FIELD_INPUT": "ARIA type name for an input field, used by screen readers to identify the type of field.",
Expand Down
39 changes: 19 additions & 20 deletions packages/blockly/msg/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1708,7 +1708,7 @@ Blockly.Msg.COPY_SHORTCUT = 'Copy';
Blockly.Msg.PASTE_SHORTCUT = 'Paste';
/** @type {string} */
/// Alert message shown to prompt users to review available keyboard shortcuts.
Blockly.Msg.HELP_PROMPT = 'Press %1 for help on keyboard controls';
Blockly.Msg.HELP_PROMPT = 'Press %1 for help on keyboard controls.';
/** @type {string} */
/// shortcut list section header - Label for general purpose keyboard shortcuts.
Blockly.Msg.SHORTCUTS_GENERAL = 'General';
Expand Down Expand Up @@ -1786,10 +1786,10 @@ Blockly.Msg.SHORTCUTS_SHOW_TOOLTIP = 'Show tooltip';
/** @type {string} */
/// Message shown to inform users how to move blocks to arbitrary locations
/// with the keyboard.
Blockly.Msg.KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT = 'Hold %1 and use arrow keys to move freely, then %2 to accept the position';
Blockly.Msg.KEYBOARD_NAV_UNCONSTRAINED_MOVE_HINT = 'Hold %1 and use arrow keys to move freely, then %2 to accept the position.';
/** @type {string} */
/// Message shown to inform users how to move blocks with the keyboard.
Blockly.Msg.KEYBOARD_NAV_CONSTRAINED_MOVE_HINT = 'Use the arrow keys to move, then %1 to accept the position';
Blockly.Msg.KEYBOARD_NAV_CONSTRAINED_MOVE_HINT = 'Use the arrow keys to move, then %1 to accept the position.';
/** @type {string} */
/// Message shown when an item is copied in keyboard navigation mode.
Blockly.Msg.KEYBOARD_NAV_COPIED_HINT = 'Copied. Press %1 to paste.';
Expand Down Expand Up @@ -1839,10 +1839,10 @@ Blockly.Msg.WORKSPACE_CONTENTS_COMMENTS_MANY = ' and %1 comments';
Blockly.Msg.WORKSPACE_CONTENTS_COMMENTS_ONE = ' and one comment';
/** @type {string} */
/// Message shown when a user presses Enter with a navigable block focused.
Blockly.Msg.KEYBOARD_NAV_BLOCK_NAVIGATION_HINT = 'Use the right arrow key to navigate inside of blocks';
Blockly.Msg.KEYBOARD_NAV_BLOCK_NAVIGATION_HINT = 'Use the right arrow key to navigate inside of blocks.';
/** @type {string} */
/// Message shown when a user presses Enter with the workspace focused.
Blockly.Msg.KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT = 'Use the arrow keys to navigate';
Blockly.Msg.KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT = 'Use the arrow keys to navigate.';
/** @type {string} */
/// Part of an accessibility label for a block that indicates it is the first
/// block in the stack.
Expand Down Expand Up @@ -1902,44 +1902,43 @@ Blockly.Msg.INPUT_LABEL_INDEX = 'input %1';
/** @type {string} */
/// ARIA live region message announcing a block is being moved on the workspace, without specifying a target location or specific movement direction.
// \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks
// \n\nExamples:\n* "moving block A on workspace"\n* "moving 2 stack blocks on workspace"
Blockly.Msg.ANNOUNCE_MOVE_WORKSPACE = 'moving %1 on workspace';
// \n\nExamples:\n* "Moving block A on workspace."\n* "Moving 2 stack blocks on workspace."
Blockly.Msg.ANNOUNCE_MOVE_WORKSPACE = 'Moving %1 on workspace.';
/** @type {string} */
/// ARIA live region message announcing a block is being moved before another block
/// \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks\n* %3 - the label of the target (neighbour) block
/// \n\nExamples:\n* "moving before repeat 10, times, do"\n* "moving 2 stack blocks before repeat 10, times, do"
Blockly.Msg.ANNOUNCE_MOVE_BEFORE = 'moving %1 before %3';
/// \n\nExamples:\n* "Moving before repeat 10, times, do."\n* "Moving 2 stack blocks before repeat 10, times, do."
Blockly.Msg.ANNOUNCE_MOVE_BEFORE = 'Moving %1 before %3.';
/** @type {string} */
/// ARIA live region message announcing a block is being moved after another block
/// \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks\n* %3 - the label of the target (neighbour) block
/// \n\nExamples:\n* "moving after repeat 10, times, do"\n* "moving 2 stack blocks after repeat 10, times, do"
/// \n* "moving block A after Function block output"
Blockly.Msg.ANNOUNCE_MOVE_AFTER = 'moving %1 after %3';
/// \n\nExamples:\n* "Moving after repeat 10, times, do."\n* "Moving 2 stack blocks after repeat 10, times, do."
Blockly.Msg.ANNOUNCE_MOVE_AFTER = 'Moving %1 after %3.';
/** @type {string} */
/// ARIA live region message announcing a block is being moved inside another block, optionally including connection-specific label for disambiguation.
/// ARIA live region message announcing a block is being moved inside another block via vertical connection, optionally including connection-specific label for disambiguation.
// \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks
// \n* %3 - the label of the target (neighbour) block
// \n* %4 - optional phrase describing the target connection label
// \n\nExamples:\n* "moving inside if, do"\n* "moving 2 stack blocks inside if, do else statement"
Blockly.Msg.ANNOUNCE_MOVE_INSIDE = 'moving %1 inside %3 %4';
// \n\nExamples:\n* "Moving inside if, do."\n* "Moving 2 stack blocks inside if, do else statement."
Blockly.Msg.ANNOUNCE_MOVE_INSIDE = 'Moving %1 inside %3 %4.';
/** @type {string} */
/// ARIA live region message announcing a block is being moved around another block, optionally including connection-specific label for disambiguation.
/// \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks
/// \n* %2 - optional phrase describing the local connection label
/// \n* %3 - the label of the target (neighbour) block
/// \n\nExamples:\n* "moving around print abc"\n* "moving if, do else statement around print abc"
Blockly.Msg.ANNOUNCE_MOVE_AROUND = 'moving %1 %2 around %3';
/// \n\nExamples:\n* "Moving around print abc."\n* "Moving if, do else statement around print abc."
Blockly.Msg.ANNOUNCE_MOVE_AROUND = 'Moving %1 %2 around %3.';
/** @type {string} */
/// ARIA live region message announcing a block is being moved to a workspace location where the relationship is not specifically known.
/// \n\nParameters:\n* %1 - optional phrase describing the moving stack of blocks
/// \n* %2 - optional phrase describing the local connection label
/// \n* %3 - the label of the target (neighbour) block or location
/// \n* %4 - optional phrase describing the target connection label
/// \n\nExamples:\n* "moving to repeat 10, times, do"\n* "moving 2 stack blocks else statement to repeat 10, times, do previous connection"
Blockly.Msg.ANNOUNCE_MOVE_TO = 'moving %1 %2 to %3 %4';
/// \n\nExamples:\n* "Moving to repeat 10, times, do."\n* "Moving 2 stack blocks else statement to repeat 10, times, do previous connection."
Blockly.Msg.ANNOUNCE_MOVE_TO = 'Moving %1 %2 to %3 %4.';
/** @type {string} */
/// ARIA live region message announcing a block movement has been canceled.
Blockly.Msg.ANNOUNCE_MOVE_CANCELED = 'Canceled movement';
Blockly.Msg.ANNOUNCE_MOVE_CANCELED = 'Canceled movement.';
/** @type {string} */
/// Label for an empty field, used by screen readers to identify fields that have no content.
Blockly.Msg.FIELD_LABEL_EMPTY = 'empty';
Expand Down
31 changes: 15 additions & 16 deletions packages/blockly/tests/mocha/keyboard_movement_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ suite('Keyboard-driven movement', function () {
assert.equal(
toastSpy.args[0][1]['message'],
Blockly.utils.userAgent.MAC
? 'Hold ⌘ Command and use arrow keys to move freely, then Enter to accept the position'
: 'Hold Ctrl and use arrow keys to move freely, then Enter to accept the position',
? 'Hold ⌘ Command and use arrow keys to move freely, then Enter to accept the position.'
: 'Hold Ctrl and use arrow keys to move freely, then Enter to accept the position.',
);
sinon.assert.calledOnce(beepSpy);
beepSpy.restore();
Expand Down Expand Up @@ -1151,7 +1151,7 @@ suite('Keyboard-driven movement', function () {
Blockly.getFocusManager().focusNode(this.block1);
this.moveAndAssert(
startMove,
['moving', this.getBlockLabel(this.block1), 'on workspace'],
['Moving', this.getBlockLabel(this.block1), 'on workspace.'],
[],
);
cancelMove(this.workspace);
Expand All @@ -1166,9 +1166,9 @@ suite('Keyboard-driven movement', function () {

Blockly.getFocusManager().focusNode(this.block1);
this.moveAndAssert(startMoveStack, [
'moving',
'Moving',
'2 stack blocks',
'on workspace',
'on workspace.',
]);
cancelMove(this.workspace);
});
Expand All @@ -1181,10 +1181,9 @@ suite('Keyboard-driven movement', function () {

Blockly.getFocusManager().focusNode(this.block1);
startMove(this.workspace);

this.moveAndAssert(
moveRight,
['moving', 'before', this.getBlockLabel(block2)],
['Moving', 'before', this.getBlockLabel(block2)],
[this.getBlockLabel(this.block1)],
);

Expand All @@ -1201,7 +1200,7 @@ suite('Keyboard-driven movement', function () {
Blockly.getFocusManager().focusNode(block2);

this.moveAndAssert(startMove, [
'moving',
'Moving',
this.getBlockLabel(block2),
'after',
this.getBlockLabel(this.block1),
Expand All @@ -1223,7 +1222,7 @@ suite('Keyboard-driven movement', function () {
this.clock.tick(10);
this.moveAndAssert(
moveRight,
['moving', 'inside', this.getBlockLabel(parent)],
['Moving', 'inside', this.getBlockLabel(parent)],
[this.getBlockLabel(valueBlock)],
);

Expand All @@ -1241,7 +1240,7 @@ suite('Keyboard-driven movement', function () {

this.moveAndAssert(
moveRight,
['moving', 'around', this.getBlockLabel(this.block1)],
['Moving', 'around', this.getBlockLabel(this.block1)],
[
this.getBlockLabel(loop),
getInputLabelsSubset(loop, loop.getInput('DO')).join(', '),
Expand All @@ -1266,7 +1265,7 @@ suite('Keyboard-driven movement', function () {
this.moveAndAssert(
moveRight,
[
'moving',
'Moving',
getInputLabelsSubset(ifBlock, ifBlock.getInput('DO1')).join(', '),
'around',
this.getBlockLabel(this.block1),
Expand All @@ -1276,7 +1275,7 @@ suite('Keyboard-driven movement', function () {
this.moveAndAssert(
moveRight,
[
'moving',
'Moving',
getInputLabelsSubset(ifBlock, ifBlock.getInput('DO0')).join(', '),
'around',
this.getBlockLabel(this.block1),
Expand All @@ -1300,7 +1299,7 @@ suite('Keyboard-driven movement', function () {
this.moveAndAssert(
moveRight,
[
'moving',
'Moving',
'inside',
this.getBlockLabel(compare),
getInputLabelsSubset(compare, compare.getInput('A')).join(', '),
Expand All @@ -1310,7 +1309,7 @@ suite('Keyboard-driven movement', function () {
this.moveAndAssert(
moveRight,
[
'moving',
'Moving',
'inside',
this.getBlockLabel(compare),
getInputLabelsSubset(compare, compare.getInput('B')).join(', '),
Expand All @@ -1336,12 +1335,12 @@ suite('Keyboard-driven movement', function () {
this.clock.tick(10);
this.moveAndAssert(
moveRight,
['moving', 'inside', this.getBlockLabel(textJoin), 'input 2'],
['Moving', 'inside', this.getBlockLabel(textJoin), 'input 2'],
[this.getBlockLabel(text)],
);
this.moveAndAssert(
moveRight,
['moving', 'inside', this.getBlockLabel(textJoin), 'input 3'],
['Moving', 'inside', this.getBlockLabel(textJoin), 'input 3'],
[this.getBlockLabel(text)],
);

Expand Down