fix: Block labels should not use custom input labels (nested inputs) (#9916)

* fix: Block labels should not use custom input labels (nested inputs)

* Join inputs with comma
This commit is contained in:
Robert Knight
2026-05-21 14:27:31 +01:00
committed by GitHub
parent d4930b4540
commit d03f848671
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -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);
});
}
+6 -2
View File
@@ -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(', '),
);
}
}