UI/Tooltip: Add usage guidelines documentation#77158
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: 0 B Total Size: 7.74 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 0250077. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24198681664
|
419a409 to
8b6d112
Compare
| popup itself, it's a popover. If the trigger's purpose is unrelated to | ||
| opening the popup, it's a tooltip. | ||
|
|
||
| <Canvas of={ UsageGuidelinesStories.InfoTipWithPopover } /> |
There was a problem hiding this comment.
Hey you literally made us the Infotip component! Please make this a component 😂
There was a problem hiding this comment.
Why not! I can follow-up (low-prio) on that
Add interactive Storybook examples for the Tooltip usage guidelines documentation page: - RecommendedUsage: manual Tooltip with aria-label on triggers - IconButtonWithTooltip: using IconButton's built-in tooltip support - InfoTipWithPopover: Popover-based infotip pattern as a tooltip alternative Made-with: Cursor
Add a Storybook documentation page covering when and when not to use tooltips, including: - Usage guidelines (visual labels, accessible naming) - Alternatives section (infotips via Popover, description text, feedback) - References to WCAG 1.4.13 and WAI-ARIA APG tooltip pattern Made-with: Cursor
Refine JSDoc on Tooltip Root to clarify that popups are visual-only and not exposed to assistive technologies, and add @see links to the new usage guidelines page and IconButton docs. Made-with: Cursor
8b6d112 to
0250077
Compare
What?
Follow-up to #76705.
Add a Storybook docs page for the
@wordpress/uiTooltip with usage guidelines and alternatives, adapted from Base UI's tooltip docs.Why?
Tooltip docs lack guidance on when (not) to use tooltips, leading to misuse for infotips, descriptions, or feedback messages — all inaccessible to touch and screen reader users.
How?
packages/ui/src/tooltip/stories/.@seeJSDoc links onTooltip.Root.Testing Instructions
npm run storybook:devOpen question
Should similar guidance be added to the
@wordpress/componentsTooltip README? Could be a follow-up.Use of AI Tools
Cursor (Claude).