An accessible Jupyter notebook for chemistry
The ChemCompute Notebook (ccnb) is another way to run Jupyter notebooks on ChemCompute.
We built it so that a student can do a whole assignment with a screen reader, keyboard navigation, or screen magnification. It was also built for speech input, but that has not been tested. It is built to the Web Content Accessibility Guidelines (WCAG) 2.2, Level AA.
Getting around the page
- Everything works from the keyboard, and controls show keyboard focus.
- Each cell says where it is and what it is, such as "Cell 3 of 12, code, run number 4".
- Buttons that repeat in every cell say which cell they belong to, such as "Run, cell 3". A student who uses speech input can say the word they see.
- Tab moves on from a code cell, so users don't get trapped. Control and ] (right bracket) indents a line, and a student can choose to have Tab indent instead.
- Zoom to 400% works, and wider text spacing cuts nothing off.
- The light and dark themes both meet the contrast requirements for text, buttons and focus outlines.
- Jupyter Notebook and JupyterLab have "Open in ChemCompute Notebook" in their View menu. It opens the same notebook in the ChemCompute Notebook.
Running code
- A screen reader says how each cell ended and reads a short result in full, such as "Cell 2 finished. Output: 42".
- Errors are named in words, with the full traceback under a button. Warnings are labeled as warnings, so color is never the only sign.
- Alt and O goes to the output of the cell that ran last. Alt and F1 lists the keys.
Formulas, text and tables
- Formulas written in LaTeX are read aloud as written and are given in braille as well. A rate law such as k[A][B] is read with its brackets. That is k with A and B each in square brackets.
- In a chemical equation written with mhchem, each arrow is read by what it means, such as "reacts to form".
- A student can choose to have their own screen reader read the formulas instead.
- Headings in a text cell are real headings, so a screen reader can jump from section to section.
- Tables are real tables, read with their column headings.
Plots
- Every matplotlib figure is described automatically. The description gives the kind of plot, its title, each axis and the name of each series.
- Under each figure, "Figure details and data" has a sentence for each series and a table of the plotted numbers.
- Plots made with seaborn are described as well.
Molecules, orbitals and spectra
These come from the chemcompute Python package that ChemCompute's example notebooks use.
- A 3D model is announced with a description, such as "3D model of water (H2O), 3 atoms, drawn as sticks."
- Under each model, "Model details and data" gives the rest in tables. For a molecule, that is every bond with its length, and the bond angles.
- Buttons turn, move and zoom a model, and a screen reader hears each press.
- The energy-level diagram lists each orbital with its energy and electrons, and names the HOMO, the LUMO and the gap between them.
- The simulated IR spectrum lists each band with its wavenumber and intensity.
Sliders, menus and animations
- A slider works from the keyboard, and a screen reader says the new value at each step. Every slider has a box beside it for typing the number.
- Menus, checkboxes, text boxes and buttons are the ordinary ones a browser provides.
- A matplotlib animation stays still until the student presses Play animation. Previous frame and Next frame step through it, and each frame has a description.
Files and working together
- The file list is a table, read with its headings. New notebooks, new files and folders, and uploads each have a button.
- When students work on a notebook together, other people's changes never move the keyboard focus and never scroll the page.
- Alt and P says who else is in the notebook and where.
- Working together has been tested only with scripted classmates. No student has used it yet.
How it has been tested
- Automated tests drive the page in a real browser, with a real kernel running the code.
- The AccessLint checker finds no violations on the notebook page, the file list, or pages of 3D models, sliders and animations.
- Scripted passes with the NVDA screen reader have covered nearly everything in Chrome and part of each feature in Firefox.
- No person who uses a screen reader has tested it yet.
- It has not been tested with JAWS, VoiceOver or a braille display. It has not been tested in Safari or on a phone or tablet.
The main things that do not work yet
- Bokeh and Plotly charts have no description. Instead, please use matplotlib, whose plots the notebook describes in full.
- A few kinds of widget are missing, such as sliders with two handles and pickers for colors, dates and files.
- The code editor is a plain text box, with no syntax coloring or code completion.
- A model cannot be turned with a finger on a touch screen. Use the buttons instead.
- Nothing is said by itself during a long calculation. Alt and R says what is running.
- With NVDA, braille for formulas needs the setting "Use my screen reader's math".
Try it with your class
Do you teach with Jupyter notebooks and want to try this one with your students? Do you use a screen reader and want to help test it? Please get in touch.
This page was last updated on December 2, 2026.