Color Contrast Checker for NVDA
Color contrast is one of those accessibility requirements that blind testers have historically been expected to hand off to somebody else. You can run an automated scanner, but tools such as axe and WAVE tell you to carefully review the contrast findings, and that there is a good chance they are inaccurate. They miss some cases, and they tell you nothing about the focus indicator.
I built Color Contrast Checker for NVDA so I could check it myself.
The add-on extends tools that are already part of NVDA. Put focus on some text and press NVDA+F. Along with the font, size, and other formatting information, NVDA reports the foreground and background colors and their contrast ratio. Press the command twice quickly if you want the results in a browsable window.
Four commands cover most checks
| Task | Command |
|---|---|
| Check the focused text | NVDA+F |
| Check text at the review cursor | NVDA+Shift+F |
| Check the focus indicator | NVDA+Shift+C |
| Audit visible text across the page | NVDA+Shift+Ctrl+F |
The page audit finds every piece of visible text in the current page state and groups failures by the WCAG thresholds they miss: 3:1 for large text, 4.5:1 for normal text, and 7:1 for the stricter AAA requirement.
The review cursor command helps when the system caret isn't where you need it. The focus indicator command checks the contrast between the visible ring and the color around it, then reads the colors and ratio aloud.
Understanding the reliability of the results
A ratio is evidence, and good evidence at that. My team has been using this add-on for a few months. We have found that if it calls something out, it is usually a failure.
However, there are a few edge cases that you should keep in mind.
For one, focus indicators have size and area requirements in addition to contrast. The add-on gives you the measurement, but it is up to you and your subjectmatter knowledge to determine whether the whole requirement passes.
for two, the page audit only sees text that is visible right now. Menus that haven't been opened, hover states, collapsed sections, lazy loaded content, text drawn inside images, and other application states still need to be tested separately. Also, focus rings may only be checked while an element has focus since they do not exist otherwise. the page-wide text audit should not be thought of as a full page contrast audit.
How it works
For text, the add-on reads the foreground and background colors exposed through NVDA, converts them to relative luminance, and applies the WCAG contrast formula. Focus indicators need a different approach. The add-on captures a small area around the focused control, samples the pixels near its edges, and looks for the strongest color change against the surrounding background.
Everything runs on your computer. There is no AI involved, and the add-on makes no network requests.
Try it
Install Color Contrast Checker from NVDA's Add-on Store, or download the latest release from GitHub and open the .nvda-addon file while NVDA is running.
The contrast test page includes known text ratios, several kinds of focus rings, non-white backgrounds, missing indicators, and other cases you can use to learn the commands. The GitHub README has build instructions and a more detailed explanation of how each check works.