feat: playback rate button now opens the menu rather than changing the playback rate #7779
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This comes out of discussion in #7121 and its associated PR, #7193.
Currently, in Video.js 7, the
PlaybackRateMenuButton
will change to the next playback rate when it is clicked, cycling through the list of items. However, this approach has accessibility issues (which were addressed in #7193 as far as I can see) necessitating a workaround.In Video.js 8, the
PlaybackRateMenuButton
will behave like other buttons when it is clicked: it will open its associated menu persistently. This is considered a breaking change because it changes the behavior of a control bar menu button.I'd love to get feedback from @gkatsev and/or @OwenEdwards on whether or not further accessibility updates are warranted here - or if we could potentially remove the workaround introduced in #7193.
Specific Changes proposed
handleClick
method, which causes us to fall back toMenuButton#handleClick
updateARIAAttributes
method, which was never called anywhere.Requirements Checklist