diff --git a/sass/_community.scss b/sass/_community.scss index 7afdc92e..bb20fd65 100644 --- a/sass/_community.scss +++ b/sass/_community.scss @@ -77,29 +77,12 @@ a.community-home-kicker:hover { margin-bottom: 1.1rem; } -// Visible pause/play control for the auto-scrolling marquee (WCAG 2.2.2: -// moving content that lasts more than 5s needs a mechanism to pause it). -.community-logo-pause { - flex: 0 0 auto; - padding: 0.4rem 1.1rem; - border: 1px solid #bfc6dd; - border-radius: 20px; - background: #fff; - color: #47506b; - font-size: 1.1rem; - font-weight: 700; - letter-spacing: 0.04em; - cursor: pointer; - - &:hover { - border-color: $community-purple-800; - color: $community-purple-800; - } -} - +// The vertical padding leaves room for a hovered logo's scale and underline, +// which overflow and the mask would otherwise clip. .community-logo-row { position: relative; overflow: hidden; + padding: 0.4rem 0; white-space: nowrap; mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%); -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%); @@ -113,9 +96,9 @@ a.community-home-kicker:hover { will-change: transform; } -// Paused via the visible toggle button (see community.js). The logos -// themselves are non-interactive, so there is no focus-based pause. -.community-logo-track.is-paused { +// Paused while the pointer is over the strip, so a logo can be clicked. The +// logo links are out of the tab order, so there is no focus-based pause. +.community-logo-row:hover .community-logo-track { animation-play-state: paused; } @@ -146,6 +129,15 @@ a.community-home-kicker:hover { max-height: var(--logo-height, 24px); object-fit: contain; } + + img { + transition: transform 0.15s ease; + } + + &:hover img { + box-shadow: 0 2px 0 0 $community-label-blue; + transform: scale(1.1); + } } @keyframes community-logo-marquee { diff --git a/static/assets/js/community.js b/static/assets/js/community.js index 735728d4..ae1ff28d 100644 --- a/static/assets/js/community.js +++ b/static/assets/js/community.js @@ -1,33 +1,14 @@ /** - * Interactions for /community/ and the homepage - * - * 1. Participant logo marquee pause/play toggle (WCAG 2.2.2: auto-moving - * content lasting more than 5s needs a control to pause it). Both pages. - * 2. "Community in action" photo carousel, /community/ only: pages through - * photos three at a time on desktop, two on tablet, one on mobile. - * Prev/next buttons and a "current / total" status are the only controls; - * there is no auto-scroll. + * "Community in action" photo carousel on /community/: pages through photos + * three at a time on desktop, two on tablet, one on mobile. Prev/next buttons + * and a "current / total" status are the only controls; there is no + * auto-scroll. */ (function () { 'use strict'; - // Participant logo marquee pause/play toggle ----------------------------- - function initLogoMarquee() { - var track = document.getElementById('communityLogoTrack'); - var button = document.getElementById('communityLogoPause'); - if (!track || !button) return; - - button.addEventListener('click', function () { - var paused = track.classList.toggle('is-paused'); - button.setAttribute('aria-pressed', paused ? 'true' : 'false'); - button.textContent = paused ? 'Play' : 'Pause'; - }); - } - function init() { - initLogoMarquee(); - var track = document.getElementById('communityPhotoTrack'); var prev = document.getElementById('communityPhotoPrev'); var next = document.getElementById('communityPhotoNext'); diff --git a/templates/index.html b/templates/index.html index 45535c09..f57fc07a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -137,6 +137,4 @@

{{ card.title }}

- - {%- endblock content -%} diff --git a/templates/macros/community.html b/templates/macros/community.html index 01b30f17..a3d1a7b9 100644 --- a/templates/macros/community.html +++ b/templates/macros/community.html @@ -25,10 +25,11 @@ {% endcomponent logo_height %} {# One full set of logos. The marquee renders it twice; the copy is hidden from - assistive tech. Logos are non-interactive: the "Valkey participants" kicker - already links to /participants/, where each logo is linked with a - description. Rendering them as links here added ~20 tab stops with no skip - link and let keyboard focus scroll the marquee off-track. #} + assistive tech. Each logo links to the participant's site for mouse users, + since hovering the strip pauses it. The links are kept out of the tab order: + ~20 tab stops with no skip link was too many, and keyboard focus scrolled + the marquee off-track. The "Valkey participants" kicker links to + /participants/, where each logo is linked with a description. #} {% component logo_set(participants, duplicate=false, loading="eager") %} {% endcomponent logo_set %} -{# The whole strip: kicker, pause control, and the marquee. Each page supplies - its own wrapper. community.js finds the track and button by id, so a page - holds at most one strip. Logos load eagerly by default, for /community/ - where the strip is above the fold; a page with the strip further down - passes loading="lazy". #} +{# The whole strip: kicker and the marquee. Each page supplies its own + wrapper. Logos load eagerly by default, for /community/ where the strip is + above the fold; a page with the strip further down passes loading="lazy". #} {% component logo_strip(participants, loading="eager") -%}
Valkey participants -
-
+
{{< logo_set participants={participants} loading={loading} />}} {{< logo_set participants={participants} duplicate={true} loading={loading} />}}