Skip to content

a11y: icon-only buttons lack visible text and persistent accessible names #4997

Closed

Description

@rkristelijn

Summary

Several toolbar buttons throughout the app (including the sidebar TOC expand/collapse controls) use icon-only SVGs without visible text labels. The title attribute (native tooltip) is unreliable across re-renders and does not satisfy WCAG 2.1 SC 1.1.1 (Non-text Content) or SC 4.1.2 (Name, Role, Value) for interactive controls.

Current behaviour

  • Buttons show an icon only — no visible text, no persistent tooltip
  • title attributes disappear after component re-renders (observed with Vue reactivity + Element Plus)
  • Screen readers may announce the button without a meaningful name

Expected behaviour

  • Every interactive control has a persistent accessible name (aria-label or visible text)
  • Icon-only buttons should show a tooltip on hover/focus that does not disappear on re-render
  • Consider using a custom tooltip component (e.g. el-tooltip) instead of the native title attribute, as title is unreliable with SPA frameworks

Affected areas (non-exhaustive)

  • TOC sidebar: expand/collapse buttons
  • Any other icon-only buttons in the sidebar or toolbar

WCAG references

Suggested fix

  1. Add aria-label on all icon-only buttons (done for TOC in feat(toc): highlight active heading based on cursor position #4345)
  2. Replace native title with <el-tooltip> wrapper for reliable hover text
  3. Optionally add visually-hidden text (<span class="sr-only">) as a fallback for older assistive tech

Activity

  1. Pranav435 commented on Oct 13, 2026

    @Pranav435
    Contributor

    I've opened #5739 for this. It turns the icon-only controls in the editor and Preferences windows into named buttons, labels the Preferences switches and selects, and adds a visible focus ring. I tested it with NVDA on Windows and VoiceOver on macOS; the before and after transcripts are in the PR.

  2. added a commit that references this issue on Oct 18, 2026
    f0cf714
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions