videojs / video.js

Video.js - open source HTML5 video player
https://videojs.com
Other
37.51k stars 7.4k forks source link

Reset button text repeated by screenreader / assistive technology #7036

Open josephshanak opened 3 years ago

josephshanak commented 3 years ago

Description

During an accessibility audit of a project I work on that uses VideoJS we received the following feedback on the "reset button" in the caption settings dialog:

Button text for the reset button includes repeated text in the title. This can be tedious for users to navigate. Since the title repeats some information in the button text, it can be removed.

See https://github.com/videojs/video.js/blob/affc0611d978b1a6d02e443a46d14a58f2b1441c/src/js/tracks/text-track-settings.js#L461-L472

Change was introduced in #4050

Steps to reproduce

  1. Using a screenreader. Go to https://videojs.com/advanced/?video=elephantsdream
  2. Tab to the "CC" button. open the caption menu
  3. Tab to "Caption Settings". open the caption settings dialog
  4. Tab to "Reset". The text "restore all settings to default values" is read twice

Example using VoiceOver

Screen Shot 2021-01-12 at 4 13 26 AM Screen Shot 2021-01-12 at 4 14 40 AM
<button type="button" class="vjs-default-button" title="restore all settings to the default values">Reset<span class="vjs-control-text"> restore all settings to the default values</span></button>"

Results

Expected

<button type="button" class="vjs-default-button">Reset<span class="vjs-control-text"> restore all settings to the default values</span></button>"

Actual

The title attribute repeats the text of the button.

<button type="button" class="vjs-default-button" title="restore all settings to the default values">Reset<span class="vjs-control-text"> restore all settings to the default values</span></button>"

Error output

N/A

Additional Information

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

versions

videojs

Happens on 7.11.0 and 7.11.1 at least.

browsers

Firefox, Chrome.

OSes

Verified on MacBook Pro

plugins

Unsure

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.