Skip to content

Commit a2047cb

Browse files
author
Hiroaki KARASAWA
committed
style(runtime): set aria-hidden to true to the splite for the accessibility reason
The sprite is inserted immediately below the body element, but all elements immediately below the body must be either landmarks or insivible for the blind users. Please see this document for the detail. https://dequeuniversity.com/rules/axe/3.2/region?application=axeAPI
1 parent 85f07ca commit a2047cb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

runtime/browser-sprite.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ let sprite;
1111
if (isSpriteExists) {
1212
sprite = window[spriteGlobalVarName];
1313
} else {
14-
sprite = new BrowserSprite({ attrs: { id: spriteNodeId } });
14+
sprite = new BrowserSprite({
15+
attrs: {
16+
id: spriteNodeId,
17+
'aria-hidden': 'true'
18+
}
19+
});
1520
window[spriteGlobalVarName] = sprite;
1621
}
1722

0 commit comments

Comments
 (0)