A11Y - Broken ARIA menu on Chapters and Closed Captions (Web Accessibility)
#7,688 创建于 2022年3月22日
描述
Description
WAVE Accessibility Tester and This example official video.js page: https://videojs.com/city or wherever video.js is loaded
brings up a Broken ARIA menu "Error" on the following hidden player options if they are not used (no chapters added or no CC added etc.).
- Chapters
- Closed Captions
-
Maybe Captions or CC related ul tags(vjs-menu-content) shouldn't be appended to the video.js div(vjs-menu) if they are not used?
-
or as a second option?
role=menuattribute shouldn't be added to the "vjs-menu" div's "vjs-menu-content" ul tag if the "unordered list(ul tag)" doesn't have any children(when there are no captions or no chapters added)
Considering 90% of the time people don't add Chapters or Closed Captions. This accessibility error shows up almost all the time on all video.js instances.
Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
- Go to https://videojs.com/city
- Activate WAVE Accessibility Tester (WAVE Chrome Plugin can be used to test this error)
- Broken ARIA Menus are visible and can be seen/reproducible after turning the "style" off on the WAVE accessibility tool. (see screenshots below)
Results
Expected
There shouldn't be any ARIA errors.
Actual
There are Accessibility errors due to the "role=menu" div having zero children.
Error output
If there are any errors at all, please include them here.


Additional Information
Please include any additional information necessary here. Including the following:
versions
videojs
what version of videojs does this occur with?
- All versions starting from 7.0.8 to 7.18.1(The Latest Version)
browsers
what browser are affected?
- All browsers
OSes
what platforms (operating systems and devices) are affected?
- All OSes
plugins
are any videojs plugins being used on the page? If so, please list them below.
- Not applicable (N/A)