Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions packages/blockly/core/workspace_svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ export class WorkspaceSvg
);
} else {
// Main workspaces get labelled with how many stacks of blocks they contain
// This will be updated in a change listener, but set it here in case there are blocks in the initial state of the workspace
// This will be updated on focus, but set it here in case there are blocks in the initial state of the workspace
this.updateAriaLabel();
}
}
Expand Down Expand Up @@ -798,14 +798,6 @@ export class WorkspaceSvg

this.setInitialAriaContext();

if (!this.isFlyout && !this.isMutator) {
// Set up a change listener to update the aria label on main workspace
this.addChangeListener((e) => {
if (e.isUiEvent) return;
this.updateAriaLabel();
});
}

if (!this.isFlyout) {
browserEvents.conditionalBind(
this.svgGroup_,
Expand Down Expand Up @@ -2696,7 +2688,11 @@ export class WorkspaceSvg
}

/** See IFocusableNode.onNodeFocus. */
onNodeFocus(): void {}
onNodeFocus(): void {
if (!this.isFlyout && !this.isMutator) {
this.updateAriaLabel();
}
}

/** See IFocusableNode.onNodeBlur. */
onNodeBlur(): void {}
Expand Down
Loading