diff --git a/docs/output-formats/typst.qmd b/docs/output-formats/typst.qmd index 87e988b375..2950a69928 100644 --- a/docs/output-formats/typst.qmd +++ b/docs/output-formats/typst.qmd @@ -237,6 +237,34 @@ Note that [named Typst colors](https://typst.app/docs/reference/visualize/color/ Typst does not support opacity as a filter, so opacity is simulated using the alpha channel of the color. +## Accessibility + +### Equation Alt Text {#equation-alt-text} + +Equations in Typst can include alternative text for screen readers. +Use the `alt` attribute in the equation label: + +```markdown +$$ +E = mc^2 +$$ {#eq-einstein alt="Einstein's mass-energy equivalence equation"} +``` + +The `alt` attribute provides a plain-text description of the equation's meaning, which assistive technologies can read aloud. +Mathematical notation is often inaccessible to screen readers by default, making this particularly valuable. + +**Best practices for equation alt text:** + +- Describe what the equation represents, not just the symbols. +- Use plain language that conveys the equation's purpose. +- Keep descriptions concise but meaningful. + +| Equation | Alt Text | +| ----------------------- | -------------------------------------------------------- | +| `E = mc^2` | "Einstein's mass-energy equivalence equation" | +| `a^2 + b^2 = c^2` | "Pythagorean theorem relating sides of a right triangle" | +| `\frac{d}{dx}[f(g(x))]` | "Chain rule for derivatives" | + ## Typst File (`.typ`) The rendering process produces a native Typst file (`.typ)` which is then compiled to PDF using the Typst CLI. This intermediate file is then automatically removed. If you want to preserve the `.typ` file, use the `keep-typ` option. For example: diff --git a/docs/prerelease/1.9/_highlights.qmd b/docs/prerelease/1.9/_highlights.qmd index 19360fcdcb..f10942e67f 100644 --- a/docs/prerelease/1.9/_highlights.qmd +++ b/docs/prerelease/1.9/_highlights.qmd @@ -4,6 +4,8 @@ Quarto 1.9 includes the following new features: - [`aria-label` for videos](/docs/authoring/videos.qmd#accessibility-label): Improve accessibility of embedded videos by providing custom descriptive labels for screen readers instead of the default "Video Player" label. +- [Alt text for equations in Typst](/docs/output-formats/typst.qmd#equation-alt-text): Improve accessibility of cross-referenced equations by providing descriptive text for screen readers using the `alt` attribute. + - [`quarto use brand` command](/docs/authoring/brand.qmd#quarto-use-brand): Add or update brand assets from an external source. - Metadata and brand extensions now work without a `_quarto.yml` project. A temporary default project is created in memory.