Skip to content

fix(memory-graph): accessible names and states for graph controls#1349

Open
abhay-codes07 wants to merge 1 commit into
supermemoryai:mainfrom
abhay-codes07:fix/graph-controls-a11y
Open

fix(memory-graph): accessible names and states for graph controls#1349
abhay-codes07 wants to merge 1 commit into
supermemoryai:mainfrom
abhay-codes07:fix/graph-controls-a11y

Conversation

@abhay-codes07

Copy link
Copy Markdown
Contributor

A few screen-reader gaps in the published @supermemory/memory-graph control surfaces.

Zoom buttons had no accessible name

The zoom in/out buttons render only a + / glyph inside a <span>, with no text or label, so assistive tech announces them as an unnamed "button". Added aria-label ("Zoom in" / "Zoom out") and marked the decorative glyphs aria-hidden. The neighbouring Fit/Center buttons already have visible text, so only the icon-only zoom controls needed it.

Legend disclosure buttons never exposed aria-expanded

The Legend header toggle and the expandable "Connections" row are disclosure widgets that show/hide content on click, but neither set aria-expanded, so a screen-reader user cannot tell whether the section is open or closed. Wired aria-expanded to the actual state (and left it off non-expandable rows).

Loading indicator was not announced

The loading card was a plain <div>, so when loading starts or flips to "loading more" the status text is never announced. Switched the container to an <output> element (implicit status role) with aria-live="polite", matching how a status region should behave.

Tests

Added controls-a11y.e2e.test.tsx (mounted, happy-dom, same pattern as the existing popover render test): asserts the zoom buttons resolve by accessible name, the Legend toggle flips aria-expanded false → true on click, and the loading indicator exposes a polite status live region. Full package suite (198 tests) and tsc --noEmit are green.

The graph control surfaces had a few screen-reader gaps in the published
component:

- The zoom in/out buttons rendered only a "+"/"−" glyph with no text, so they
  had no accessible name. Added aria-label ("Zoom in"/"Zoom out") and marked the
  glyphs aria-hidden.
- The Legend header and the expandable "Connections" row are disclosure
  buttons but never exposed aria-expanded, so assistive tech could not tell
  whether the section was open. Wired aria-expanded to the actual state.
- The loading indicator was a plain div, so the loading message was not
  announced. Switched it to an output element (implicit status role) with
  aria-live="polite".

Adds a mounted test covering the accessible names, the toggling aria-expanded,
and the loading live region.
Copilot AI review requested due to automatic review settings July 24, 2026 06:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants