Repository navigation
fix(site): 搜索按钮的快捷键字母改为生成内容,可见文字只剩标签 - #34
Merged
Merged
Conversation
#33 把快捷键提示设为 aria-hidden,但 label-content-name-mismatch 读的是可见文字: 线上按钮仍显示「标签 K」,axe-core 4.12.0(Lighthouse 13.4 所用版本)照旧报错。 VitePress 已经用生成内容绘制修饰键;search-button.ts 把字母移入 data-key, base.css 以 content: attr(data-key) 绘制,外观不变,可见文字只剩标签。 aria-hidden 与 aria-keyshortcuts 保留。DESIGN.md §14 更正说明。
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.
摘要
修正 #33 的搜索按钮修复。#33 把快捷键提示设为
aria-hidden,但 Lighthouse 的label-content-name-mismatch读的是可见文字:上线后按钮仍显示「标签 K」,axe-core 4.12.0(Lighthouse 13.4 使用的版本)在中英文页面上依旧报告同一问题。::after { content: 'Ctrl' })绘制修饰键。search-button.ts用同样的方式绘制字母:把按键文字移入data-key,再由base.css的content: attr(data-key)显示。aria-hidden与aria-keyshortcuts保留。search-button.ts内容完全相同。验证(本地,绑定 head
f683456)verify-shell.sh从全新导出运行(node 22.23.2、pnpm 10.25.0)。label-content-name-mismatch均为 0 个违规;aria-label,与无障碍树中的名称一致;::after绘制,按键宽度正常。pnpm check0 errors,构建出 4 页;check-dist.sh,voltip 构建通过;/codegraph/下 503 个链接全部可解析;/codegraph/guide/viewer和/codegraph/en/各报 1 个违规;在同一页面上应用本方案后为 0。🤖 Generated with Claude Code