aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorBenoît Burgener <benoit.burgener@gmail.com>2020-02-25 10:46:31 +0100
committerBenoît Burgener <benoit.burgener@gmail.com>2020-02-25 10:46:31 +0100
commitbc8a25d0da8720878fbb845b08e1f8170c3d24f5 (patch)
treece98b6c9b793e096716d1efff83bec4bc0d51c99 /src/js
parent29e62a1e4fb14b5aecbff70301b0337b51a9a5d6 (diff)
downloadplyr-bc8a25d0da8720878fbb845b08e1f8170c3d24f5.tar.lz
plyr-bc8a25d0da8720878fbb845b08e1f8170c3d24f5.tar.xz
plyr-bc8a25d0da8720878fbb845b08e1f8170c3d24f5.zip
Completely hide SVG icons to screen readers
SVG icons should be ignored by screen readers since they have complimentary labels (aria-label or plyr__sr-only). The current « presentation » role simply makes the element behave like a « span » which is incorrect, aria-hidden prevents screen readers from taking care of these elements at all.
Diffstat (limited to 'src/js')
-rw-r--r--src/js/controls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/controls.js b/src/js/controls.js
index 66ec7139..37df497f 100644
--- a/src/js/controls.js
+++ b/src/js/controls.js
@@ -111,7 +111,7 @@ const controls = {
setAttributes(
icon,
extend(attributes, {
- role: 'presentation',
+ 'aria-hidden': 'true',
focusable: 'false',
}),
);