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.
InfoTooltiprenders its icon in a plain<div>:https://github.com/layer5io/sistent/blob/master/src/custom/CustomTooltip/infoTooltip.tsx
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:
keyboard route at all;
CustomTooltiphands MUI a ReactNode title, and MUI'sTooltiponly setsaria-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
descriptionfrommeshery/schemas).InfoTooltipisexactly 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"+ anaria-labelinstead, whichis duplicated design-system markup living in a consumer.
Suggested fix
Render the icon in a
ButtonBase/IconButton(component="span"keeps itlegal inside a
<label>-adjacent layout) rather than a<div>, and accept anaria-label- defaulting to thehelpTextwhen it is a string - so thecomponent 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.