Skip to content

Commit

Permalink
Merge pull request #20050 from ViniciusCestarii/aria-role
Browse files Browse the repository at this point in the history
feat: add role region to div tag when aria: true
  • Loading branch information
Ovilia authored Jun 24, 2024
2 parents 40c2870 + 64539fe commit 32eeb07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/visual/aria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ export default function ariaVisual(ecModel: GlobalModel, api: ExtensionAPI) {
return;
}

dom.setAttribute('role', 'img');

if (labelModel.get('description')) {
dom.setAttribute('aria-label', labelModel.get('description'));
return;
Expand Down

0 comments on commit 32eeb07

Please sign in to comment.