feat: Add custom input labels to built in blocks (#9902)

* feat: Add custom input labels to built in blocks

* feat: Add custom input labels to built in list blocks

* fix: replace 'command' with 'statement' in new translation docs

* fix: remove some labels
This commit is contained in:
Michael Harvey
2026-05-21 09:55:51 -04:00
committed by GitHub
parent d03f848671
commit 2b793a8784
11 changed files with 372 additions and 23 deletions
+48 -10
View File
@@ -48,11 +48,13 @@ export const blocks = createBlockDefinitionsFromJsonArray([
{
'type': 'input_value',
'name': 'ITEM',
'ariaLabelText': '%{BKY_INPUT_LABEL_LISTS_REPEAT_ITEM}',
},
{
'type': 'input_value',
'name': 'NUM',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_LISTS_REPEAT_NUM}',
},
],
'output': 'Array',
@@ -69,6 +71,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'LIST',
'check': 'Array',
'ariaLabelText': '%{BKY_INPUT_LABEL_LISTS_TO_CHANGE}',
},
],
'output': 'Array',
@@ -86,6 +89,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'VALUE',
'check': ['String', 'Array'],
'ariaLabelText': '%{BKY_INPUT_LABEL_LISTS_TO_CHECK}',
},
],
'output': 'Boolean',
@@ -102,6 +106,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'VALUE',
'check': ['String', 'Array'],
'ariaLabelText': '%{BKY_INPUT_LABEL_LISTS_TO_CHECK}',
},
],
'output': 'Number',
@@ -275,6 +280,12 @@ const LISTS_CREATE_WITH = {
for (let i = 0; i < this.itemCount_; i++) {
if (!this.getInput('ADD' + i)) {
const input = this.appendValueInput('ADD' + i).setAlign(Align.RIGHT);
input.setAriaLabelProvider(
Msg['INPUT_LABEL_LISTS_CREATE_WITH_ITEM'].replace(
'%1',
String(i + 1),
),
);
if (i === 0) {
input.appendField(Msg['LISTS_CREATE_WITH_INPUT_WITH']);
}
@@ -350,7 +361,8 @@ const LISTS_INDEXOF = {
this.setOutput(true, 'Number');
this.appendValueInput('VALUE')
.setCheck('Array')
.appendField(Msg['LISTS_INDEX_OF_INPUT_IN_LIST']);
.appendField(Msg['LISTS_INDEX_OF_INPUT_IN_LIST'])
.setAriaLabelProvider(Msg['INPUT_LABEL_LISTS_TO_CHECK']);
const operatorsDropdown = fieldRegistry.fromJson({
type: 'field_dropdown',
options: OPERATORS,
@@ -408,7 +420,8 @@ const LISTS_GETINDEX = {
);
this.appendValueInput('VALUE')
.setCheck('Array')
.appendField(Msg['LISTS_GET_INDEX_INPUT_IN_LIST']);
.appendField(Msg['LISTS_GET_INDEX_INPUT_IN_LIST'])
.setAriaLabelProvider(Msg['INPUT_LABEL_LISTS_TO_CHECK']);
this.appendDummyInput()
.appendField(modeMenu, 'MODE')
.appendField('', 'SPACE');
@@ -586,7 +599,9 @@ const LISTS_GETINDEX = {
this.removeInput('ORDINAL', true);
// Create either a value 'AT' input or a dummy input.
if (isAt) {
this.appendValueInput('AT').setCheck('Number');
this.appendValueInput('AT')
.setCheck('Number')
.setAriaLabelProvider(Msg['INPUT_LABEL_LISTS_POSITION']);
if (Msg['ORDINAL_NUMBER_SUFFIX']) {
this.appendDummyInput('ORDINAL').appendField(
Msg['ORDINAL_NUMBER_SUFFIX'],
@@ -629,7 +644,8 @@ const LISTS_SETINDEX = {
this.setStyle('list_blocks');
this.appendValueInput('LIST')
.setCheck('Array')
.appendField(Msg['LISTS_SET_INDEX_INPUT_IN_LIST']);
.appendField(Msg['LISTS_SET_INDEX_INPUT_IN_LIST'])
.setAriaLabelProvider(Msg['INPUT_LABEL_LISTS_TO_CHECK']);
const operationDropdown = fieldRegistry.fromJson({
type: 'field_dropdown',
options: MODE,
@@ -656,7 +672,9 @@ const LISTS_SETINDEX = {
);
this.appendDummyInput().appendField(menu, 'WHERE');
this.appendDummyInput('AT');
this.appendValueInput('TO').appendField(Msg['LISTS_SET_INDEX_INPUT_TO']);
this.appendValueInput('TO')
.appendField(Msg['LISTS_SET_INDEX_INPUT_TO'])
.setAriaLabelProvider(Msg['INPUT_LABEL_LISTS_VALUE_TO_SET']);
this.setInputsInline(true);
this.setPreviousStatement(true);
this.setNextStatement(true);
@@ -758,7 +776,9 @@ const LISTS_SETINDEX = {
this.removeInput('ORDINAL', true);
// Create either a value 'AT' input or a dummy input.
if (isAt) {
this.appendValueInput('AT').setCheck('Number');
this.appendValueInput('AT')
.setCheck('Number')
.setAriaLabelProvider(Msg['INPUT_LABEL_LISTS_POSITION']);
if (Msg['ORDINAL_NUMBER_SUFFIX']) {
this.appendDummyInput('ORDINAL').appendField(
Msg['ORDINAL_NUMBER_SUFFIX'],
@@ -802,7 +822,8 @@ const LISTS_GETSUBLIST = {
this.setStyle('list_blocks');
this.appendValueInput('LIST')
.setCheck('Array')
.appendField(Msg['LISTS_GET_SUBLIST_INPUT_IN_LIST']);
.appendField(Msg['LISTS_GET_SUBLIST_INPUT_IN_LIST'])
.setAriaLabelProvider(Msg['INPUT_LABEL_LISTS_TO_CHECK']);
const createMenu = (n: 1 | 2): FieldDropdown => {
const menu = fieldRegistry.fromJson({
type: 'field_dropdown',
@@ -895,7 +916,13 @@ const LISTS_GETSUBLIST = {
this.removeInput('ORDINAL' + n, true);
// Create either a value 'AT' input or a dummy input.
if (isAt) {
this.appendValueInput('AT' + n).setCheck('Number');
this.appendValueInput('AT' + n)
.setCheck('Number')
.setAriaLabelProvider(
n === 1
? Msg['INPUT_LABEL_LISTS_START_POSITION']
: Msg['INPUT_LABEL_LISTS_END_POSITION'],
);
if (Msg['ORDINAL_NUMBER_SUFFIX']) {
this.appendDummyInput('ORDINAL' + n).appendField(
Msg['ORDINAL_NUMBER_SUFFIX'],
@@ -948,6 +975,7 @@ blocks['lists_sort'] = {
'type': 'input_value',
'name': 'LIST',
'check': 'Array',
'ariaLabelText': Msg['INPUT_LABEL_LISTS_TO_CHANGE'],
},
],
'output': 'Array',
@@ -972,6 +1000,14 @@ blocks['lists_split'] = {
[Msg['LISTS_SPLIT_TEXT_FROM_LIST'], 'JOIN'],
],
});
const inputAriaLabelProvider = () => {
const mode = this.getFieldValue('MODE');
if (mode === 'SPLIT') {
return Msg['INPUT_LABEL_LISTS_LIST_FROM_TEXT'];
} else if (mode === 'JOIN') {
return Msg['INPUT_LABEL_LISTS_TEXT_FROM_LIST'];
}
};
if (!dropdown) throw new Error('field_dropdown not found');
dropdown.setValidator((newMode) => {
this.updateType_(newMode);
@@ -980,10 +1016,12 @@ blocks['lists_split'] = {
this.setStyle('list_blocks');
this.appendValueInput('INPUT')
.setCheck('String')
.appendField(dropdown, 'MODE');
.appendField(dropdown, 'MODE')
.setAriaLabelProvider(inputAriaLabelProvider);
this.appendValueInput('DELIM')
.setCheck('String')
.appendField(Msg['LISTS_SPLIT_WITH_DELIMITER']);
.appendField(Msg['INPUT_LABEL_LISTS_DELIMITER'])
.setAriaLabelProvider(Msg['INPUT_LABEL_LISTS_SPLIT_WITH_DELIMITER']);
this.setInputsInline(true);
this.setOutput(true, 'Array');
this.setTooltip(() => {
+4
View File
@@ -112,6 +112,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
{
'type': 'input_value',
'name': 'A',
'ariaLabelText': '%{BKY_INPUT_LABEL_VALUE_A}',
},
{
'type': 'field_dropdown',
@@ -128,6 +129,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
{
'type': 'input_value',
'name': 'B',
'ariaLabelText': '%{BKY_INPUT_LABEL_VALUE_B}',
},
],
'inputsInline': true,
@@ -145,6 +147,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'A',
'check': 'Boolean',
'ariaLabelText': '%{BKY_INPUT_LABEL_CONDITION_A}',
},
{
'type': 'field_dropdown',
@@ -158,6 +161,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'B',
'check': 'Boolean',
'ariaLabelText': '%{BKY_INPUT_LABEL_CONDITION_B}',
},
],
'inputsInline': true,
+7
View File
@@ -42,6 +42,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'TIMES',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_LOOP_TIMES}',
},
],
'message1': '%{BKY_CONTROLS_REPEAT_INPUT_DO} %1',
@@ -69,6 +70,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'value': 10,
'min': 0,
'precision': 1,
'ariaLabelText': '%{BKY_INPUT_LABEL_LOOP_TIMES}',
},
],
'message1': '%{BKY_CONTROLS_REPEAT_INPUT_DO} %1',
@@ -101,6 +103,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'BOOL',
'check': 'Boolean',
'ariaLabelText': '%{BKY_INPUT_LABEL_CONDITION}',
},
],
'message1': '%{BKY_CONTROLS_REPEAT_INPUT_DO} %1',
@@ -131,18 +134,21 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'name': 'FROM',
'check': 'Number',
'align': 'RIGHT',
'ariaLabelText': '%{BKY_INPUT_LABEL_LOOP_FROM}',
},
{
'type': 'input_value',
'name': 'TO',
'check': 'Number',
'align': 'RIGHT',
'ariaLabelText': '%{BKY_INPUT_LABEL_LOOP_TO}',
},
{
'type': 'input_value',
'name': 'BY',
'check': 'Number',
'align': 'RIGHT',
'ariaLabelText': '%{BKY_INPUT_LABEL_LOOP_BY}',
},
],
'message1': '%{BKY_CONTROLS_REPEAT_INPUT_DO} %1',
@@ -173,6 +179,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'LIST',
'check': 'Array',
'ariaLabelText': '%{BKY_INPUT_LABEL_LOOP_LIST}',
},
],
'message1': '%{BKY_CONTROLS_REPEAT_INPUT_DO} %1',
+15
View File
@@ -50,6 +50,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'A',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER_A}',
},
{
'type': 'field_dropdown',
@@ -86,6 +87,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'B',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER_B}',
},
],
'inputsInline': true,
@@ -121,6 +123,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'NUM',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER}',
},
],
'output': 'Number',
@@ -150,6 +153,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'NUM',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER}',
},
],
'output': 'Number',
@@ -192,6 +196,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'NUMBER_TO_CHECK',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER_TO_CHECK}',
},
{
'type': 'field_dropdown',
@@ -228,6 +233,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'DELTA',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_MATH_CHANGE_BY}',
},
],
'previousStatement': null,
@@ -255,6 +261,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'NUM',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER}',
},
],
'output': 'Number',
@@ -295,6 +302,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'LIST',
'check': 'Array',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER_LIST}',
},
],
'output': 'Number',
@@ -313,11 +321,13 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'DIVIDEND',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_MATH_DIVIDEND}',
},
{
'type': 'input_value',
'name': 'DIVISOR',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_MATH_DIVISOR}',
},
],
'inputsInline': true,
@@ -336,6 +346,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'VALUE',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_MATH_CONSTRAIN_VALUE}',
},
{
'type': 'input_value',
@@ -364,11 +375,13 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'FROM',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER_MIN}',
},
{
'type': 'input_value',
'name': 'TO',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER_MAX}',
},
],
'inputsInline': true,
@@ -397,11 +410,13 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'X',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER_ATAN2_X}',
},
{
'type': 'input_value',
'name': 'Y',
'check': 'Number',
'ariaLabelText': '%{BKY_INPUT_LABEL_NUMBER_ATAN2_Y}',
},
],
'inputsInline': true,
+5
View File
@@ -516,6 +516,7 @@ blocks['procedures_defnoreturn'] = {
const nameField = fieldRegistry.fromJson({
type: 'field_input',
text: initName,
ariaTypeName: Msg['ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE'],
}) as FieldTextInput;
nameField!.setValidator(Procedures.rename);
nameField.setSpellcheck(false);
@@ -564,6 +565,7 @@ blocks['procedures_defreturn'] = {
const nameField = fieldRegistry.fromJson({
type: 'field_input',
text: initName,
ariaTypeName: Msg['ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE'],
}) as FieldTextInput;
nameField.setValidator(Procedures.rename);
nameField.setSpellcheck(false);
@@ -682,6 +684,9 @@ const PROCEDURES_MUTATORARGUMENT = {
const field = new ProcedureArgumentField(
Procedures.DEFAULT_ARG,
this.validator_,
{
ariaTypeName: Msg['ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT'],
},
);
this.appendDummyInput()
+34 -6
View File
@@ -93,6 +93,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
{
'type': 'input_value',
'name': 'TEXT',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_APPEND}',
},
],
'previousStatement': null,
@@ -108,6 +109,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'VALUE',
'check': ['String', 'Array'],
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_CHECK}',
},
],
'output': 'Number',
@@ -123,6 +125,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'VALUE',
'check': ['String', 'Array'],
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_CHECK}',
},
],
'output': 'Boolean',
@@ -138,6 +141,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'VALUE',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_CHECK}',
},
{
'type': 'field_dropdown',
@@ -151,6 +155,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'FIND',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_FIND}',
},
],
'output': 'Number',
@@ -167,6 +172,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
'type': 'input_value',
'name': 'VALUE',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_CHECK}',
},
{
'type': 'field_dropdown',
@@ -239,7 +245,8 @@ const GET_SUBSTRING_BLOCK = {
this.setStyle('text_blocks');
this.appendValueInput('STRING')
.setCheck('String')
.appendField(Msg['TEXT_GET_SUBSTRING_INPUT_IN_TEXT']);
.appendField(Msg['TEXT_GET_SUBSTRING_INPUT_IN_TEXT'])
.setAriaLabelProvider(Msg['INPUT_LABEL_TEXT_TO_CHECK']);
const createMenu = (n: 1 | 2): FieldDropdown => {
const menu = fieldRegistry.fromJson({
type: 'field_dropdown',
@@ -321,7 +328,13 @@ const GET_SUBSTRING_BLOCK = {
this.removeInput('ORDINAL' + n, true);
// Create either a value 'AT' input or a dummy input.
if (isAt) {
this.appendValueInput('AT' + n).setCheck('Number');
this.appendValueInput('AT' + n)
.setCheck('Number')
.setAriaLabelProvider(
n === 1
? Msg['INPUT_LABEL_TEXT_START_POSITION']
: Msg['INPUT_LABEL_TEXT_END_POSITION'],
);
if (Msg['ORDINAL_NUMBER_SUFFIX']) {
this.appendDummyInput('ORDINAL' + n).appendField(
Msg['ORDINAL_NUMBER_SUFFIX'],
@@ -366,7 +379,8 @@ blocks['text_changeCase'] = {
options: OPERATORS,
}) as FieldDropdown,
'CASE',
);
)
.setAriaLabelProvider(Msg['INPUT_LABEL_TEXT_TO_CHANGE']);
this.setOutput(true, 'String');
this.setTooltip(Msg['TEXT_CHANGECASE_TOOLTIP']);
},
@@ -392,7 +406,8 @@ blocks['text_trim'] = {
options: OPERATORS,
}) as FieldDropdown,
'MODE',
);
)
.setAriaLabelProvider(Msg['INPUT_LABEL_TEXT_TO_CHANGE']);
this.setOutput(true, 'String');
this.setTooltip(Msg['TEXT_TRIM_TOOLTIP']);
},
@@ -485,7 +500,9 @@ blocks['text_prompt_ext'] = {
this.updateType_(newOp);
return undefined; // FieldValidators can't be void. Use option as-is.
});
this.appendValueInput('TEXT').appendField(dropdown, 'TYPE');
this.appendValueInput('TEXT')
.appendField(dropdown, 'TYPE')
.setAriaLabelProvider(Msg['INPUT_LABEL_TEXT_PROMPT_MESSAGE']);
this.setOutput(true, 'String');
this.setTooltip(() => {
return this.getFieldValue('TYPE') === 'TEXT'
@@ -552,11 +569,13 @@ blocks['text_count'] = {
'type': 'input_value',
'name': 'SUB',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_FIND}',
},
{
'type': 'input_value',
'name': 'TEXT',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_CHECK}',
},
],
'output': 'Number',
@@ -580,16 +599,19 @@ blocks['text_replace'] = {
'type': 'input_value',
'name': 'FROM',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_FIND}',
},
{
'type': 'input_value',
'name': 'TO',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_REPLACE}',
},
{
'type': 'input_value',
'name': 'TEXT',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_CHECK}',
},
],
'output': 'String',
@@ -613,6 +635,7 @@ blocks['text_reverse'] = {
'type': 'input_value',
'name': 'TEXT',
'check': 'String',
'ariaLabelText': '%{BKY_INPUT_LABEL_TEXT_TO_CHANGE}',
},
],
'output': 'String',
@@ -863,6 +886,9 @@ const JOIN_MUTATOR_MIXIN = {
for (let i = 0; i < this.itemCount_; i++) {
if (!this.getInput('ADD' + i)) {
const input = this.appendValueInput('ADD' + i).setAlign(Align.RIGHT);
input.setAriaLabelProvider(
Msg['INPUT_LABEL_TEXT_JOIN_ITEM'].replace('%1', (i + 1).toString()),
);
if (i === 0) {
input.appendField(Msg['TEXT_JOIN_TITLE_CREATEWITH']);
}
@@ -957,7 +983,9 @@ const CHARAT_MUTATOR_MIXIN = {
this.removeInput('ORDINAL', true);
// Create either a value 'AT' input or a dummy input.
if (isAt) {
this.appendValueInput('AT').setCheck('Number');
this.appendValueInput('AT')
.setCheck('Number')
.setAriaLabelProvider(Msg['INPUT_LABEL_TEXT_POSITION']);
if (Msg['ORDINAL_NUMBER_SUFFIX']) {
this.appendDummyInput('ORDINAL').appendField(
Msg['ORDINAL_NUMBER_SUFFIX'],
+1
View File
@@ -56,6 +56,7 @@ export const blocks = createBlockDefinitionsFromJsonArray([
{
'type': 'input_value',
'name': 'VALUE',
'ariaLabelText': '%{BKY_INPUT_LABEL_VARIABLES_SET}',
},
],
'previousStatement': null,
+49 -1
View File
@@ -1,7 +1,7 @@
{
"@metadata": {
"author": "Ellen Spertus <ellen.spertus@gmail.com>",
"lastupdated": "2026-05-20 15:01:32.744856",
"lastupdated": "2026-05-21 09:14:57.030592",
"locale": "en",
"messagedocumentation" : "qqq"
},
@@ -522,6 +522,52 @@
"INPUT_LABEL_STATEMENT": "statement position",
"INPUT_LABEL_END_STATEMENT": "End %1",
"INPUT_LABEL_EMPTY": "Empty",
"INPUT_LABEL_CONDITION": "condition",
"INPUT_LABEL_CONDITION_A": "first condition",
"INPUT_LABEL_CONDITION_B": "second condition",
"INPUT_LABEL_VALUE_A": "first value",
"INPUT_LABEL_VALUE_B": "second value",
"INPUT_LABEL_NUMBER": "number",
"INPUT_LABEL_NUMBER_A": "first number",
"INPUT_LABEL_NUMBER_B": "second number",
"INPUT_LABEL_NUMBER_TO_CHECK": "number to check",
"INPUT_LABEL_NUMBER_LIST": "list of numbers",
"INPUT_LABEL_MATH_DIVIDEND": "dividend",
"INPUT_LABEL_MATH_DIVISOR": "divisor",
"INPUT_LABEL_MATH_CHANGE_BY": "amount to change by",
"INPUT_LABEL_MATH_CONSTRAIN_VALUE": "number to constrain",
"INPUT_LABEL_NUMBER_MIN": "minimum",
"INPUT_LABEL_NUMBER_MAX": "maximum",
"INPUT_LABEL_NUMBER_ATAN2_X": "x coordinate",
"INPUT_LABEL_NUMBER_ATAN2_Y": "y coordinate",
"INPUT_LABEL_LOOP_TIMES": "number of times to repeat",
"INPUT_LABEL_LOOP_FROM": "starting number",
"INPUT_LABEL_LOOP_TO": "ending number",
"INPUT_LABEL_LOOP_BY": "increment",
"INPUT_LABEL_LOOP_LIST": "list to iterate over",
"INPUT_LABEL_TEXT_JOIN_ITEM": "value %1",
"INPUT_LABEL_TEXT_APPEND": "value to append",
"INPUT_LABEL_TEXT_TO_CHANGE": "text to change",
"INPUT_LABEL_TEXT_TO_CHECK": "text to check",
"INPUT_LABEL_TEXT_TO_FIND": "text to find",
"INPUT_LABEL_TEXT_TO_REPLACE": "text to replace",
"INPUT_LABEL_TEXT_POSITION": "letter position",
"INPUT_LABEL_TEXT_START_POSITION": "start position",
"INPUT_LABEL_TEXT_END_POSITION": "end position",
"INPUT_LABEL_TEXT_PROMPT_MESSAGE": "message",
"INPUT_LABEL_VARIABLES_SET": "value to set",
"INPUT_LABEL_LISTS_CREATE_WITH_ITEM": "value %1",
"INPUT_LABEL_LISTS_REPEAT_ITEM": "value to repeat",
"INPUT_LABEL_LISTS_REPEAT_NUM": "number of times to repeat",
"INPUT_LABEL_LISTS_TO_CHECK": "list to check",
"INPUT_LABEL_LISTS_VALUE_TO_SET": "value to set",
"INPUT_LABEL_LISTS_POSITION": "position within list",
"INPUT_LABEL_LISTS_START_POSITION": "start position",
"INPUT_LABEL_LISTS_END_POSITION": "end position",
"INPUT_LABEL_LISTS_LIST_FROM_TEXT": "text to split",
"INPUT_LABEL_LISTS_TEXT_FROM_LIST": "list to join",
"INPUT_LABEL_LISTS_DELIMITER": "delimiter",
"INPUT_LABEL_LISTS_TO_CHANGE": "list to change",
"ANNOUNCE_MOVE_WORKSPACE": "Moving %1 on workspace.",
"ANNOUNCE_MOVE_BEFORE": "Moving %1 before %2.",
"ANNOUNCE_MOVE_AFTER": "Moving %1 after %2.",
@@ -534,6 +580,8 @@
"ARIA_TYPE_FIELD_INPUT": "input",
"ARIA_TYPE_FIELD_TEXT_INPUT": "text",
"ARIA_TYPE_FIELD_NUMBER": "number",
"ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE": "function name",
"ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT": "input name",
"ARIA_TYPE_FIELD_DROPDOWN": "dropdown",
"ARIA_TYPE_FIELD_IMAGE": "image",
"ARIA_TYPE_FIELD_CHECKBOX": "checkbox",
+49 -1
View File
@@ -497,7 +497,7 @@
"WORKSPACE_CONTENTS_COMMENTS_ONE": "ARIA live region phrase appended when there is exactly one workspace comment.",
"KEYBOARD_NAV_BLOCK_NAVIGATION_HINT": "Message shown when a user presses Enter with a navigable block focused.",
"KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT": "Message shown when a user presses Enter with the workspace focused.",
"KEYBOARD_NAV_FLYOUT_LABEL_HINT": "Message shown when a user presses Enter with a flyout label (heading) focused.",
"KEYBOARD_NAV_FLYOUT_LABEL_HINT": "Message shown when a user presses Enter with a flyout label (heading) focused. Placeholder %1 is the keyboard shortcut for navigating to the next heading.",
"BLOCK_LABEL_BEGIN_STACK": "Part of an accessibility label for a block that indicates it is the first block in the stack.",
"BLOCK_LABEL_BEGIN_PREFIX": "Part of an accessibility label for a block that indicates it is the first block inside of a statement input. Placeholder corresponds to the parent statement input's accessibility label.",
"BLOCK_LABEL_TOOLBOX_CATEGORY": "Part of an accessibility label for a block that indicates its parent toolbox category. Placeholder corresponds to a category name, e.g. 'Logic' or 'Math'.",
@@ -516,6 +516,52 @@
"INPUT_LABEL_STATEMENT": "Accessibility label for an empty next connection that can hold a statement block. This should use the same language as the BLOCK_LABEL_STATEMENT string.",
"INPUT_LABEL_END_STATEMENT": "Accessibility label describing the last connection point inside a statement input. e.g. 'End if, true, do' where the 'if, true, do' is assembled from the statement input and calculated separately. \n\nParameters:\n* %1 - the label for the statement input that is ending.",
"INPUT_LABEL_EMPTY": "Accessibility label describing an empty connection point that doesn't meet any other criteria for getting a more specific connection label.",
"INPUT_LABEL_CONDITION": "Accessibility label for a single boolean input.",
"INPUT_LABEL_CONDITION_A": "Accessibility label for the first of two boolean inputs, separated by a logical operator.",
"INPUT_LABEL_CONDITION_B": "Accessibility label for the second of two boolean inputs, separated by a logical operator.",
"INPUT_LABEL_VALUE_A": "Accessibility label for the first of two value inputs, separated by a comparison operator.",
"INPUT_LABEL_VALUE_B": "Accessibility label for the second of two value inputs, separated by a comparison operator.",
"INPUT_LABEL_NUMBER": "Accessibility label for a single number input.",
"INPUT_LABEL_NUMBER_A": "Accessibility label for the first of two numbers inputs, separated by a mathematical operator.",
"INPUT_LABEL_NUMBER_B": "Accessibility label for the second of two numbers inputs, separated by a mathematical operator.",
"INPUT_LABEL_NUMBER_TO_CHECK": "Accessibility label for a single number input that will be checked, e.g. for being a prime number.",
"INPUT_LABEL_NUMBER_LIST": "Accessibility label for a list input that is used in mathematical operations such as sum, average, minimum, and maximum.",
"INPUT_LABEL_MATH_DIVIDEND": "Accessibility label for the first number in a division operation (dividend).",
"INPUT_LABEL_MATH_DIVISOR": "Accessibility label for the second number in a division operation (divisor).",
"INPUT_LABEL_MATH_CHANGE_BY": "Accessibility label for the amount to increment or decrement a variable by.",
"INPUT_LABEL_MATH_CONSTRAIN_VALUE": "Accessibility label for a number to be constrained within a range.",
"INPUT_LABEL_NUMBER_MIN": "Accessibility label for the lower bound of a constrained range.",
"INPUT_LABEL_NUMBER_MAX": "Accessibility label for the upper bound of a constrained range.",
"INPUT_LABEL_NUMBER_ATAN2_X": "Accessibility label for the x coordinate input used in a two-dimensional angle calculation.",
"INPUT_LABEL_NUMBER_ATAN2_Y": "Accessibility label for the y coordinate input used in a two-dimensional angle calculation.",
"INPUT_LABEL_LOOP_TIMES": "Accessibility label for the number input inside a loop block that indicates how many times the inner statements will be repeated.",
"INPUT_LABEL_LOOP_FROM": "Accessibility label for the number input inside a loop block that indicates how many times the inner statements will be repeated.",
"INPUT_LABEL_LOOP_TO": "Accessibility label for the number input inside a loop block that indicates how many times the inner statements will be repeated.",
"INPUT_LABEL_LOOP_BY": "Accessibility label for the number input inside a loop block that indicates how many times the inner statements will be repeated.",
"INPUT_LABEL_LOOP_LIST": "Accessibility label for the value input on a loop block that indicates the list that will be iterated over.",
"INPUT_LABEL_TEXT_JOIN_ITEM": "Accessibility label for a value input on a text_join block that will be concatenated together with other values to form a longer string.",
"INPUT_LABEL_TEXT_APPEND": "Accessibility label for a value to append to a variable as text.",
"INPUT_LABEL_TEXT_TO_CHANGE": "Accessibility label for text that will be used for text operations such as reversing, trimming, or changing case.",
"INPUT_LABEL_TEXT_TO_CHECK": "Accessibility label for text that will be used for text operations such as checking length or getting a character at a certain position.",
"INPUT_LABEL_TEXT_TO_FIND": "Accessibility label for text that will be used for text to search for within another text.",
"INPUT_LABEL_TEXT_TO_REPLACE": "Accessibility label for replacement text that will be used in a replace operation.",
"INPUT_LABEL_TEXT_POSITION": "Accessibility label for the position used to select a character from text.",
"INPUT_LABEL_TEXT_START_POSITION": "Accessibility label for the start position of a substring extraction.",
"INPUT_LABEL_TEXT_END_POSITION": "Accessibility label for the end position of a substring extraction.",
"INPUT_LABEL_TEXT_PROMPT_MESSAGE": "Accessibility label for prompt message text shown to the user.",
"INPUT_LABEL_VARIABLES_SET": "Accessibility label for a value to set a variable to.",
"INPUT_LABEL_LISTS_CREATE_WITH_ITEM": "Accessibility label for a value input on a list_create_with block that will be joined together with other values to form a list.",
"INPUT_LABEL_LISTS_REPEAT_ITEM": "Accessibility label for a value input on a list_repeat block that will be repeated multiple times to form a list.",
"INPUT_LABEL_LISTS_REPEAT_NUM": "Accessibility label for the number input on a list_repeat block that in",
"INPUT_LABEL_LISTS_TO_CHECK": "Accessibility label for a list that will be checked for a condition or value.",
"INPUT_LABEL_LISTS_VALUE_TO_SET": "Accessibility label for a value to set within a list.",
"INPUT_LABEL_LISTS_POSITION": "Accessibility label for a position within a list.",
"INPUT_LABEL_LISTS_START_POSITION": "Accessibility label for the starting position of a sublist extraction.",
"INPUT_LABEL_LISTS_END_POSITION": "Accessibility label for the ending position of a sublist extraction.",
"INPUT_LABEL_LISTS_LIST_FROM_TEXT": "Accessibility label for text that will be split into a list.",
"INPUT_LABEL_LISTS_TEXT_FROM_LIST": "Accessibility label for a list whose items will be joined into text.",
"INPUT_LABEL_LISTS_DELIMITER": "Accessibility label for text used to separate or join items in a list.",
"INPUT_LABEL_LISTS_TO_CHANGE": "Accessibility label for a list whose contents will be modified.",
"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* %2 - the label of the target (neighbour) block \n\nExamples:\n* 'Moving before repeat, 10, times, do.'\n* 'Moving print 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* %2 - 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.'",
@@ -528,6 +574,8 @@
"ARIA_TYPE_FIELD_INPUT": "ARIA type name for an input field, used by screen readers to identify the type of field.",
"ARIA_TYPE_FIELD_TEXT_INPUT": "ARIA type name for a text input field, used by screen readers to identify the type of field.",
"ARIA_TYPE_FIELD_NUMBER": "ARIA type name for a number field, used by screen readers to identify the type of field.",
"ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE": "ARIA type name for a text input field on a procedure definition block, used by screen readers to identify the type of field.",
"ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT": "ARIA type name for a text input field on an argument block, found inside the procedure definition mutator UI, used by screen readers to identify the type of field. Should match PROCEDURES_MUTATORARG_TITLE.",
"ARIA_TYPE_FIELD_DROPDOWN": "ARIA type name for a dropdown field, used by screen readers to identify the type of field.",
"ARIA_TYPE_FIELD_IMAGE": "ARIA type name of an image field, used by screen readers to identify the type of field.",
"ARIA_TYPE_FIELD_CHECKBOX": "ARIA type name of an checkbox field, used by screen readers to identify the type of field.",
+150 -1
View File
@@ -1959,7 +1959,7 @@ Blockly.Msg.KEYBOARD_NAV_BLOCK_NAVIGATION_HINT = 'Use %1 to navigate inside of b
/// Message shown when a user presses Enter with the workspace focused.
Blockly.Msg.KEYBOARD_NAV_WORKSPACE_NAVIGATION_HINT = 'Use the arrow keys to navigate.';
/** @type {string} */
/// Message shown when a user presses Enter with a flyout label (heading) focused.
/// Message shown when a user presses Enter with a flyout label (heading) focused. Placeholder %1 is the keyboard shortcut for navigating to the next heading.
Blockly.Msg.KEYBOARD_NAV_FLYOUT_LABEL_HINT = 'Use the arrow keys to navigate to a block, or press %1 to go to the next heading.';
/** @type {string} */
/// Part of an accessibility label for a block that indicates it is the first
@@ -2039,6 +2039,149 @@ Blockly.Msg.INPUT_LABEL_END_STATEMENT = 'End %1';
/// meet any other criteria for getting a more specific connection label.
Blockly.Msg.INPUT_LABEL_EMPTY = 'Empty';
/** @type {string} */
/// Accessibility label for a single boolean input.
Blockly.Msg.INPUT_LABEL_CONDITION = 'condition';
/** @type {string} */
/// Accessibility label for the first of two boolean inputs, separated by a logical operator.
Blockly.Msg.INPUT_LABEL_CONDITION_A = 'first condition';
/** @type {string} */
/// Accessibility label for the second of two boolean inputs, separated by a logical operator.
Blockly.Msg.INPUT_LABEL_CONDITION_B = 'second condition';
/** @type {string} */
/// Accessibility label for the first of two value inputs, separated by a comparison operator.
Blockly.Msg.INPUT_LABEL_VALUE_A = 'first value';
/** @type {string} */
/// Accessibility label for the second of two value inputs, separated by a comparison operator.
Blockly.Msg.INPUT_LABEL_VALUE_B = 'second value';
/** @type {string} */
/// Accessibility label for a single number input.
Blockly.Msg.INPUT_LABEL_NUMBER = 'number';
/** @type {string} */
/// Accessibility label for the first of two numbers inputs, separated by a mathematical operator.
Blockly.Msg.INPUT_LABEL_NUMBER_A = 'first number';
/** @type {string} */
/// Accessibility label for the second of two numbers inputs, separated by a mathematical operator.
Blockly.Msg.INPUT_LABEL_NUMBER_B = 'second number';
/** @type {string} */
/// Accessibility label for a single number input that will be checked, e.g. for being a prime number.
Blockly.Msg.INPUT_LABEL_NUMBER_TO_CHECK = 'number to check';
/** @type {string} */
/// Accessibility label for a list input that is used in mathematical operations such as sum, average, minimum, and maximum.
Blockly.Msg.INPUT_LABEL_NUMBER_LIST = 'list of numbers';
/** @type {string} */
/// Accessibility label for the first number in a division operation (dividend).
Blockly.Msg.INPUT_LABEL_MATH_DIVIDEND = 'dividend';
/** @type {string} */
/// Accessibility label for the second number in a division operation (divisor).
Blockly.Msg.INPUT_LABEL_MATH_DIVISOR = 'divisor';
/** @type {string} */
/// Accessibility label for the amount to increment or decrement a variable by.
Blockly.Msg.INPUT_LABEL_MATH_CHANGE_BY = 'amount to change by';
/** @type {string} */
/// Accessibility label for a number to be constrained within a range.
Blockly.Msg.INPUT_LABEL_MATH_CONSTRAIN_VALUE = 'number to constrain';
/** @type {string} */
/// Accessibility label for the lower bound of a constrained range.
Blockly.Msg.INPUT_LABEL_NUMBER_MIN = 'minimum';
/** @type {string} */
/// Accessibility label for the upper bound of a constrained range.
Blockly.Msg.INPUT_LABEL_NUMBER_MAX = 'maximum';
/** @type {string} */
/// Accessibility label for the x coordinate input used in a two-dimensional angle calculation.
Blockly.Msg.INPUT_LABEL_NUMBER_ATAN2_X = 'x coordinate';
/** @type {string} */
/// Accessibility label for the y coordinate input used in a two-dimensional angle calculation.
Blockly.Msg.INPUT_LABEL_NUMBER_ATAN2_Y = 'y coordinate';
/** @type {string} */
/// Accessibility label for the number input inside a loop block that indicates how many times the inner statements will be repeated.
Blockly.Msg.INPUT_LABEL_LOOP_TIMES = 'number of times to repeat';
/** @type {string} */
/// Accessibility label for the number input inside a loop block that indicates how many times the inner statements will be repeated.
Blockly.Msg.INPUT_LABEL_LOOP_FROM = 'starting number';
/** @type {string} */
/// Accessibility label for the number input inside a loop block that indicates how many times the inner statements will be repeated.
Blockly.Msg.INPUT_LABEL_LOOP_TO = 'ending number';
/** @type {string} */
/// Accessibility label for the number input inside a loop block that indicates how many times the inner statements will be repeated.
Blockly.Msg.INPUT_LABEL_LOOP_BY = 'increment';
/** @type {string} */
/// Accessibility label for the value input on a loop block that indicates the list that will be iterated over.
Blockly.Msg.INPUT_LABEL_LOOP_LIST = 'list to iterate over';
/** @type {string} */
/// Accessibility label for a value input on a text_join block that will be concatenated together with other values to form a longer string.
// \n\nParameters:\n* %1 - the index of the input, starting at 1
// \n\nExample:\n* "value 1" for the first value input, "value 2" for the second value input, etc.
Blockly.Msg.INPUT_LABEL_TEXT_JOIN_ITEM = 'value %1';
/** @type {string} */
/// Accessibility label for a value to append to a variable as text.
Blockly.Msg.INPUT_LABEL_TEXT_APPEND = 'value to append';
/** @type {string} */
/// Accessibility label for text that will be used for text operations such as reversing, trimming, or changing case.
Blockly.Msg.INPUT_LABEL_TEXT_TO_CHANGE = 'text to change';
/** @type {string} */
/// Accessibility label for text that will be used for text operations such as checking length or getting a character at a certain position.
Blockly.Msg.INPUT_LABEL_TEXT_TO_CHECK = 'text to check';
/** @type {string} */
/// Accessibility label for text that will be used for text to search for within another text.
Blockly.Msg.INPUT_LABEL_TEXT_TO_FIND = 'text to find';
/** @type {string} */
/// Accessibility label for replacement text that will be used in a replace operation.
Blockly.Msg.INPUT_LABEL_TEXT_TO_REPLACE = 'text to replace';
/** @type {string} */
/// Accessibility label for the position used to select a character from text.
Blockly.Msg.INPUT_LABEL_TEXT_POSITION = 'letter position';
/** @type {string} */
/// Accessibility label for the start position of a substring extraction.
Blockly.Msg.INPUT_LABEL_TEXT_START_POSITION = 'start position';
/** @type {string} */
/// Accessibility label for the end position of a substring extraction.
Blockly.Msg.INPUT_LABEL_TEXT_END_POSITION = 'end position';
/** @type {string} */
/// Accessibility label for prompt message text shown to the user.
Blockly.Msg.INPUT_LABEL_TEXT_PROMPT_MESSAGE = 'message';
/** @type {string} */
/// Accessibility label for a value to set a variable to.
Blockly.Msg.INPUT_LABEL_VARIABLES_SET = 'value to set';
/** @type {string} */
/// Accessibility label for a value input on a list_create_with block that will be joined together with other values to form a list.
// \n\nParameters:\n* %1 - the index of the input, starting at 1
// \n\nExample:\n* "value 1" for the first value input, "value 2" for the second value input, etc.
Blockly.Msg.INPUT_LABEL_LISTS_CREATE_WITH_ITEM = 'value %1';
/** @type {string} */
/// Accessibility label for a value input on a list_repeat block that will be repeated multiple times to form a list.
Blockly.Msg.INPUT_LABEL_LISTS_REPEAT_ITEM = 'value to repeat';
/** @type {string} */
/// Accessibility label for the number input on a list_repeat block that in
// dicates how many times the value will be repeated to form a list.
Blockly.Msg.INPUT_LABEL_LISTS_REPEAT_NUM = 'number of times to repeat';
/** @type {string} */
/// Accessibility label for a list that will be checked for a condition or value.
Blockly.Msg.INPUT_LABEL_LISTS_TO_CHECK = 'list to check';
/** @type {string} */
/// Accessibility label for a value to set within a list.
Blockly.Msg.INPUT_LABEL_LISTS_VALUE_TO_SET = 'value to set';
/** @type {string} */
/// Accessibility label for a position within a list.
Blockly.Msg.INPUT_LABEL_LISTS_POSITION = 'position within list';
/** @type {string} */
/// Accessibility label for the starting position of a sublist extraction.
Blockly.Msg.INPUT_LABEL_LISTS_START_POSITION = 'start position';
/** @type {string} */
/// Accessibility label for the ending position of a sublist extraction.
Blockly.Msg.INPUT_LABEL_LISTS_END_POSITION = 'end position';
/** @type {string} */
/// Accessibility label for text that will be split into a list.
Blockly.Msg.INPUT_LABEL_LISTS_LIST_FROM_TEXT = 'text to split';
/** @type {string} */
/// Accessibility label for a list whose items will be joined into text.
Blockly.Msg.INPUT_LABEL_LISTS_TEXT_FROM_LIST = 'list to join';
/** @type {string} */
/// Accessibility label for text used to separate or join items in a list.
Blockly.Msg.INPUT_LABEL_LISTS_DELIMITER = 'delimiter';
/** @type {string} */
/// Accessibility label for a list whose contents will be modified.
Blockly.Msg.INPUT_LABEL_LISTS_TO_CHANGE = 'list to change';
/** @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 if, do on workspace."\n* "Moving 2 stack blocks on workspace."
@@ -2092,6 +2235,12 @@ Blockly.Msg.ARIA_TYPE_FIELD_TEXT_INPUT = 'text';
/// ARIA type name for a number field, used by screen readers to identify the type of field.
Blockly.Msg.ARIA_TYPE_FIELD_NUMBER = 'number';
/** @type {string} */
/// ARIA type name for a text input field on a procedure definition block, used by screen readers to identify the type of field.
Blockly.Msg.ARIA_TYPE_FIELD_TEXT_INPUT_PROCEDURE = 'function name';
/** @type {string} */
/// ARIA type name for a text input field on an argument block, found inside the procedure definition mutator UI, used by screen readers to identify the type of field. Should match PROCEDURES_MUTATORARG_TITLE.
Blockly.Msg.ARIA_TYPE_FIELD_TEXT_INPUT_ARGUMENT = 'input name';
/** @type {string} */
/// ARIA type name for a dropdown field, used by screen readers to identify the type of field.
Blockly.Msg.ARIA_TYPE_FIELD_DROPDOWN = 'dropdown';
/** @type {string} */
@@ -1400,12 +1400,12 @@ suite('Keyboard-driven movement', function () {
this.clock.tick(10);
this.moveAndAssert(
moveRight,
['Moving', 'to', 'equals', 'input 1'],
['Moving', 'to', 'first value', 'equals'],
[this.getBlockLabel(boolean)],
);
this.moveAndAssert(
moveRight,
['Moving', 'to', 'equals', 'equals'],
['Moving', 'to', 'second value', 'equals'],
[this.getBlockLabel(boolean)],
);
@@ -1417,6 +1417,9 @@ suite('Keyboard-driven movement', function () {
textJoin.updateShape_();
textJoin.initSvg();
textJoin.render();
textJoin.inputList.forEach((input, index) => {
input.setAriaLabelProvider(null);
});
const text = this.workspace.newBlock('text');
text.initSvg();
text.render();
@@ -1438,10 +1441,13 @@ suite('Keyboard-driven movement', function () {
cancelMove(this.workspace);
});
test('ignores dummy inputs when disambiguating', function () {
test('ignores dummy inputs when disambiguating between unlabeled value inputs', function () {
const subListBlock = this.workspace.newBlock('lists_getSublist');
subListBlock.initSvg();
subListBlock.render();
subListBlock.inputList.forEach((input, index) => {
input.setAriaLabelProvider(null);
});
const mathBlock = this.workspace.newBlock('math_number');
mathBlock.initSvg();
mathBlock.render();
@@ -1477,7 +1483,7 @@ suite('Keyboard-driven movement', function () {
this.clock.tick(10);
this.moveAndAssert(
moveRight,
['Moving', 'to', 'input 1', 'equals'],
['Moving', 'to', 'first value', 'equals'],
[this.getBlockLabel(boolean)],
);
cancelMove(this.workspace);