Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions core/flyout_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down
1 change: 1 addition & 0 deletions core/utils/aria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export enum Role {
COMBOBOX = 'combobox',
SPINBUTTON = 'spinbutton',
REGION = 'region',
GENERIC = 'generic',
}

/**
Expand Down
7 changes: 6 additions & 1 deletion core/workspace_svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <g> alone does not receive mouse events--it must have a
Expand Down
Loading