Skip to content

Commit 1998e7e

Browse files
authored
[4.0] svg logo [a11y] (#32202)
Due to some "bugs" in some screenreaders and browsers and how they handle svg it is recommended to set them to focusable=false and ensure they have the correct role.
1 parent f821cc8 commit 1998e7e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build/media_source/templates/atum/js/template.es6.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
svg.setAttribute('viewBox', `0 0 ${svg.getAttribute('height')} ${svg.getAttribute('width')}`);
104104
}
105105

106+
// SVG needs to have a role of presentation and focusable set to false
107+
svg.setAttribute('role', 'presentation');
108+
svg.setAttribute('focusable', 'false');
109+
106110
// Replace image with new SVG
107111
img.parentElement.replaceChild(svg, img);
108112
},

0 commit comments

Comments
 (0)