Conversation
When displayTitle is set the player iframe now references the visible
component heading (#{_id}-heading) with aria-labelledby instead of
duplicating the string in aria-label. Falls back to aria-label with the
non-visible title field when displayTitle is empty. Aligns with
adapt-youtube#48.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
|
Updated to align with the accessible-name approach agreed in adaptlearning/adapt-youtube#48: when Posted via collaboration with Claude Code |
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.
Fixes #55
Fix
<iframe>an author-controlled, localisable accessible name derived from the component'sdisplayTitle(falling back totitle).Notes
The iframe is created at runtime by the Vimeo player library, which only sets a
titleattribute from the video's own Vimeo title — authors cannot control or localise it. The accessible name is now applied after the player'sreadyevent, onvimeoView.player.element.When
displayTitleis set it renders as a visible component heading, so the iframe references that heading viaaria-labelledby="{_id}-heading"rather than duplicating the string. When only the non-visibletitlefield is set, it is applied directly as anaria-label. This mirrors the approach agreed in adapt-youtube#48.Relevant WCAG success criterion: 4.1.2 Name, Role, Value. Nothing is set when neither
displayTitlenortitleis present.Testing
displayTitleset.<iframe>inside.vimeo__widget.aria-labelledbypointing at the component heading ({_id}-heading).titleset butdisplayTitleempty, confirmaria-labelis applied instead.Posted via collaboration with Claude Code