diff --git a/packages/blockly/core/block_aria_composer.ts b/packages/blockly/core/block_aria_composer.ts index a87e35051..312554eac 100644 --- a/packages/blockly/core/block_aria_composer.ts +++ b/packages/blockly/core/block_aria_composer.ts @@ -308,7 +308,7 @@ export function getInputLabels( return inputsToLabel.map((input) => { const customLabel = useCustomLabels ? input.getAriaLabelText() : null; - return customLabel ?? input.getLabel(verbosity); + return customLabel ?? input.getLabel(verbosity, useCustomLabels); }); } diff --git a/packages/blockly/core/inputs/input.ts b/packages/blockly/core/inputs/input.ts index eb6acad0e..b00fb82d9 100644 --- a/packages/blockly/core/inputs/input.ts +++ b/packages/blockly/core/inputs/input.ts @@ -405,7 +405,7 @@ export class Input { * * @internal */ - getLabel(verbosity = Verbosity.STANDARD): string { + getLabel(verbosity = Verbosity.STANDARD, useCustomLabels = true): string { if (!this.isVisible()) return ''; const labels = computeFieldRowLabel(this, false, verbosity); @@ -414,7 +414,11 @@ export class Input { const childBlock = this.connection.targetBlock(); if (childBlock && !childBlock.isInsertionMarker()) { labels.push( - getInputLabels(childBlock as BlockSvg, verbosity).join(' '), + getInputLabels( + childBlock as BlockSvg, + verbosity, + useCustomLabels, + ).join(', '), ); } }