-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
fix(chapters-button): Remove dead code and fix selected
capability.
#3623
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exact implementation of https://github.com/videojs/video.js/blob/master/src/js/control-bar/text-track-controls/text-track-button.js#L49.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps "selectable" wasn't a clear way to describe this, but I don't think that chapters can be "selected". Think of selectable as being whether the item behaves like a checkbox or radio button - would you want it "checked" in the menu? For captions and descriptions, yes, you would. For the captions settings menu, you wouldn't.
Having a chapter "selected" only makes sense if you have a mechanism which updates the "selected" chapter as the video plays; otherwise it would be like leaving a checkmark on the progress bar of where you last clicked, even when playback has moved forward from that point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They actually are supposed to get updated as mentioned in #3472 and #3447.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, then we need to discuss the concept of "selected" some more.
I can see that chapter menu items do update as "selected" based on the timeline, but from an ARIA perspective, it's not strictly "selected". Again, think of it as a checkbox - if a checkbox is already checked, and you click on it, you don't expect the checkbox to stay checked. If it's a radio button you do, but then you don't expect it to have another effect.
So this
chapters
menu is a hybrid control, which is both a user control and a progress display. I understand what @chemoish wants to achieve visually, but it's not doing the correct thing logically by just making chapter items "selectable". (Having said that, using thecontrolText
to indicateselected
as text to a screen reader was a hack too! Let's fix this properly before we go too far down the road to fix it at all).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a plan. We should either see if we can get #3472 updated since it has a bunch of other good fixes or merge in #3472 and then fix it forward in a separate PR before releasing.