Skip to content

Commit

Permalink
fix: add role fallback value for legend (#702)
Browse files Browse the repository at this point in the history
Co-authored-by: Fei <[email protected]>
  • Loading branch information
Fei Z and Fei authored Jul 13, 2020
1 parent a5a3a99 commit e272d3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components/essentials/legend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Legend extends Component {
render() {
const svg = this.getContainerSVG().attr(
"role",
Roles.GRAPHICS_DOCUMENT
`${Roles.GRAPHICS_DOCUMENT} ${Roles.DOCUMENT}`,
);
const options = this.model.getOptions();
const legendOptions = Tools.getProperty(options, "legend");
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/interfaces/a11y.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export enum Roles {
GRAPHICS_DOCUMENT = "graphics-document",
GRAPHICS_OBJECT = "graphics-object",
GRAPHICS_SYMBOL = "graphics-symbol",
GROUP = "group"
GROUP = "group",
DOCUMENT = "document"
}

0 comments on commit e272d3e

Please sign in to comment.