InfoTooltip is not keyboard reachable and has no accessible name
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; CustomTooltiphands MUI a ReactNode title, and MUI'sTooltiponly sets
aria-labelfrom 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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