Skip to content
This repository has been archived by the owner on Nov 26, 2021. It is now read-only.

patch: Remove h4 heading from the optional o-video title

Compare
Choose a tag to compare
@origamiserviceuser origamiserviceuser released this 15 Jul 15:51
· 71 commits to main since this release
1. We cannot assume an `h4` is the correct heading level in context.
2. The video title likely doesn't make sense as a heading in the
document context.
3. The heading is removed when the video is played. Just because a
video is played, the structure of the document shouldn't change.

Given point 2 and 3, we can set the element to a `span`. However as
a `span` the title of the video is read out as text by a screen
reader in the middle of a page without context. The title is then
repeated as part of the play button. To address that set
`aria-label="Video Player”` to the root `o-video` element which is
read `“Video Player, group“` by VoiceOver; giving useful context
when stepping through page content.

https://github.com/Financial-Times/o-video/issues/170