Skip to content

streamdown-mermaid: toolbar icon button contains unlabeled SVG and triggers accessibility warning #485

@simon5057

Description

@simon5057

Bug Description

Toolbar buttons in the Mermaid integration contain inline icons that are exposed to the accessibility tree, triggering the warning: "Content with images must be labeled." The buttons themselves have labels, but the SVGs inside lack proper aria-hidden attributes.

Image Image

Steps to Reproduce

  1. Render Mermaid content via streamdown/mermaid
  2. Inspect toolbar buttons adjacent to the diagram
  3. Run accessibility audit(Firefox Accessibility Inspector, axe DevTools)

Expected Behavior

Decorative SVG icons should be hidden from the accessibility tree.

Actual Behavior

The toolbar buttons around Mermaid-rendered content have no text alternative for screen reader users.

Code Sample

Streamdown Version

2.5.0

React Version

19.0.0

Node.js Version

No response

Browser(s)

No response

Operating System

None

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions