Repository navigation
fix(site): 文档站搜索按钮的可访问名称与可见文字一致,pt-tools 隐私卡片恢复网格 - #33
Merged
Merged
Conversation
- 四个文档站(voltip、lockra、pt-tools、codegraph)的搜索按钮把快捷键提示(Ctrl/⌘ K) 放在按钮文字里,可见文字是「标签 K」,可访问名称却只有标签(WCAG 2.5.3,Lighthouse label-content-name-mismatch)。主题新增 search-button.ts,在挂载和每次路由切换后把提示 设为 aria-hidden,并以 aria-keyshortcuts 告知快捷键;不复制 VitePress 组件 - pt-tools 的 .pt-privacy-grid 缺少 display: grid 与 16px 间距,三张卡片在任何宽度都 首尾相接地纵向堆叠;补上与其他站点相同的规则 - codegraph 站点注册 QrCode 组件,同步脚本复制 public/community/,并检查页面引用的 /community/ 文件存在,为公众号二维码做准备 - DESIGN.md 新增 §14 记录这两处共用修复,并更新 §12、§13 的相应说明
sunerpy
added a commit
that referenced
this pull request
Oct 3, 2026
#33 只把快捷键提示设为 aria-hidden,label-content-name-mismatch 读的是可见文字,线上仍报错。字母改由 base.css 以 content: attr(data-key) 绘制(与 VitePress 绘制修饰键的方式相同),外观不变,可见文字只剩标签;axe-core 4.12.0 在四个站点的中英文页面上均为 0 违规。
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.
摘要
修复在 CodeGraph 文档站上线检查中发现的两个共用问题,并为 CodeGraph 文档站加入公众号二维码所需的组件。
label-content-name-mismatch)。search-button.ts,在setup中调用:挂载后及每次路由切换后,把提示设为aria-hidden,并为按钮加上aria-keyshortcuts="Control+K Meta+K"。.pt-privacy-grid缺少display: grid; gap: 16px。线上在 1800 px 宽度下,三张卡片仍然纵向堆叠、首尾相接。补上与其他站点相同的规则。QrCode组件(取自 pt-tools,使用--cg-qr-plate);public/community/,并检查页面引用的/community/文件确实存在;验证(本地,绑定 head
e8b3ba7)verify-shell.sh从本分支 head 的git archive全新导出运行,工具链与 CI 相同(node 22.23.2、pnpm 10.25.0)。<QrCode src="/community/wechat-official-account.jpg">时同步成功,并复制了public/community/;/community/missing.png时同步失败,并指出文件和缺失的路径。check-versions通过;pnpm check0 errors、0 warnings;构建出 4 页。check-dist.sh;voltip 构建通过。/codegraph/下 503 个链接(其中 387 个带锚点)全部可解析。aria-hidden,且无障碍树中按钮的名称等于其aria-label;没有控制台错误,也没有失败的请求。🤖 Generated with Claude Code