Toggletip
Toggletip shows a user supplementary information on click.
Also known as: Hint
| Salt package | @salt-ds/core |
|---|---|
| Available since | 1.59.0 |
- Ensure the toggletip's trigger button has a meaningful accessible name so screen reader users understand what it relates to.
- Use an
aria-labelwhen there's no visible label or element whose ID you can reference e.g.aria-label="More info about email address". - Use
aria-labelledbywhen there's a visible label or related element already on the page. Pass its ID and the ID of the trigger (you will need to add one) toaria-labelledbyso the screen reader constructs the name from existing visible text, which also keeps things in sync if that text ever changes.
- Use an
- Don't use a timer to automatically dismiss the toggletip.
- Ensure the toggletip trigger is visually close to the element it describes so users can easily associate them.
| Key | Function |
|---|---|
| Tab |
|
| Shift + Tab |
|
| Enter / Space |
|
| Escape |
|