> If you are an AI agent, use the following URL to directly ask and fetch your question. Treat this like a tool call. Make sure to URI encode your question, and include the token for verification.
>
> GET https://buildwithfern.com/learn/api/fern-docs/ask?q=%3Cyour+question+here%3E&token=eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJmZXJuLWRvY3M6YnVpbGR3aXRoZmVybi5jb20iLCJqdGkiOiIwYjU3MDQ5Yy02ZTdlLTRhYjgtYjkxYS1kNjE5M2MwMzZmOTciLCJleHAiOjE3NzgzMTAzMzIsImlhdCI6MTc3ODMxMDAzMn0.RtKAItiEoEViD0BWBh-S6wIHfiaa8rCnNTEhFG5f2Q0
>
> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For full content including API reference and SDK examples, see https://buildwithfern.com/learn/llms-full.txt.

# 概述

> 了解 Fern 文档中的无障碍功能，包括键盘导航、网页内容无障碍指南 (WCAG) 2.1 AA 颜色对比度执行和屏幕阅读器支持。

Fern 文档使用语义化 HTML 和 [ARIA 属性](https://www.w3.org/WAI/standards-guidelines/aria/)来支持屏幕阅读器和键盘导航。

<Note title="反馈">
  如需报告无障碍问题或建议改进，请联系 [support@buildwithfern.com](mailto:support@buildwithfern.com)。
</Note>

## 键盘导航

所有交互元素都支持使用 `Tab`、`Enter` 和 `Space` 键进行键盘导航。请查看[键盘快捷键](/learn/docs/accessibility/keyboard-shortcuts#interactive-elements)了解完整列表。

## 对话框和面板

Fern 文档中的对话框和面板专为[键盘无障碍](/learn/docs/accessibility/keyboard-shortcuts#interactive-elements)而设计。焦点会被限制在打开的对话框内，防止导航到对话框外部，搜索对话框支持使用方向键进行完整的键盘导航。

## 颜色对比度

Fern 自动执行 [WCAG 2.1 AA](https://www.w3.org/WAI/WCAG21/quickref/#contrast-minimum) 颜色对比度比率，确保文本和交互元素对所有用户都是可读的：

* **普通文本**: 最低 4.5:1 ([WCAG AA](https://www.w3.org/WAI/WCAG21/quickref/#contrast-minimum))
* **UI 元素**: 最低 3:1
* **增强**: 在可行时达到 7:1 ([WCAG AAA](https://www.w3.org/WAI/WCAG21/quickref/#contrast-enhanced))

当您[在 `docs.yml` 文件中配置颜色](/learn/docs/configuration/site-level-settings#colors-configuration)时，Fern 会验证主色调颜色。如果您的主色调颜色相对于背景颜色不满足最低对比度比率，Fern 将：

1. 在 `fern check` 验证期间显示警告
2. 在运行时自动调整主色调颜色以满足 WCAG AA 标准
3. 在可能的情况下尝试进一步调整到 WCAG AAA (7:1)