brand icon indicating copy to clipboard operation
brand copied to clipboard

[modification request] Add pause button to Logobar

Open nsolerieu opened this issue 1 year ago • 5 comments

Problem

  • Accessibility recommend to allow user to stop and animated element on the page
  • It's has been noted that the marquee effect is particularly distracting

Solution

Bake in the component a (subtle) pause button

Image

See @jesussandreas design suggestion here

Urgency

@stamat already fixed this where it was a flagged by a11y as a critical issue - now it's time to update our system. SEV-2 a11y issue: https://github.com/github/accessibility-audits/issues/7881

nsolerieu avatar Aug 27 '24 20:08 nsolerieu

👋 @nsolerieu thanks for opening this request. A few quick questions / clarifications:

  • The image shows a static logobar, not the marquee variant. Presumably we want to add this to marquee only, and not allow static variants to turn into marquees?
    • related to above: would a play/pause button positioned on the fade out gradient not defeat the purpose of the fade / interfere with it?
  • Are you using an Octicon to represent play/pause or a custom icon?

@stamat already fixed this where it was a flagged by a11y as a critical issue

It seems like the issue on that page was resolved by turning the marquee animation off. Do you have any examples of this feature having been implemented on a production page? No worries if not, just curious to see it in action.

rezrah avatar Sep 02 '24 14:09 rezrah

@rezrah legend ✨ I'll try to respond to these, but @nsolerieu can fill in if I missed something!

  • We intend to do this on marquee variants and not static variants ofc. The design is a just a sketch.
    • Yes it will be positioned on the fade out to the right.
  • There is no pause octicon, and the play octicon, looking at the design won't do, so I believe these icons are custom. We could file a request for an additional play icon and a new pause icon, regardless. Since we have the Video player component, and the old audio player component

Here are the three production pages where the quick play/pause solution was implemented to work with Logo Suite component with marquee option:

  • https://github.com/enterprise
  • https://github.com/enterprise/advanced-security
  • https://github.com/features/copilot - This is where it gets ugly, when we have two buttons one above the other.

This new play/pause button should present a standard way to play/pause moving content across our pages. Much like Apple does.

stamat avatar Sep 03 '24 14:09 stamat

Also here is the play/pause button I believe they want implemented https://githubnext.com/projects/copilot-workspace ✨

stamat avatar Sep 04 '24 09:09 stamat

+1 to all of @stamat points:

  • We dont have standard play/pause icon and I'm in favor of using @jesussandreas version for now as they have been adopted on a few pages already
  • Placing the button over the fade is working for me as it allows to keep the component contained in a horizontal bar and avoid the awkward bump under the bar like on Copilot
  • Indeed this pause is only for the marquee version

nsolerieu avatar Sep 05 '24 16:09 nsolerieu

@rezrah

Figma link to Mockup.

jesussandreas avatar Sep 10 '24 00:09 jesussandreas

@jesussandreas I'm just working on this at the moment. Do you have any suggestions of how to implement this on a light-mode LogoSuite?

Eg this kind of thing (but better 😅)

Image

joshfarrant avatar Jan 31 '25 16:01 joshfarrant

Yes, let me come back to you on this.

jesussandreas avatar Jan 31 '25 17:01 jesussandreas

@joshfarrant could it be something like this?

Image

jesussandreas avatar Feb 01 '25 01:02 jesussandreas

Thanks @jesussandreas! That's definitely an improvement over my solution ✨

I'll loop in @danielguillan too as, following a chat we had, he spotted a few other things we could do along with just adding the button.

joshfarrant avatar Feb 03 '25 16:02 joshfarrant

I think we can leverage the styles of the updated subtle Button variant:

Logosuite pause button in light and dark mode

We also need a 40px offset at the end of the logobar/mask when the button is present:

Image

danielguillan avatar May 06 '25 10:05 danielguillan

@danielguillan I was looking into an accessibility audit issue for marketing engineering and curious ~~if we already meet the accessibility criteria for this. If you look at the Mechanism definition of the WCAG requirement, I believe we're covered because we already honor the Reduced Motion preference. See definition:~~

The mechanism may be explicitly provided in the content, or may be relied upon to be provided by either the platform or by user agents, including assistive technologies.

Here is a video of me toggling "Reduce motion" and the LogoSuite acting accordingly.

https://github.com/user-attachments/assets/cb0c6cc7-edf8-41a3-bee5-c1c8602ae128

Update: Sorry for the noise. I think we do need it after re-reading it.

rfearing avatar May 08 '25 17:05 rfearing

This has been added and will be included in the next release of Primer Brand

joshfarrant avatar May 12 '25 08:05 joshfarrant