| 1 |
============= |
| 2 |
Accessibility |
| 3 |
============= |
| 4 |
|
| 5 |
The Django project is committed to ensuring that websites built with Django are |
| 6 |
usable by everyone, including people with disabilities. Django's built-in |
| 7 |
components, such as the admin interface and default form rendering, should |
| 8 |
adhere to established accessibility standards and meet our own targets for |
| 9 |
supporting specific input devices and assistive technologies. |
| 10 |
|
| 11 |
.. _accessibility-standards: |
| 12 |
|
| 13 |
Accessibility standards |
| 14 |
======================= |
| 15 |
|
| 16 |
We work to conform with the `Web Content Accessibility Guidelines`_ (WCAG), |
| 17 |
version 2.2, at the AA level. WCAG is the most established standard for web |
| 18 |
accessibility. `AA-level guidelines`_ are the most common legal compliance |
| 19 |
target worldwide. |
| 20 |
|
| 21 |
We also aim to follow other best practices, such as: |
| 22 |
|
| 23 |
* WCAG 2.2 `AAA-level guidelines`_ – stricter criteria that go beyond the AA |
| 24 |
level. |
| 25 |
* The upcoming `WCAG 3.0`_ guidelines – a new, evolving standard that aims to |
| 26 |
unify and improve upon previous versions of WCAG. |
| 27 |
* `Authoring Tool Accessibility Guidelines`_ (ATAG) 2.0 – guidelines for |
| 28 |
software and services that are used to produce web content. |
| 29 |
|
| 30 |
To learn more about accessibility without diving straight into standards, we |
| 31 |
recommend `The A11Y Project`_, a community-driven effort to make digital |
| 32 |
accessibility easier. |
| 33 |
|
| 34 |
.. _Web Content Accessibility Guidelines: https://www.w3.org/TR/WCAG22/ |
| 35 |
.. _AA-level guidelines: https://www.w3.org/WAI/WCAG22/quickref/?currentsidebar=%23col_overview&levels=aaa |
| 36 |
.. _AAA-level guidelines: https://www.w3.org/WAI/WCAG22/quickref/?currentsidebar=%23col_overview&levels=a%2Caa |
| 37 |
.. _WCAG 3.0: https://www.w3.org/TR/wcag-3.0/ |
| 38 |
.. _WCAG 3.0: https://www.w3.org/TR/wcag-3.0/ |
| 39 |
.. _Authoring Tool Accessibility Guidelines: https://www.w3.org/TR/ATAG20/ |
| 40 |
.. _The A11Y Project: https://www.a11yproject.com/ |
| 41 |
|
| 42 |
.. _accessibility-support-targets: |
| 43 |
|
| 44 |
Support targets and testing |
| 45 |
=========================== |
| 46 |
|
| 47 |
Beyond standards, we want to make sure Django actually works for people using a |
| 48 |
wide range of input devices and assistive technologies. This has benefits to |
| 49 |
make sure Django works better `for everyone`_. The best way to do this |
| 50 |
effectively is to take accessibility considerations into account as part of |
| 51 |
designing features. If in doubt, consult with users who rely on assistive |
| 52 |
technologies or with accessibility experts. You can reach out to the |
| 53 |
`Accessibility team`_ via the `Accessibility Django forum topic`_ or via the |
| 54 |
``#accessibility`` channel on the `Django Discord server`_. |
| 55 |
|
| 56 |
.. _for everyone: https://en.wikipedia.org/wiki/Curb_cut_effect |
| 57 |
|
| 58 |
.. _accessibility-testing-baseline: |
| 59 |
|
| 60 |
Testing baseline |
| 61 |
---------------- |
| 62 |
|
| 63 |
Design the UI with accessibility in mind, and the testing will only be needed |
| 64 |
as a final check. For more complex interfaces, confer with other contributors |
| 65 |
to decide on testing targets. Reach out to the `Accessibility team`_ for |
| 66 |
support and to coordinate testing. |
| 67 |
|
| 68 |
Always test user interface changes with: |
| 69 |
|
| 70 |
* Keyboard-only navigation. Common issues include: |
| 71 |
|
| 72 |
* An interactive element can't be reached using the Tab or arrow keys. |
| 73 |
* An interactive element "traps" input focus and prevents navigating away. |
| 74 |
* An interactive element doesn't give a visible indication when it has input |
| 75 |
focus. |
| 76 |
* The focus order is inconsistent with the logical order that's communicated |
| 77 |
visually. |
| 78 |
|
| 79 |
* The `Accessibility Insights`_ browser extension's automated checks feature, |
| 80 |
or an equivalent tool with the `Axe`_ checker. |
| 81 |
|
| 82 |
Where the UI changes could affect those modalities, also test with: |
| 83 |
|
| 84 |
* Touch-only navigation. Common issues include: |
| 85 |
|
| 86 |
* A touch target (interactive element) is too small. |
| 87 |
* Hover-based based interaction which does not translate to touch, such as a |
| 88 |
hover only tooltip. |
| 89 |
|
| 90 |
* 400% browser zoom. Common issues include: |
| 91 |
|
| 92 |
* Content is cut off or disappears when zoomed. |
| 93 |
* Content that does not inherently require a two-dimensional layout causes |
| 94 |
scrolling in both directions (vertical and horizontal). Two-dimensional |
| 95 |
scrolling is acceptable for content like images, maps, videos, and data |
| 96 |
tables, which require both dimensions to be usable. |
| 97 |
|
| 98 |
* Forced-colors mode (for example Windows Contrast Themes). Note that this can |
| 99 |
be tested via the ``"high_contrast"`` mode in the :ref:`screenshot tests |
| 100 |
<screenshot-tests>`. Common issues include: |
| 101 |
|
| 102 |
* Over-reliance on color for meaning, which is lost in forced-colors mode. |
| 103 |
* Use of ``!important`` or inline styles may break forced-colors mode. |
| 104 |
|
| 105 |
.. _assistive-technologies: |
| 106 |
|
| 107 |
Recommended assistive technologies |
| 108 |
---------------------------------- |
| 109 |
|
| 110 |
Where the UI changes could affect assistive technologies, here are popular free |
| 111 |
options we recommend testing with. |
| 112 |
|
| 113 |
For Windows: |
| 114 |
|
| 115 |
* `NVDA`_ - recommended with Firefox ESR |
| 116 |
* `Narrator`_ - recommended with Microsoft Edge |
| 117 |
* Windows Magnifier |
| 118 |
* Windows Speech Recognition |
| 119 |
* `Contrast themes`_ |
| 120 |
|
| 121 |
For macOS: |
| 122 |
|
| 123 |
* `VoiceOver`_ - recommended with Safari |
| 124 |
* macOS Zoom |
| 125 |
* macOS Voice Control |
| 126 |
|
| 127 |
For Linux: |
| 128 |
|
| 129 |
* `Orca`_ - recommended with Firefox ESR |
| 130 |
|
| 131 |
For mobile or tablet: |
| 132 |
|
| 133 |
* VoiceOver on iOS, or TalkBack on Android |
| 134 |
|
| 135 |
The following are popular licensed options. If you are a user of these, or can |
| 136 |
work with a user holding a license, also test against: |
| 137 |
|
| 138 |
* `JAWS`_ on Windows |
| 139 |
* `Dragon`_ on Windows |
| 140 |
|
| 141 |
.. _Accessibility Insights: https://accessibilityinsights.io/ |
| 142 |
.. _Axe: https://github.com/dequelabs/axe-core |
| 143 |
.. _NVDA: https://www.nvaccess.org/ |
| 144 |
.. _Narrator: https://support.microsoft.com/en-us/windows/complete-guide-to-narrator-e4397a0d-ef4f-b386-d8ae-c172f109bdb1 |
| 145 |
.. _VoiceOver: https://support.apple.com/en-gb/guide/voiceover-guide/welcome/web |
| 146 |
.. _TalBack: https://support.google.com/accessibility/android/answer/6283677 |
| 147 |
.. _Contrast themes: https://support.microsoft.com/en-us/windows/change-color-contrast-in-windows-fedc744c-90ac-69df-aed5-c8a90125e696 |
| 148 |
.. _JAWS: https://www.freedomscientific.com/products/software/jaws/ |
| 149 |
.. _Dragon: https://www.nuance.com/en-gb/dragon.html |
| 150 |
.. _Orca: https://help.gnome.org/users/orca/stable/ |
| 151 |
|
| 152 |
.. _accessibility-known-issues-how-to-help: |
| 153 |
|
| 154 |
Known issues and how to help |
| 155 |
============================ |
| 156 |
|
| 157 |
There are parts of Django that do not meet our accessibility targets. We |
| 158 |
actively work on fixing issues, both as part of ongoing maintenance and bigger |
| 159 |
overhauls. To learn about known issues, and get involved, see: |
| 160 |
|
| 161 |
* ``#accessibility`` on the `Django Discord server`_. |
| 162 |
* The `Accessibility Django forum topic`_. |
| 163 |
* `Accessibility issues on the ticket tracker`_. |
| 164 |
* Our `django accessibility improvements`_ project board. |
| 165 |
* The `Accessibility team`_. |
| 166 |
|
| 167 |
.. _Django Discord server: https://chat.djangoproject.com |
| 168 |
.. _Accessibility Django forum topic: https://forum.djangoproject.com/c/internals/accessibility/26 |
| 169 |
.. _Accessibility issues on the ticket tracker: https://code.djangoproject.com/query?status=!closed&keywords=~accessibility |
| 170 |
.. _django accessibility improvements: https://github.com/orgs/django/projects/7 |
| 171 |
.. _Accessibility team: https://www.djangoproject.com/foundation/teams/#accessibility-team |