Background
The design spec for the Label component includes an optional tooltip after the label text. This should be implemented after the Tooltip component is built in T340456: Tooltip: Add Tooltip component to Codex.
Known use cases
- Wikidata Query Builder
- Special:Nuke update
Design spec
Open questions
- How should the tooltip text be passed into Field and Label? Probably via a prop - what should it be called in each component?
- What should the placement of the tooltip be? Probably top-start.
- What element should be used for the info icon? An icon, or a button? Should there be accessible text that explains that there's more information in the tooltip? If so, we'll need a new translated message for that.
Acceptance criteria
- The Tooltip component is used inside Label to add an optional tooltip
- A new prop or slot is added for the tooltip text to both Label and Field
- Tooltip is documented on the Label and Field demo pages (in the "about" sections and configurable demos. No separate demo is needed.)