Files
nexus/wiki/concepts/Keyboard-Navigation-Audit.md
2026-04-21 04:02:47 +08:00

54 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Keyboard Navigation Audit"
description: 纯键盘导航测试,验证所有交互元素的可访问性
tags: [accessibility, testing, keyboard]
---
## Definition
Keyboard Navigation Audit 是验证所有交互功能是否可以通过纯键盘(不使用鼠标)完成操作的测试方法。这是无障碍测试的核心环节。
## 全局导航检查清单
- [ ] 所有交互元素可通过 Tab 键到达
- [ ] Tab 顺序遵循视觉布局逻辑
- [ ] 存在 Skip Navigation跳转导航链接
- [ ] 无键盘陷阱(始终可以通过 Tab 离开)
- [ ] 每个交互元素的焦点指示器始终可见
- [ ] Escape 键关闭模态框、下拉菜单和浮层
- [ ] 关闭模态框/浮层后焦点返回触发元素
## 组件特定模式
### Tabs
- [ ] Tab 键在 Tab 列表和活动面板内容之间移动
- [ ] 方向键在 Tab 按钮之间移动
- [ ] Home/End 键移动到第一个/最后一个 Tab
- [ ] 选中 Tab 通过 aria-selected 指示
### Menus
- [ ] 方向键在菜单项之间导航
- [ ] Enter/Space 激活菜单项
- [ ] Escape 关闭菜单并将焦点返回触发器
### Carousels/Sliders
- [ ] 方向键在幻灯片之间移动
- [ ] 暂停/停止控制可通过键盘操作
- [ ] 当前位置被宣布
### Data Tables
- [ ] 表头通过 scope 或 headers 属性与单元格关联
- [ ] Caption 或 aria-label 描述表格用途
- [ ] 可排序列可通过键盘操作
## 结果指标
- **总交互元素数**
- **键盘可访问**:(百分比)
- **键盘陷阱数**
- **缺失焦点指示器数**
## Related Concepts
- [[WCAG 2.2]]
- [[Screen Reader Testing]]
- [[POUR Principles]]
## Source
- [[Accessibility Auditor]]