diff --git a/core/flyout_base.ts b/core/flyout_base.ts index 7caf98c9b..8d4264f46 100644 --- a/core/flyout_base.ts +++ b/core/flyout_base.ts @@ -338,6 +338,9 @@ export abstract class Flyout init(targetWorkspace: WorkspaceSvg) { this.targetWorkspace = targetWorkspace; this.workspace_.targetWorkspace = targetWorkspace; + if (this.targetWorkspace.isMutator) { + aria.setRole(this.workspace_.getFocusableElement(), aria.Role.GENERIC); + } this.workspace_.scrollbar = new ScrollbarPair( this.workspace_, diff --git a/core/utils/aria.ts b/core/utils/aria.ts index 84d4e2312..64d1bf143 100644 --- a/core/utils/aria.ts +++ b/core/utils/aria.ts @@ -54,6 +54,7 @@ export enum Role { COMBOBOX = 'combobox', SPINBUTTON = 'spinbutton', REGION = 'region', + GENERIC = 'generic', } /** diff --git a/core/workspace_svg.ts b/core/workspace_svg.ts index e09618bb9..b919fa5c7 100644 --- a/core/workspace_svg.ts +++ b/core/workspace_svg.ts @@ -762,14 +762,19 @@ export class WorkspaceSvg }); let ariaLabel = null; + let role: aria.Role | null = null; if (this.isFlyout) { ariaLabel = 'Flyout'; + // Default to region, but this may change during flyout initialization. + role = aria.Role.REGION; } else if (this.isMutator) { ariaLabel = 'Mutator Workspace'; + role = aria.Role.GENERIC; } else { ariaLabel = Msg['WORKSPACE_ARIA_LABEL']; + role = aria.Role.REGION; } - aria.setRole(this.svgGroup_, aria.Role.REGION); + aria.setRole(this.svgGroup_, role); aria.setState(this.svgGroup_, aria.State.LABEL, ariaLabel); // Note that a alone does not receive mouse events--it must have a