{"title":"可访问性","version":"6.0","locale":"zh-hans","docname":"internals/contributing/accessibility","url":"/zh-hans/6.0/internals/contributing/accessibility/","canonical":"https://djangodocs.dev/zh-hans/6.0/internals/contributing/accessibility/","summary":"Django 项目致力于确保使用 Django 构建的网站对所有人（包括残障人士）都可访问。Django 的内置组件（例如管理界面和默认表单渲染）应遵循既定的可访问性标准，并满足我们自身对支持特定输入设备和辅助技术的要求。 可访问性标准 Link to this heading # 我们致力于遵循 《Web…","html":"<h1>可访问性<a class=\"heading-anchor\" href=\"#accessibility\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>Django 项目致力于确保使用 Django 构建的网站对所有人（包括残障人士）都可访问。Django 的内置组件（例如管理界面和默认表单渲染）应遵循既定的可访问性标准，并满足我们自身对支持特定输入设备和辅助技术的要求。</p>\n<section id=\"accessibility-standards\">\n<span id=\"id1\"></span><h2>可访问性标准<a class=\"heading-anchor\" href=\"#accessibility-standards\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>我们致力于遵循 <a class=\"reference external\" href=\"https://www.w3.org/TR/WCAG22/\">《Web 内容可访问性指南》`_（WCAG）2.2 版本的 AA 级别标准。WCAG 是网络可访问性领域最成熟的标准，`AA 级别指南</a> 是全球最常见的法律合规目标。</p>\n<p>我们还致力于遵循其他最佳实践，例如：</p>\n<ul class=\"simple\">\n<li><p>WCAG 2.2 <a class=\"reference external\" href=\"https://www.w3.org/WAI/WCAG22/quickref/?currentsidebar=%23col_overview&amp;levels=a%2Caa\">AAA 级别指南</a> —— 这是比 AA 级别更严格的标准。</p></li>\n<li><p>即将发布的 <a class=\"reference external\" href=\"https://www.w3.org/TR/wcag-3.0/\">WCAG 3.0</a> 指南 —— 这是一个旨在统一和改进先前 WCAG 版本的新兴标准。</p></li>\n<li><p><a href=\"#id1\"><span class=\"problematic\" id=\"id2\">`</span></a>创作工具可访问性指南`_（ATAG）2.0 —— 适用于用于生产网络内容的软件和服务的指南。</p></li>\n</ul>\n<p>若想在不直接深入研究标准的情况下了解可访问性，我们推荐 <a class=\"reference external\" href=\"https://www.a11yproject.com/\">The A11Y Project</a>，这是一个旨在让数字可访问性更易实现的社区驱动项目。</p>\n</section>\n<section id=\"support-targets-and-testing\">\n<span id=\"accessibility-support-targets\"></span><h2>支持目标与测试<a class=\"heading-anchor\" href=\"#support-targets-and-testing\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>除标准外，我们希望确保 Django 能够切实服务于使用各种输入设备和辅助技术的用户。这也有助于让 Django <a class=\"reference external\" href=\"https://en.wikipedia.org/wiki/Curb_cut_effect\">为所有人</a> 提供更好的体验。实现这一目标最有效的方法是将可访问性考量纳入功能设计环节。如有疑问，请咨询依赖辅助技术的用户或可访问性专家。你可以通过 <a class=\"reference external\" href=\"https://chat.djangoproject.com\">Django 论坛的可访问性主题</a> 或 <a class=\"reference external\" href=\"https://forum.djangoproject.com/c/internals/accessibility/26\">Django Discord 服务器</a> 的 <code class=\"docutils literal notranslate\"><span class=\"pre\">#accessibility</span></code> 频道联系 <a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/teams/#accessibility-team\">可访问性团队</a>。</p>\n<section id=\"testing-baseline\">\n<span id=\"accessibility-testing-baseline\"></span><h3>测试基准<a class=\"heading-anchor\" href=\"#testing-baseline\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>设计 UI 时充分考虑可访问性，测试将仅作为最终检查环节。对于更复杂的界面，请与其他贡献者商讨确定测试目标。如需支持或协调测试，请联系 <a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/teams/#accessibility-team\">可访问性团队</a>。</p>\n<p>始终通过以下方式测试用户界面变更：</p>\n<ul class=\"simple\">\n<li><p>仅键盘导航。常见问题包括：</p>\n<ul>\n<li><p>使用 Tab 键或方向键无法访问交互元素。</p></li>\n<li><p>交互元素“锁定”输入焦点，导致无法导航离开。</p></li>\n<li><p>交互元素在获得输入焦点时未提供视觉指示。</p></li>\n<li><p>焦点顺序与视觉传达的逻辑顺序不一致。</p></li>\n</ul>\n</li>\n<li><p>使用 <a class=\"reference external\" href=\"https://accessibilityinsights.io/\">Accessibility Insights</a> 浏览器扩展的自动检查功能，或具备 <a class=\"reference external\" href=\"https://github.com/dequelabs/axe-core\">Axe</a> 检查器的等效工具。</p></li>\n</ul>\n<p>如果 UI 变更可能影响以下交互方式，也需进行测试：</p>\n<ul class=\"simple\">\n<li><p>仅触摸导航。常见问题包括：</p>\n<ul>\n<li><p>触摸目标（交互元素）尺寸过小。</p></li>\n<li><p>基于悬停的交互无法在触摸设备上实现，例如仅悬停显示的提示框。</p></li>\n</ul>\n</li>\n<li><p>400% 浏览器缩放。常见问题包括：</p>\n<ul>\n<li><p>缩放时内容被截断或消失。</p></li>\n<li><p>内容本质上无需二维布局，却导致垂直和水平双向滚动。对于图像、地图、视频和数据表格等内容，因需要两个维度来确保可用性，二维滚动是可接受的。</p></li>\n</ul>\n</li>\n<li><p>强制色彩模式（例如 Windows 对比度主题）。注意，可通过 <a class=\"reference internal\" href=\"/zh-hans/6.0/internals/contributing/writing-code/unit-tests/#screenshot-tests\"><span class=\"std std-ref\">截图测试</span></a> 中的 <code class=\"docutils literal notranslate\"><span class=\"pre\">&quot;high_contrast&quot;</span></code> 模式进行测试。常见问题包括：</p>\n<ul>\n<li><p>过度依赖颜色传达含义，在强制色彩模式下会丢失信息。</p></li>\n<li><p>使用 <code class=\"docutils literal notranslate\"><span class=\"pre\">!important</span></code> 或内联样式可能会破坏强制色彩模式。</p></li>\n</ul>\n</li>\n</ul>\n</section>\n<section id=\"recommended-assistive-technologies\">\n<span id=\"assistive-technologies\"></span><h3>推荐的辅助技术<a class=\"heading-anchor\" href=\"#recommended-assistive-technologies\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h3>\n<p>若 UI 变更可能影响辅助技术，我们推荐测试以下常用的免费选项。</p>\n<p>对于 Windows：</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://www.nvaccess.org/\">NVDA</a> —— 推荐搭配 Firefox ESR 使用</p></li>\n<li><p><a class=\"reference external\" href=\"https://support.microsoft.com/en-us/windows/complete-guide-to-narrator-e4397a0d-ef4f-b386-d8ae-c172f109bdb1\">Narrator</a> —— 推荐搭配 Microsoft Edge 使用</p></li>\n<li><p>Windows Magnifier</p></li>\n<li><p>Windows Speech Recognition</p></li>\n<li><p><a class=\"reference external\" href=\"https://support.microsoft.com/en-us/windows/change-color-contrast-in-windows-fedc744c-90ac-69df-aed5-c8a90125e696\">Contrast themes</a></p></li>\n</ul>\n<p>对于 macOS：</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://support.apple.com/en-gb/guide/voiceover-guide/welcome/web\">VoiceOver</a> —— 推荐搭配 Safari 使用</p></li>\n<li><p>macOS Zoom</p></li>\n<li><p>macOS Voice Control</p></li>\n</ul>\n<p>对于 Linux：</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://help.gnome.org/users/orca/stable/\">Orca</a> —— 推荐搭配 Firefox ESR 使用</p></li>\n</ul>\n<p>针对移动设备或平板电脑：</p>\n<ul class=\"simple\">\n<li><p>iOS 的 VoiceOver，或 Android 的 TalkBack</p></li>\n</ul>\n<p>以下是常用的授权选项。如果你是这些软件的用户，或能与持有许可的用户协作，也建议进行测试：</p>\n<ul class=\"simple\">\n<li><p>Windows 上的 <a class=\"reference external\" href=\"https://www.freedomscientific.com/products/software/jaws/\">JAWS</a></p></li>\n<li><p>Windows 上的 <a class=\"reference external\" href=\"https://www.nuance.com/en-gb/dragon.html\">Dragon</a></p></li>\n</ul>\n</section>\n</section>\n<section id=\"known-issues-and-how-to-help\">\n<span id=\"accessibility-known-issues-how-to-help\"></span><h2>已知问题及协助方式<a class=\"heading-anchor\" href=\"#known-issues-and-how-to-help\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Django 的某些部分尚未达到我们的可访问性目标。我们正积极修复问题，既包括持续维护，也包含重大改进。若想了解已知问题并参与贡献，请参阅：</p>\n<ul class=\"simple\">\n<li><p><a class=\"reference external\" href=\"https://chat.djangoproject.com\">Django Discord服务器</a> 上的 <code class=\"docutils literal notranslate\"><span class=\"pre\">#accessibility</span></code> 频道。</p></li>\n<li><p><a class=\"reference external\" href=\"https://forum.djangoproject.com/c/internals/accessibility/26\">Django 论坛的可访问性话题</a>。</p></li>\n<li><p><a class=\"reference external\" href=\"https://code.djangoproject.com/query?status=!closed&amp;keywords=~accessibility\">工单系统中的可访问性问题</a>。</p></li>\n<li><p>我们的 <a class=\"reference external\" href=\"https://github.com/orgs/django/projects/7\">django accessibility improvements</a> 项目看板。</p></li>\n<li><p><a class=\"reference external\" href=\"https://www.djangoproject.com/foundation/teams/#accessibility-team\">可访问性团队</a>。</p></li>\n</ul>\n</section>","rootId":"accessibility","toc":[{"title":"可访问性标准","anchor":"accessibility-standards","children":[]},{"title":"支持目标与测试","anchor":"support-targets-and-testing","children":[{"title":"测试基准","anchor":"testing-baseline","children":[]},{"title":"推荐的辅助技术","anchor":"recommended-assistive-technologies","children":[]}]},{"title":"已知问题及协助方式","anchor":"known-issues-and-how-to-help","children":[]}],"breadcrumbs":[{"docname":"internals/index","title":"Django内部","url":"/zh-hans/6.0/internals/"},{"docname":"internals/contributing/index","title":"为 Django 做贡献","url":"/zh-hans/6.0/internals/contributing/"},{"docname":"internals/contributing/writing-code/index","title":"贡献代码","url":"/zh-hans/6.0/internals/contributing/writing-code/"}],"prev":{"docname":"internals/contributing/writing-code/javascript","title":"JavaScript 代码","url":"/zh-hans/6.0/internals/contributing/writing-code/javascript/"},"next":{"docname":"internals/contributing/committing-code","title":"提交代码","url":"/zh-hans/6.0/internals/contributing/committing-code/"},"formats":{"html":"/zh-hans/6.0/internals/contributing/accessibility/","markdown":"/zh-hans/6.0/internals/contributing/accessibility.md","json":"/zh-hans/6.0/internals/contributing/accessibility.json"},"source":"https://github.com/django/django/blob/stable/6.0.x/docs/internals/contributing/accessibility.txt","official":"https://docs.djangoproject.com/zh-hans/6.0/internals/contributing/accessibility/","inVersions":["6.1","6.0","5.2"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}