From b2a266a22bf75c88bc9b52b0e51fcf0b585bbece Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Wed, 3 Dec 2025 09:49:31 -0800 Subject: [PATCH] fix: Remove count of child blocks from ARIA labels (#9503) --- core/block_svg.ts | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/core/block_svg.ts b/core/block_svg.ts index 50f76e50f..9475fad04 100644 --- a/core/block_svg.ts +++ b/core/block_svg.ts @@ -248,22 +248,6 @@ export class BlockSvg ? ` ${inputCount} ${inputCount > 1 ? 'inputs' : 'input'}` : ''; - let currentBlock: BlockSvg | null = null; - let nestedStatementBlockCount = 0; - - for (const input of this.inputList) { - if ( - input.connection && - input.connection.type === ConnectionType.NEXT_STATEMENT - ) { - currentBlock = input.connection.targetBlock() as BlockSvg | null; - while (currentBlock) { - nestedStatementBlockCount++; - currentBlock = currentBlock.getNextBlock(); - } - } - } - let blockTypeText = 'block'; if (this.isShadow()) { blockTypeText = 'replaceable block'; @@ -299,15 +283,8 @@ export class BlockSvg } let additionalInfo = blockTypeText; - if (inputSummary && !nestedStatementBlockCount) { + if (inputSummary) { additionalInfo = `${additionalInfo} with ${inputSummary}`; - } else if (nestedStatementBlockCount) { - const childBlockSummary = `${nestedStatementBlockCount} child ${nestedStatementBlockCount > 1 ? 'blocks' : 'block'}`; - if (inputSummary) { - additionalInfo = `${additionalInfo} with ${inputSummary} and ${childBlockSummary}`; - } else { - additionalInfo = `${additionalInfo} with ${childBlockSummary}`; - } } return prefix + blockSummary + ', ' + additionalInfo;