module.exports = { id: 'tooltips', title: 'Tooltips', keywords: [`tooltip`, `aria-label`, `contextual`, `bottom`, `span`], description: `
You can utilize the aria-label
property to create accessible tooltips (.tooltip
), allowing you to display explanatory text for different elements.
Hover over this text to see a tooltip!
`, samples: [`<span class="tooltip" aria-label="Tooltip text">Hover over text to see tooltip</span>
`],
notes: [
`Tooltips depend on the aria-label
property, so they are fully accessible on screen readers.`
],
customization: [
`Text color for tooltips can be changed by changing the value of the --tooltip-fore-color
variable.`,
`Background color for tooltips can be changed by changing the value of the --tooltip-back-color
variable.`,
`Universal margin for elements can be changed globally by changing the value of the --universal-margin
variable. As a rule of thumb, consider the universal margin to be the distance you want your paragraphs to have from the sides of the screen.`,
`Universal padding for elements can be changed globally by changing the value of the --universal-padding
variable.`,
`Universal border radius for elements can be changed globally by changing the value of the --universal-border-radius
variable.`
],
modifiers: [
{
title : 'Position variant',
description: 'You can make tooltips display below the related text, by adding the appropriate class (.bottom
).
Hover over this text to see a tooltip!
`, samples: [`<span class="tooltip bottom" aria-label="Tooltip text">Hover over text to see tooltip</span>
`]
}
],
dos: [],
donts: []
}