openvibers/openvibe.games Commits

WCAG AA: the home's numbers strip is reachable by keyboard (#255)

OP OpenVibers committed 11 days ago · 04f95cc546 · 2 files, +3 −1

Changes

ddiff --git a/apps/server/src/net/portalHome.test.ts b/apps/server/src/net/portalHome.test.ts
iindex 6306c9b..e07e451 100644
---- a/apps/server/src/net/portalHome.test.ts
++++ b/apps/server/src/net/portalHome.test.ts
@@@ -126,6 +126,8 @@ describe('the home page live sections', () => {
expect(parts.sections).toContain('Most visited')
expect(parts.sections).toContain('40 visits')
expect(parts.stats).toContain('<b>7</b><span>creator worlds published</span>')
++ // The strip scrolls sideways on a phone, so it is reachable by keyboard (WCAG sweep, 2026-11-01).
++ expect(parts.stats).toContain('<ul class="home-stats" aria-label="OpenVibe.Games in numbers" tabindex="0">')
// The Steam lists left the home (2026-10-29: the "On Steam right now" card links them); they render on their own.
expect(parts.sections).not.toContain('store.steampowered.com')
const steam = steamSection(d, NOW)
ddiff --git a/apps/server/src/net/portalHome.ts b/apps/server/src/net/portalHome.ts
iindex 2d88c5e..480c46c 100644
---- a/apps/server/src/net/portalHome.ts
++++ b/apps/server/src/net/portalHome.ts
@@@ -207,7 +207,7 @@ export function renderStats(d: HomeData): string {
if (deals > 0)
items.push({ value: deals, label: deals === 1 ? 'Steam deal today' : 'Steam deals today' })
if (!items.length) return ''
-- return `<ul class="home-stats" aria-label="OpenVibe.Games in numbers">${items
++ return `<ul class="home-stats" aria-label="OpenVibe.Games in numbers" tabindex="0">${items
.slice(0, 5)
.map((s) => `<li><b>${n(s.value)}</b><span>${esc(s.label)}</span></li>`)
.join('')}</ul>`