Sphinx extension that provides accessibility features.
Project description
Adding accessibility to Sphinx
Sphinx extension that provides accessibility features.
Introduction
This Sphinx extension provides various accessibility features to enhance the usability of Sphinx-generated books. Features include:
- Support for dyslexic-friendly fonts
- High contrast mode
Installation
To install the Sphinx-Accessibility extension, follow these steps:
Step 1: Install the Package
Install the Sphinx-Accessibility package using pip:
pip install sphinx-accessibility
Step 2: Add to requirements.txt
Make sure that the package is included in your project's requirements.txt to track the dependency:
sphinx-accessibility
Step 3: Enable in _config.yml
In your _config.yml file, add the extension to the list of Sphinx extra extensions:
sphinx:
extra_extensions:
- sphinx_accessibility
Features
Accessibility Menu
The accessibility menu provides a centralized location for users to adjust various accessibility settings, including font size, contrast, and more. The icon for this menu is .
Support for dyslexic-friendly fonts
This feature allows users to switch to the dyslexic-friendly font OpenDyslexic, improving readability for individuals with dyslexia. The font can be toggled on and off using the button in the accessibility menu
.
High contrast mode
This feature allows users to switch to a high contrast mode, improving visibility for individuals with visual impairments. The mode can be toggled on and off using the button in the accessibility menu
.
The high-contrast mode tries to apply the following changes to the CSS:
- Change text and border colors to black in light-mode and white in dark-mode.
- Change background colors to white in light-mode and black in dark-mode.
- Makes all colors twice as intense.
- In dark-mode only: increases contrast with factor 1.5.
Example
You can see how the accessibility features work in this example book.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_accessibility-1.0.1.tar.gz.
File metadata
- Download URL: sphinx_accessibility-1.0.1.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2e1b882fb573cb36d7d145fc924c9014c8e4c5b9204ca7d1d9d2c14f71179df
|
|
| MD5 |
dcd0b385af04f239e0e5f595c99ebe6a
|
|
| BLAKE2b-256 |
49dda9a4ea6d9221d7e21ae0fcfe151105d1edcebcc3e6dc316b1e5283d6a0a8
|
Provenance
The following attestation bundles were made for sphinx_accessibility-1.0.1.tar.gz:
Publisher:
python-publish.yml on TeachBooks/Sphinx-Accessibility
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_accessibility-1.0.1.tar.gz -
Subject digest:
a2e1b882fb573cb36d7d145fc924c9014c8e4c5b9204ca7d1d9d2c14f71179df - Sigstore transparency entry: 439030145
- Sigstore integration time:
-
Permalink:
TeachBooks/Sphinx-Accessibility@af490bf946430993b146615812f3ffc74f8f5bf3 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/TeachBooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@af490bf946430993b146615812f3ffc74f8f5bf3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sphinx_accessibility-1.0.1-py3-none-any.whl.
File metadata
- Download URL: sphinx_accessibility-1.0.1-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d58d65c821e3854b31b35ae9fb90fd88ec1ced3943bdf2c5070e1930b96d03d0
|
|
| MD5 |
1869c2cc61cbd5e6b1a9619973de962c
|
|
| BLAKE2b-256 |
5c606bf80661f1fc2573c6485819dc6daafa9e80b26fc60559e3cdba7552716d
|
Provenance
The following attestation bundles were made for sphinx_accessibility-1.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on TeachBooks/Sphinx-Accessibility
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_accessibility-1.0.1-py3-none-any.whl -
Subject digest:
d58d65c821e3854b31b35ae9fb90fd88ec1ced3943bdf2c5070e1930b96d03d0 - Sigstore transparency entry: 439030167
- Sigstore integration time:
-
Permalink:
TeachBooks/Sphinx-Accessibility@af490bf946430993b146615812f3ffc74f8f5bf3 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/TeachBooks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@af490bf946430993b146615812f3ffc74f8f5bf3 -
Trigger Event:
push
-
Statement type: