Repository navigation
fix(web): calibrate WCAG AA contrast tokens, tablist/submenu a11y, touch targets, and reduced motion - #752
Open
oldwinter53 wants to merge 1 commit into
Open
fix(web): calibrate WCAG AA contrast tokens, tablist/submenu a11y, touch targets, and reduced motion#752oldwinter53 wants to merge 1 commit into
oldwinter53 wants to merge 1 commit into
Conversation
…uch targets, and reduced motion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Foundational Design System and Accessibility fixes across
@linger/webcovering WCAG 2.1 AA contrast, WAI-ARIA keyboard navigation, coarse-pointer touch ergonomics, reduced-motion safety, icon consistency, and user-facing brand copy.1. WCAG 2.1 AA Contrast Calibration & Regression Guard
apps/web/src/app/visual-theme.cssso every core text/surface pair meets WCAG 2.1 AA (>= 4.5:1) and interactive borders meet WCAG 1.4.11 (>= 3.0:1):--town-muted-foreground(55 6% 38%): >= 4.96:1 across white, canvas, muted, sidebar, and sidebar-muted surfaces--town-warning(35 100% 30%) and--town-success(98 48% 30%): >= 4.74:1 on their 10%-tinted status surfaces over white and canvas--town-info(207 92% 35%) and--town-highlight(207 95% 32%): >= 4.57:1 across info cards, mentions, and mention hover surfaces--app-placeholder(hsl(var(--town-foreground) / 0.62)): >= 4.73:1 across white, canvas, and muted surfaces--town-input(68 8% 54%),--town-input-hover(68 8% 44%), and--app-border-interactive(hsl(var(--town-foreground) / 0.48)): >= 3.08:1--composer-attachment-*-texttokens to the Town 700 nature shades (>= 6.16:1 on their 15%-tinted attachment chips)/80opacity attenuation onSettingsGroupmeta text (apps/web/src/components/ui/settings-group.tsx)..another-me-card[data-active="true"]styling inapps/web/src/app/globals.cssfrom an opaque mid-tone fill to a luminous 10% brand-tinted paper surface with a tinted border and crisp Town ink typography, guaranteeing >= 7:1 title contrast and >= 4.5:1 subtitle contrast across all avatar brand colors.apps/web/src/app/visual-theme-contrast.test.ts.2. WAI-ARIA Tablist & ActionSubmenu Keyboard Navigation
useTablistKeyboard(apps/web/src/components/ui/tablist-keyboard.ts) implementing WAI-ARIA APG roving tabindex (tabIndex={selected ? 0 : -1}),ArrowLeft/ArrowRightwrapping across enabled tabs, andHome/Endnavigation.useTablistKeyboardintoUnderlineTabsand all 4 custom tablists:VoiceFocusSurface,RoomInfoPanel,UpdateDriverDialog(Linux distributions), andMeetingReader.ActionSubmenuinapps/web/src/components/ui/action-menu.tsxto manage its ownsubmenuItemRefsand handleArrowDown/ArrowUp/Home/EndwithpreventDefault()andstopPropagation()so focus never escapes back to the parent menu.3. Coarse-Pointer Touch Targets, Drag
touch-action, &prefers-reduced-motion@media (pointer: coarse)hit areas to >= 44x44px via::afteroverlays for.ui-button-compact,.ui-button-icon-compact, and.app-dialog-closeinapps/web/src/app/globals.csswithout inflating desktop visual density.touch-noneand pointer-cancel /lostpointercapturecleanup toColorPalette,MermaidSvgPreview, andWikiGraphTimeline(preventing cancelled pointer gestures on the timeline ruler from triggering date selection).@media (prefers-reduced-motion: reduce)rules with static state indicators inapps/web/src/app/globals.css(.meeting-todaystatic ring,.meeting-heatmap-cell:hoverstatic outline),meeting-page.css,message-markdown.css,mermaid-svg-preview.css, andwiki-profile-page.css.4. Brand Polish & Icon Unification
"TeamHub"strings with"Linger"inapps/web/src/i18n/common.messages.ts,apps/web/src/app/route-pages.messages.ts, andapps/web/src/i18n/locales/zh-CN.json.lucide-reactsource files (runtime-history-view.tsxandruntime-tool-presentation.ts) to@hugeicons/core-free-iconsvia<Icon>, and replacedbg-whitewithbg-cardinruntime-history-view.tsx. (Leftpackage.json/pnpm-lock.yamluntouched to avoid unrelated lockfile churn outsideapps/web.)Verification
make check-web-static(tsc --noEmit,eslint --max-warnings=0,react-doctor --scope changed): 0 errors, 0 warningspnpm --filter @linger/web test(all 424 test files / 3,928 tests, including newvisual-theme-contrast.test.ts,underline-tabs.test.tsx,action-menu.test.tsx,local-model-driver-dialog.test.tsx,voice-focus-surface.test.tsx,runtime-history-view.test.tsx,teamhub-router.test.tsx,catalog.test.ts): all passedpnpm --filter @linger/web run build:assets: passed initial JS bundle budgets (590.83 kBminified,202.73 kBgzip,176.17 kBBrotli)1440x900) and Mobile (375x812) against live Vite dev server: verified Before/After token contrast, Another Me active card legibility, Tablist & ActionSubmenu keyboard focus transitions, zero layout overflow, and zero console/page errors