[Docs] Fix accessibility violations reported by axe (contrast, names, alt, lightbox)

未关闭
#369 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
53/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
css, javascript, playwright

调研方向

Start with the listed components and custom.css, then inspect the Playwright smoke-test issue referenced in the acceptance criteria to find the axe CI setup. Check contrast in both themes and test the header, skillicons, theme toggle, and lightbox at 375px and 1280px. Done means zero serious or critical axe violations and a lightbox that opens by keyboard, closes with Esc, and restores focus.

由索引模型根据 Issue 内容生成。

描述

area: docs-site priority: P2 size: M type: bug

Summary

axe-core 4 over all 38 pages (desktop dark + mobile) reports serious and critical violations; the image lightbox is mouse-only.

Location

  • docs/src/styles/custom.css:344-352
  • docs/src/components/ControlsTable.astro:66-74
  • docs/src/components/GroupName.astro:9
  • docs/src/components/Header.astro:15
  • docs/src/components/ThemeToggle.astro:15
  • docs/src/components/ThemeToggle.astro:190
  • docs/src/components/Album.astro:120-139
  • docs/src/content/docs/getting-started/introduction.mdx:24-35

Evidence

color-contrast (serious) 84 nodes / 20 pages: inline code #3b82f6 on #1e293b = 3.97:1 (dark)
color-contrast: ControlsTable <th> on /mandlebrot/coloring/, /math-chaos/chaos-equations/
GroupName badge (light theme): text-blue-400 on blue-500/10 over white ~ 2.3:1 (computed)
label-content-name-mismatch 76 nodes: a[href="/"] aria-label='Astro documentation' vs text 'Math Problems'
image-alt (critical) + link-name: skillicons.dev <img> without alt on /getting-started/introduction/
button-name (mobile): kebab menu trigger

Light-theme contrast could not be auto-checked (axe incomplete x118: dotted background gradient). Lightbox: img click handler only, no Esc, no focus move, no role="dialog"; theme toggle sets aria-label="light theme" with aria-live on the button.

Expected

Zero axe violations (serious/critical) in both themes at 375px and 1280px; lightbox operable by keyboard.

Proposed fix

  1. Raise inline-code and table-header colours to >= 4.5:1 in dark mode; make GroupName colours theme-aware.
  2. Header logo: drop the aria-label (visible text is the name).
  3. Give skillicons images alt text (or replace with a text list).
  4. Rebuild the lightbox on <dialog> (showModal(), Esc closes, focus returns) and make thumbnails <button>s.
  5. Theme toggle: aria-pressed or a labelled 3-state switch (light/dark/system); remove aria-live.
  6. Remove the background gradient from the content area or set an explicit solid background-color so contrast is checkable.

Acceptance criteria

  • axe CI job (see Playwright smoke-test issue) passes with 0 serious/critical violations in both themes
  • Lightbox opens with Enter/Space, closes with Esc, restores focus

Repository audit, November 2026 · Phase 7 · Docs platform · evidence: reproduced · ref platform-011


Generated by Claude Code

主要语言
C++
星标
2
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ibra-kdbra/Math-Problems 的其他 Issue

查看 ibra-kdbra/Math-Problems 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。