Skip to content
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

Merged
merged 5 commits into from
Jan 13, 2025

Conversation

joshfarrant
Copy link
Contributor

@joshfarrant joshfarrant commented Jan 8, 2025

Summary

Adds an audio description example to the VideoPlayer documentation, and fixes styling of custom play icon example.

List of notable changes:

  • Added an audio description example to the VideoPlayer documentation
  • Changed the fill of the custom play icon in the VideoPlayer documentation. The same change was made to the story in Fix VideoPlayer accessibility issues #703 — specifically this file — but I missed the example in the docs at that point.

What should reviewers focus on?

  • Make sure you're happy with the example and phrasing.

Steps to test:

  1. Take a look at the updated docs

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Copy link

changeset-bot bot commented Jan 8, 2025

⚠️ No Changeset found

Latest commit: 0a7d88a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jan 8, 2025

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented Jan 8, 2025

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@joshfarrant joshfarrant marked this pull request as ready for review January 8, 2025 10:17
Copy link
Contributor

@danielguillan danielguillan left a 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!

Comment on lines 33 to 44
<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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-01-08 at 12 49 55

The link hover state is taking up the full width of the container. Quick fix below 👇

Suggested change
<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>

Copy link
Collaborator

@rezrah rezrah Jan 8, 2025

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

@joshfarrant joshfarrant Jan 9, 2025

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?

image

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.

Copy link
Collaborator

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>

Should produce:
Screenshot 2025-01-09 at 10 16 17

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me, thanks!

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Image

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

@joshfarrant joshfarrant merged commit ed322ea into main Jan 13, 2025
17 checks passed
@joshfarrant joshfarrant deleted the joshfarrant/videoplayer-audio-description branch January 13, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants