Skip to content

Document alt text for the dashboard navbar logo #14690

Description

@cwickham

A format: dashboard navbar logo renders as a link wrapping an <img>, and unless the author supplies alt text it ships with alt="" — leaving the link with no accessible name (axe link-name, serious; WCAG 2.2 SC 2.4.4 Link Purpose (In Context)). Quarto has two working ways to set that alt text, but neither is documented anywhere:

format:
  dashboard:
    logo:
      path: images/penguins.png
      alt: "Palmer Penguins"
format:
  dashboard:
    logo: images/penguins.png
    logo-alt: "Palmer Penguins"

Both verified on Quarto 1.10.12: the alt lands on the rendered logo and gives the logo link its accessible name. The object form has been schema-valid since 1.8 (it accepts the full logo-light-dark-specifier, including per-light/dark objects); logo-alt has been honored by the dashboard template since dashboards debuted in 1.4 and is still explicitly supported (format-dashboard.ts#L126-L140). Alt can also come from a _brand.yml named logo resource (logo: images: <name>: {path, alt}).

Two places need it:

  1. Dashboard layout guide, Navigation section — currently says only "You can also include a logo and one or more nav-buttons", and the YAML example uses the bare string form. Adding alt to that example (plus a sentence saying why) would make the accessible form the copy-paste default.

  2. Dashboard format reference — the logo entry's description ("Logo image(s) (placed on the left side of the navigation bar)") doesn't mention alt or the object form, and logo-alt is absent entirely. This page is auto-generated from the schema, and logo-alt is missing from document-dashboard.yml (it's only defined for website navbars/sidebars), so fixing the reference likely requires a schema change rather than a quarto-web edit.

An AI assistant helped investigate, grounded in a local clone of this repo (per CONTRIBUTING.md).

Related: #14660 tracks what the default should be when no alt is provided; #13131 requests logo-href for dashboards. This issue is only about documenting the alt options that already work.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions