Skip to content

Fix: Name the iframe from the title text, not the heading with its completion status (fixes #53) - #54

Open
oliverfoster wants to merge 1 commit into
masterfrom
issue/53
Open

oliverfoster wants to merge 1 commit into
masterfrom
issue/53

Conversation

@oliverfoster

Copy link
Copy Markdown
Contributor

Fixes #53

Fix

  • Name the iframe with aria-label="{{compile_a11y_normalize displayTitle}}" (falling back to title) instead of aria-labelledby on the component heading. The heading includes the screen-reader completion description, so the iframe was announced as "Incomplete. …".

Testing

Accessible name of the iframe from Chrome's accessibility tree, in a built course:

before after
displayTitle: "Intro video" "Incomplete. Intro video" "Intro video"
displayTitle: "<b>Intro</b> video &amp; more" n/a "Intro video & more"
title only "Intro video (hidden title)" unchanged
neither YouTube's own title unchanged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Iframe is announced with the component's completion status when displayTitle is set

1 participant