-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add audio description example to VideoPlayer docs #882
Conversation
|
🟢 No design token changes found |
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
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.
Looks good, thank you!
<Stack gap="normal"> | ||
<VideoPlayer title="GitHub media player"> | ||
<VideoPlayer.Source src="/brand/assets/example.mp4" /> | ||
<VideoPlayer.Track src="/brand/assets/example.vtt" default /> | ||
</VideoPlayer> | ||
<Link href="#">Watch with audio description</Link> | ||
</Stack> |
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.
The link hover state is taking up the full width of the container. Quick fix below 👇
<Stack gap="normal"> | |
<VideoPlayer title="GitHub media player"> | |
<VideoPlayer.Source src="/brand/assets/example.mp4" /> | |
<VideoPlayer.Track src="/brand/assets/example.vtt" default /> | |
</VideoPlayer> | |
<Link href="#">Watch with audio description</Link> | |
</Stack> | |
<Stack gap="normal" alignItems="center"> | |
<VideoPlayer title="GitHub media player"> | |
<VideoPlayer.Source src="/brand/assets/example.mp4" /> | |
<VideoPlayer.Track src="/brand/assets/example.vtt" default /> | |
</VideoPlayer> | |
<Link href="#">Watch with audio description</Link> | |
</Stack> |
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.
Also could this be a button instead of a link? I'm not sure what this is supposed to do right now as clicking it scrolls me back to top of page due to it being a link with # href.
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.
The intention here is to demonstrate the second pattern described above.
or via a link to an alternate audio-described version
As we don't have an audio-described version of this video I opted to just use a href of "#". If there's another approach you'd prefer just let me know.
Good spot on the width issue too, that's now fixed.
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.
Gotcha, thanks @joshfarrant. Could we instead use a no-op link, or open an alert saying something like "Audio description should begin playing" (Assuming that's what's supposed to happen?). I think the scrolling is a quite distracting right now, what do you think?
I've not seen this audio description link on any of our marketing videos, so wonder how it's supposed to look. We should ask Site at some point for guidance on whether it should be button or link. Until then it's fine to keep as a link.
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.
Happy to update it, but just want to make sure we're on the same page about the intended behaviour here.
The intention is that the text "Watch with audio description" will link to an alternative video on some other page; that video will have an audio description embedded in it. That's why this can only be a link and not a button.
So if we're keeping it as a link then should we just keep it as href="#"
since we do that in quite a few other places in the docs already?
I've asked around and I can't find any self-hosted videos which have an optional audio description, so there might not be an existing pattern for this. My goal here is to take the simplest possible approach and just ask consumers to provide a link to an audio described version.
Hopefully that makes sense. If you think that's not clear from my changes to the docs then lmk too. If it's preferable then I could remove the example altogether if you think it's causing confusion, then we can just leave it up to consumers to decide how they want to provide the link.
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.
Thanks Josh, makes sense to keep it a link. How about we add an external link icon next to it then, to make it obvious before someone clicks on it, that it should eventually go to an external location. Otherwise it still feels both a little broken with the scrolling and confusing on should happen.
<Stack gap="normal" alignItems="center">
<VideoPlayer title="GitHub media player">
<VideoPlayer.Source src="/brand/assets/example.mp4" />
<VideoPlayer.Track src="/brand/assets/example.vtt" default />
</VideoPlayer>
<Stack direction="horizontal" gap={12} padding="none" alignItems="center">
<Link href="#" arrowDirection="none">Watch with audio description</Link>
<LinkExternalIcon size={16} />
</Stack>
</Stack>
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.
Works for me, thanks!
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.
Just spotted a style issue on hover again, let me fix that and I'll ping you when it's ready
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.
@rezrah The Link underline issue is going to be fixed in #887 to save cluttering this PR. For the moment that means it looks like this in the docs deployed with this PR
Once #887 goes in the underline will be fixed.
That should tick off the last of the feedback for this PR, let me know if you spot anything else though
9e6db68
to
0a7d88a
Compare
Summary
Adds an audio description example to the VideoPlayer documentation, and fixes styling of custom play icon example.
List of notable changes:
What should reviewers focus on?
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
update snapshots
label to the PR)Reviewer checklist: