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

WSTEAM1-1558: Watch Live Button UX & A11y #12263

Conversation

Isabella-Mitchell
Copy link
Contributor

@Isabella-Mitchell Isabella-Mitchell commented Jan 7, 2025

Resolves JIRA WSTEAM1-1558

Overall changes

Screenshot 2025-01-08 at 09 27 29

Applies UX designs, screen reader UX & A11y AACs to the 'Watch Live' button

(Note - the focus behaviour once button is clicked & 'Close Media' states are being handled in other tickets)

Code changes

  • Wraps title, guidance message & WatchLiveCTA in 'mediaButton' button element.
  • Renames 'playButton' to WatchLiveCTA & WatchLiveCTAText
  • Applies hover & focus styles
  • Applies forced colour styles
  • Checks zoom, no CSS styles, focus indicator
  • Adds story to LivePageHeader component

Coming in a follow up PR

  • Colour contrast update

Optional follow up task (nice to have)

  • Add logic to only add visually comma between title & brand if there is no punctuation in title.

Testing

Storybook component
Storybook component with guidance
Storybook LivePageHeader
Local asset: http://localhost.bbc.com:7081/mundo/live/c7dkx155e626t

Helpful Links

UX Design handoff figma: https://www.figma.com/design/BBLybBx1lceKYgKKGxmiwu/Live-page---Media-streaming-on-header---handoff?node-id=1351-12049&t=mDFKJXQW6CP0A9lo-4
Screen reader UX: https://paper.dropbox.com/doc/WS-Live-page-Screen-reader-UX--Cd_drUzfpS3DH8PtsqpcHWTrAg-8qm1UHDGVMhv5Qj9Q2mbi#:uid=135103855853461974121665&h2=Video-in-Header---No-media-gui
AAC: https://paper.dropbox.com/doc/Media-streaming-on-Live-page-header-Accessibility-Acceptance-Criteria--Cd9XeuiOa~qvgofSxoEXe6jRAg-IJpFNBmz2Anh6JxczSMit

Coding Standards

Repository use guidelines

Comment on lines 17 to 18
display: 'block', // check with UX if we want click area this large
width: '100%', // check with UX if we want click area this large
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes click area full width of parent element - check with UX

@Isabella-Mitchell Isabella-Mitchell changed the title WSTEAM1-1558: Adds initial styles and Screen Reader UX WSTEAM1-1558: Watch Live Button UX & A11y Jan 8, 2025
@@ -20,7 +21,7 @@ type WarningItem = {

type Props = { mediaCollection: MediaCollection[] | null };

const DEFAULT_WATCH__NOW = 'Watch Now';
const DEFAULT_WATCH__NOW = 'Watch Live';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed for consistency with designs

@Isabella-Mitchell Isabella-Mitchell marked this pull request as ready for review January 8, 2025 09:29
css({
span: { color: palette.GREY_4 },
display: 'block',
width: '100%',
margin: `${pixelsToRem(12)}rem 0`,
marginTop: `${spacings.FULL}rem`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Divided 16pixel spacing between this component and outer container to ensure focus indicator does not obscure Live Page header title or description

Copy link

@greenc05 greenc05 left a comment

Choose a reason for hiding this comment

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

Looks slick 🚀

Not sure where the triangle SVG code is, do we need focusable false and aria hidden on it?

Some colour contast issues, will ask Wendy to update the CTA colours.

src/app/components/LiveMediaStream/index.tsx Outdated Show resolved Hide resolved
src/app/components/LiveMediaStream/index.styles.tsx Outdated Show resolved Hide resolved
{watchNow}
<Text size="pica" fontVariant="sansBold" as="span">
{short}
</Text>{' '}
Copy link

Choose a reason for hiding this comment

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

Is {' '} a space? Can we zap it? If you look when there is no CSS, it's not formatted the best.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have changed this. There is still a space after the comma, but the new implementation seems better for no-css and screen reader users.

@@ -113,6 +113,7 @@ const LiveMediaStream = ({ mediaCollection }: Props) => {
css={styles.guidanceMessage}
>
{warnings.warning_text}
<VisuallyHiddenText>, </VisuallyHiddenText>
Copy link

Choose a reason for hiding this comment

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

We don't need this as we have a full stop as part of the guidance message text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. do we know whether editorial always provide this as part of the guidance message?

Copy link

Choose a reason for hiding this comment

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

Well it is a sentence, with proper grammer it should contain one at the end? Do we already have this string in our translations? Could check if so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe this is coming through in the data (rather than via translation) - have asked Shayne for more clarity.

Copy link
Contributor

Choose a reason for hiding this comment

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

Heya, yess this comes through the BFF and is provided by the editors who write the article.

@Isabella-Mitchell Isabella-Mitchell merged commit 6ea6abd into WSTEAM1-1521-LIVE-VIDEO-FRONT-END Jan 10, 2025
6 checks passed
@Isabella-Mitchell Isabella-Mitchell deleted the WSTEAM1-1558-watch-live-ux-a11y branch January 10, 2025 09:14
@greenc05
Copy link

greenc05 commented Jan 10, 2025

Any chance of getting colours for the watch media CTA that meet contrast added please? '#00 8282' for the default and hover teal background colour, with the addition of text underline in white on the 'watch live' text please.

@greenc05 greenc05 mentioned this pull request Jan 10, 2025
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.

4 participants