From 017a4ce9fd8520b8395e252bf0926b547e418a39 Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Wed, 3 Dec 2025 10:46:38 -0800 Subject: [PATCH] fix: Don't include count of inputs in block ARIA label (#9502) * fix: Don't include count of inputs in block ARIA label * fix: Handle single input case --- core/block_svg.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/block_svg.ts b/core/block_svg.ts index b90e101a1..fa6c55160 100644 --- a/core/block_svg.ts +++ b/core/block_svg.ts @@ -244,9 +244,12 @@ export class BlockSvg private computeAriaLabel(): string { const {commaSeparatedSummary, inputCount} = buildBlockSummary(this); - const inputSummary = inputCount - ? ` ${inputCount} ${inputCount > 1 ? 'inputs' : 'input'}` - : ''; + let inputSummary = ''; + if (inputCount > 1) { + inputSummary = 'has inputs'; + } else if (inputCount === 1) { + inputSummary = 'has input'; + } let blockTypeText = 'block'; if (this.isShadow()) { @@ -288,7 +291,7 @@ export class BlockSvg let additionalInfo = blockTypeText; if (inputSummary) { - additionalInfo = `${additionalInfo} with ${inputSummary}`; + additionalInfo = `${additionalInfo}, ${inputSummary}`; } return prefix + commaSeparatedSummary + ', ' + additionalInfo;