Skip to content

Commit 0506479

Browse files
authored
fix: Refer to connections as positions in ARIA descriptions (#9509)
1 parent 80660bd commit 0506479

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/rendered_connection.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ export class RenderedConnection
335335
if (highlightSvg) {
336336
highlightSvg.style.display = '';
337337
aria.setRole(highlightSvg, aria.Role.FIGURE);
338-
aria.setState(highlightSvg, aria.State.ROLEDESCRIPTION, 'Connection');
338+
const connectionType =
339+
this.type === ConnectionType.INPUT_VALUE ? 'value' : 'statement';
340+
const roleDescription = `${connectionType} block position`;
341+
aria.setState(highlightSvg, aria.State.ROLEDESCRIPTION, roleDescription);
339342
if (this.type === ConnectionType.NEXT_STATEMENT) {
340343
const parentInput =
341344
this.getParentInput() ??
@@ -359,7 +362,7 @@ export class RenderedConnection
359362
`${this.getParentInput()?.getFieldRowLabel()}`,
360363
);
361364
} else {
362-
aria.setState(highlightSvg, aria.State.LABEL, 'Open connection');
365+
aria.setState(highlightSvg, aria.State.LABEL, 'Empty');
363366
}
364367
}
365368
}

0 commit comments

Comments
 (0)