From f35f4d8aec70aedc38ec814fc69f30aa84bde9e7 Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Fri, 5 Dec 2025 13:28:37 -0800 Subject: [PATCH] feat: Use custom ARIA roledescriptions for different block types (#9507) * feat: Use custom ARIA roledescriptions for different block types * fix: Denote shadow blocks in the label rather than role description --- core/block_svg.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/block_svg.ts b/core/block_svg.ts index f40f661cb..1a263f702 100644 --- a/core/block_svg.ts +++ b/core/block_svg.ts @@ -274,6 +274,9 @@ export class BlockSvg if (this.isCollapsed()) { labelComponents.push('collapsed'); } + if (this.isShadow()) { + labelComponents.push('replaceable'); + } if (inputCount > 1) { labelComponents.push('has inputs'); @@ -307,9 +310,7 @@ export class BlockSvg * @returns The ARIA roledescription for this block. */ protected getAriaRoleDescription() { - if (this.isShadow()) { - return 'replaceable block'; - } else if (this.outputConnection) { + if (this.outputConnection) { return 'value block'; } else if (this.statementInputCount) { return 'container block';