layer5io / layer5io/sistent

InfoTooltip is not keyboard reachable and has no accessible name

Open Beginner friendly
#1,829 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
137
Forks
239
Avg merge
4d 14h
Merged PRs (30d)
5

Description

InfoTooltip renders its icon in a plain <div>:

https://github.com/layer5io/sistent/blob/master/src/custom/CustomTooltip/infoTooltip.tsx

<CustomTooltip title={helpText} {...props}>
  <div style={{ display: 'flex', ... }}>
    <InfoOutlinedIcon {...iconSmall} />
  </div>
</CustomTooltip>

That element has no accessible name, no role, and no tab index, so the help
text it carries is unreachable for a keyboard or screen-reader user:

  • nothing announces it in browse mode - the icon is decorative markup;
  • it cannot be focused, and MUI opens a tooltip on focus, so the text has no
    keyboard route at all;
  • CustomTooltip hands MUI a ReactNode title, and MUI's Tooltip only sets
    aria-label from a title when that title is a string (titleIsString ? title : null), so the closed tooltip contributes no name either.
Why it matters here

meshery-cloud renders a per-field information affordance on every schema-driven
form (the field's description from meshery/schemas). InfoTooltip is
exactly the component for that job, but it cannot be used: our accessibility
requirement is that the affordance is reachable and announced. We hand-assemble
CustomTooltip + IconButton component="span" + an aria-label instead, which
is duplicated design-system markup living in a consumer.

Suggested fix

Render the icon in a ButtonBase/IconButton (component="span" keeps it
legal inside a <label>-adjacent layout) rather than a <div>, and accept an
aria-label - defaulting to the helpText when it is a string - so the
component names itself. That keeps every existing call site working and makes
the affordance reachable by Tab, which also opens the tooltip.

Happy to raise the PR if the shape above looks right.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/custom/CustomTooltip/infoTooltip.tsx and trace how InfoTooltip passes its title and props to CustomTooltip. Verify the resulting affordance is keyboard reachable, has an accessible name, and still opens the help text on focus while preserving existing call sites.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.