Skip to content

Commit f35f4d8

Browse files
authored
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
1 parent ff6ca2e commit f35f4d8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/block_svg.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ export class BlockSvg
274274
if (this.isCollapsed()) {
275275
labelComponents.push('collapsed');
276276
}
277+
if (this.isShadow()) {
278+
labelComponents.push('replaceable');
279+
}
277280

278281
if (inputCount > 1) {
279282
labelComponents.push('has inputs');
@@ -307,9 +310,7 @@ export class BlockSvg
307310
* @returns The ARIA roledescription for this block.
308311
*/
309312
protected getAriaRoleDescription() {
310-
if (this.isShadow()) {
311-
return 'replaceable block';
312-
} else if (this.outputConnection) {
313+
if (this.outputConnection) {
313314
return 'value block';
314315
} else if (this.statementInputCount) {
315316
return 'container block';

0 commit comments

Comments
 (0)