fix: improve keyboard and screenreader accessibility for Video Shorts#3387
Open
daniellefrappier18 wants to merge 14 commits into
Open
fix: improve keyboard and screenreader accessibility for Video Shorts#3387daniellefrappier18 wants to merge 14 commits into
daniellefrappier18 wants to merge 14 commits into
Conversation
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
frontends/main/src/app-pages/HomePage/VideoShortsModal.tsx:301
CarouselSlideis focusable and triggers playback on Enter, but it’s markedrole="group"(non-interactive). Screen readers may not convey that it’s actionable. Either remove the Enter key handler (and keep it purely for slide navigation/announcement) or change the role/semantics to reflect interactivity (e.g.,role="button"or move the keyboard activation onto an actual<button>element).
player.muted(muted)
// On iOS, only autoplay if muted or if user has interacted
if (!isIOS() || muted || hasUserInteracted) {
player.play()?.catch(() => {
setPlaying(false)
})
setPlaying(true)
}
}
}
}
const onClickMute = () => {
if (selectedIndex !== null && playersRef.current[selectedIndex]) {
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
reliably focus it after FocusTrap initializes, rather than racing with it - Add onSettle callback to CarouselV2 (fires after scroll animation with visible slide indices) to support live regions and roving tabindex - Announce the first visible slide title via aria-live region in VideoShortsSection when the carousel arrow buttons are used - Apply roving tabindex on section carousel slides so Tab enters at the first visible slide rather than always at slide 0
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
shanbady
approved these changes
Jun 2, 2026
Contributor
shanbady
left a comment
There was a problem hiding this comment.
looks good. worked as noted 👍
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What are the relevant tickets?
Fixes https://github.com/mitodl/hq/issues/11527
Description (What does it do?)
Addresses accessibility issues in the Video Shorts modal and section carousel. The feature was previously unusable for keyboard-only and screenreader users due to unconditional preventDefault breaking all non-handled keys (tab, browser shortcuts), and the modal having no dialog semantics.
VideoShortsModal
VideoShortsSection
CarouselV2Vertical
Screen Recording (if appropriate):
video-shorts-carousel.mov
nvda-video-shorts-carousel.mp4
How can this be tested?
Additional Context
Known limitation (out of scope): The Featured Courses carousel has a focus trap issue. Once focus enters a card, Tab moves to the next focusable element within the card (e.g. bookmark button) rather than exiting the carousel. This needs a roving tabindex implementation similar to what was applied to the Video Shorts section. Tracked in https://github.com/mitodl/hq/issues/11575