Skip to content

Commit e272d3e

Browse files
Fei ZFei
Fei Z
and
Fei
authored
fix: add role fallback value for legend (#702)
Co-authored-by: Fei <[email protected]>
1 parent a5a3a99 commit e272d3e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: packages/core/src/components/essentials/legend.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class Legend extends Component {
2020
render() {
2121
const svg = this.getContainerSVG().attr(
2222
"role",
23-
Roles.GRAPHICS_DOCUMENT
23+
`${Roles.GRAPHICS_DOCUMENT} ${Roles.DOCUMENT}`,
2424
);
2525
const options = this.model.getOptions();
2626
const legendOptions = Tools.getProperty(options, "legend");

Diff for: packages/core/src/interfaces/a11y.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ export enum Roles {
22
GRAPHICS_DOCUMENT = "graphics-document",
33
GRAPHICS_OBJECT = "graphics-object",
44
GRAPHICS_SYMBOL = "graphics-symbol",
5-
GROUP = "group"
5+
GROUP = "group",
6+
DOCUMENT = "document"
67
}

0 commit comments

Comments
 (0)