Skip to content

Bug in axe accessibility checks for revealjs formats #13781

@paytonej

Description

@paytonej

Description

Quarto >1.8 has integrated support for axe-core accessibility checking html. The docs say that the axe YAML metadata configuration can be added to HTML formats (html, dashboard, and revealjs).

However, adding axe to the yaml for the revealjs format results in an error in compiling the sass themes. The error is:

ERROR: Theme file compilation failed:

Error: Undefined variable.
   ╷
67 │   border: 1px solid $body-color;

Line 67 defining the border is in quarto.js This suggests that theme file sass compilation is occurring after quarto.js inclusion, though it needs to happen before.

Accessibility enhancements should be high-priority due to new rules taking effect in April 2026 under Title II of the Americans with Disabilities Act and the requirements of the European Accessibility Act (EAA), which went into effect in June 2025. Many users are now liable for the documents they render meeting these requirements.

Related discussion items:

Minimal (not) working example. Change format to "html" to create something that renders appropriately.

---
title: "Axe Causes Sass Compilation Error"
date: today
format: 
  revealjs:
    axe: true
---

## Axe test.

This violates contrast rules: [insufficient contrast.]{style="color: #eee"}.

This test works with the format as `html` but not with the format as `revealjs`.

## For revealjs, axe causes theme file compilations to fail.

The resulting error is:

```{bash}
ERROR: Theme file compilation failed:

Error: Undefined variable.
   ╷
67 │   border: 1px solid $body-color;
```

Line 67 defining the border is in `quarto.js`

This suggests that theme file sass compilation is occurring after quarto.js inclusion, though it needs to happen before.

## The end

Bug found in Quarto 1.8.26 on 10 December 2025

Originally posted by @paytonej in #13780

Metadata

Metadata

Assignees

Labels

accessibilitybugSomething isn't workingrevealjsIssues with the revealjs formatthemesRelated to HTML theming or any other style related issue (like highlight-style)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions