Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font icons should be hidden from assistive technology (screen readers) #3982

Closed
OwenEdwards opened this issue Jan 26, 2017 · 0 comments
Closed
Assignees
Labels
a11y This item might affect the accessibility of the player

Comments

@OwenEdwards
Copy link
Member

Description

The font icons are inserted into the page using special characters in the CSS, e.g.:

.vjs-icon-play:before, .video-js .vjs-big-play-button:before, .video-js .vjs-play-control:before {
    content: "\f101";
}

giving:

<button class="vjs-play-control vjs-control vjs-button vjs-paused" type="button" aria-live="polite" title="Play" aria-disabled="false">
    <!-- Icon is inserted here in the DOM -->
    <span class="vjs-control-text">Play</span>
</button>

Screen readers include the \f101 character in the name of the button, together with the vjs-control-text. No problems have been reported with this yet, but the extra character can be seen, for example, with VoiceOver on macOS, which displays the spoken text on the screen. This extra character will also be displayed on Refreshable Braille Displays, and could cause confusion.

Recommendation

The font icon should be inserted in a <span aria-hidden="true"></span> inside the control, so that the special character is hidden from screen readers as purely decorative.

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

v5.15

browsers

Browser and screen readers including IE11 & JAWS18, Firefox & NVDA, Safari & VoiceOver

OSes

Windows 7, macOS

plugins

no.

@OwenEdwards OwenEdwards added the a11y This item might affect the accessibility of the player label Jan 26, 2017
gkatsev added a commit that referenced this issue Jan 26, 2017
Unfortunately, we lose the ball but potentially will be fixed if we address #3982
@gkatsev gkatsev self-assigned this Jan 31, 2017
gkatsev added a commit that referenced this issue Jan 31, 2017
Wrap font-icons in a span with aria-hidden=true on it.

Fixes #3982.
gkatsev added a commit that referenced this issue Feb 1, 2017
Wrap font-icons in a span with aria-hidden=true on it.

Fixes #3982.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This item might affect the accessibility of the player
Projects
None yet
Development

No branches or pull requests

2 participants