You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We run a [Lighthouse](https://developers.google.com/web/tools/lighthouse) job in our CI/CD, which generates a "score" for all pages in our **Kitchen Sink** example documentation.
15
-
The configuration for Lighthouse can be found in the `.github/workflows/lighthouserc.json` file.
47
+
## Known limitations and manual auditing
16
48
17
-
For more information about configuring Lighthouse, see [the Lighthouse documentation](https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/configuration.md).
18
-
For more information about Accessibility in general, see [](../../user_guide/accessibility.md).
49
+
We are well aware that automated checks fall far short of comprehensive
50
+
accessibility auditing and testing, so we also conducted an accessibility audit
51
+
of three pages from the theme docs. We collected those findings in an issue on
We have also recently added automated tests using [Playwright](https://playwright.dev/python/) and [axe-core](https://github.com/dequelabs/axe-core) to improve our accessibility testing and reporting.
55
+
Nearly all of the issues have been fixed, but of course things do break / have
56
+
already broken, and some things may have never been discovered, so please
57
+
[create an issue](https://github.com/pydata/pydata-sphinx-theme/issues/new) on
Creating and publishing content that does not exclude disabled users is a complex and iterative task.
3
+
Creating and publishing content that does not exclude disabled users is a
4
+
complex and iterative task.
4
5
5
6
While there is no one-size-fits-all solution to maintaining accessible content,
6
-
the PyData Sphinx Theme and this documentation site use some techniques to avoid common content shortcomings.
7
+
the PyData Sphinx Theme and this documentation site use some techniques to avoid
8
+
common content shortcomings.
7
9
8
10
:::{note}
9
-
Issues and pull requests to identify or fix accessibility issues on this theme or site are heartily welcomed!
11
+
Issues and pull requests to identify or fix accessibility issues on this theme
12
+
or site are heartily welcomed!
10
13
:::
11
14
12
15
## What We've Done
@@ -26,12 +29,15 @@ page that lacks metadata, please open a pull request to add it!
26
29
to choose from at https://github.com/Quansight-Labs/accessible-pygments.
27
30
- We recently revisited the PyData Sphinx theme color palette to ensure that
28
31
the colors we use meet WCAG 2 AA or AAA contrast requirements.
29
-
- We also re-defined our `primary` and `secondary` colors to be more accessible and distinct from semantic colors used
30
-
to denote success, warning, info, and danger contexts or information.
31
-
- We simplified the color palette and removed some colors that were problematic in meeting WCAG 2 AA or AAA contrast requirements
32
-
and for certain types of colorblindness.
33
-
- We have improved how we assign text colors to interactive elements such as buttons and dropdowns to ensure that they meet
34
-
WCAG 2 AA or AAA contrast requirements.
32
+
- We also re-defined our `primary` and `secondary` colors to be more accessible
33
+
and distinct from semantic colors used to denote success, warning, info, and
34
+
danger contexts or information.
35
+
- We simplified the color palette and removed some colors that were problematic
36
+
in meeting WCAG 2 AA or AAA contrast requirements and for certain types of
37
+
colorblindness.
38
+
- We have improved how we assign text colors to interactive elements such as
39
+
buttons and dropdowns to ensure that they meet WCAG 2 AA or AAA contrast
40
+
requirements.
35
41
36
42
### Keyboard Navigation Support
37
43
@@ -41,6 +47,11 @@ links and other interactive elements, we have worked to ensure they:
41
47
- Have a visible focus indicator (WCAG 2.4.7)
42
48
- Can be accessed via keyboard navigation (WCAG 2.1.1)
43
49
50
+
### Testing and auditing
51
+
52
+
We have also added automated tests and conducted manual audits. See
53
+
[](../community/topics/accessibility.md).
54
+
44
55
## What You Can Do
45
56
46
57
### Site configuration
@@ -55,10 +66,12 @@ specifying at least the baseline natural language will help assistive technology
55
66
identify if the content is in a language the reader understands.
56
67
57
68
:::{hint}
58
-
In your `conf.py` file, [specifying the language your docs are written in](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language) will propagate to the top-level `HTML` tag.
69
+
In your `conf.py` file,
70
+
[specifying the language your docs are written in](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language)
71
+
will propagate to the top-level `HTML` tag.
59
72
60
73
```python
61
-
language ="en"
74
+
language ="en"
62
75
```
63
76
64
77
:::
@@ -80,71 +93,71 @@ For a simple site (no extra languages or versions), ensure `sphinx-sitemap`
80
93
is installed in your documentation environment, and modify your `conf.py`:
and [Pa11y CI](https://github.com/pa11y/pa11y-ci).
138
150
139
-
Several automated tools are available for assessing _glaring_ accessibility
140
-
issues across some pages at once, usually with many configurable options.
151
+
The [foo-software/lighthouse-check-action](https://github.com/foo-software/lighthouse-check-action)
152
+
may be helpful if the code for your site is hosted on GitHub.
141
153
142
-
#### Lighthouse
154
+
If you are curious about how we do accessibility CI for this theme, refer to the
155
+
page [](../community/topics/accessibility.md).
143
156
144
-
[Lighthouse](https://developers.google.com/web/tools/lighthouse) provides an automated assessment of basic accessibility issues in addition to search engine
145
-
automation, page performance, and other best practices.
If in your site's :ref:`custom CSS file <custom-css>` you override the :ref:`CSS custom properties <css-variables>` ``--pst-color-*`` (where ``*`` is one of the semantic color names, such as ``primary``, ``danger``), badges and buttons will automatically use the custom color.
135
+
<https://sphinx-design.readthedocs.io/en/latest/badges_buttons.html>`__ are
136
+
actually links, meaning they are rendered in HTML with ``<a>`` tags instead
137
+
of ``<button>``. Use them if you need a link to look like a button, but try
138
+
not to overuse them as they are not considered best practice for
139
+
accessibility. (For example, the space bar can be used on a ``<button>``s but
140
+
not on ``<a>``-tag links.)
141
+
142
+
If in your site's :ref:`custom CSS file <custom-css>` you override the :ref:`CSS
143
+
custom properties <css-variables>` ``--pst-color-*`` (where ``*`` is one of the
144
+
semantic color names, such as ``primary``, ``danger``), badges and buttons will
0 commit comments