Skip to main content

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.

Metadata

Release files for sphinx-accessibility 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-accessibility 1.0.1
File Size Uploaded Provenance
sphinx_accessibility-1.0.1.tar.gz 1.0 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-accessibility 1.0.1
File Interpreter ABI Platform
sphinx_accessibility-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / sphinx_accessibility-1.0.1.tar.gz

Download URL sphinx_accessibility-1.0.1.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
a2e1b882fb573cb36d7d145fc924c9014c8e4c5b9204ca7d1d9d2c14f71179df
BLAKE2b-256 checksum
How to use checksums
49dda9a4ea6d9221d7e21ae0fcfe151105d1edcebcc3e6dc316b1e5283d6a0a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2025.

Transparency log

Release files / sphinx_accessibility-1.0.1-py3-none-any.whl

Download URL sphinx_accessibility-1.0.1-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d58d65c821e3854b31b35ae9fb90fd88ec1ced3943bdf2c5070e1930b96d03d0
BLAKE2b-256 checksum
How to use checksums
5c606bf80661f1fc2573c6485819dc6daafa9e80b26fc60559e3cdba7552716d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2025.

Transparency log

Security for sphinx-accessibility 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sphinx_accessibility-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page