Skip to content

Commit

Permalink
fix: change ARIA role from region to img for accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniciusCestarii committed Jun 20, 2024
1 parent d3d974f commit b15b918
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/visual/aria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default function ariaVisual(ecModel: GlobalModel, api: ExtensionAPI) {
}

if (labelModel.get('description')) {
dom.setAttribute('role', 'region');
dom.setAttribute('role', 'img');
dom.setAttribute('aria-label', labelModel.get('description'));
return;
}
Expand Down Expand Up @@ -242,7 +242,7 @@ export default function ariaVisual(ecModel: GlobalModel, api: ExtensionAPI) {
const endSeparator = separatorModel.get('end');
ariaLabel += seriesLabels.join(middleSeparator) + endSeparator;

dom.setAttribute('role', 'region');
dom.setAttribute('role', 'img');
dom.setAttribute('aria-label', ariaLabel);
}
}
Expand Down

0 comments on commit b15b918

Please sign in to comment.