ic-design-system
ic-design-system copied to clipboard
Improve Button Guidance RE: Tooltips
Update Accessibility guidance against Button to explain proper usage of tooltips, referencing our Tooltip guidance that tooltips should provide additional information.
These additional guidance sections mirror the Buttons Tooltips storybook
- [ ] For the Icon Button example under variants add an example for an icon button with tooltipDisabled=true, with title attribute set so that it still has an accessible label, like the example below
<ic-button
variant="icon"
aria-label="ENTER A RELEVANT LABEL HERE"
disable-tooltip="true"
id="testbutton"
><svg
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 0 24 24"
width="24px"
fill="#000000"
>
<path d="M0 0h24v24H0V0z" fill="none" />
<path
d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"
/></svg
></ic-button>
- [ ] Add a Tooltips section, showing two text buttons. One with title attribute and the other with title and tooltipPlacement set.
<ic-button
variant="primary"
id="testbutton2"
title="We can add tooltips to text buttons"
>Button With Title</ic-button
>
<ic-button
variant="primary"
id="testbutton2"
title="the tooltipPlacement prop allows us to change the location of the tooltip"
tooltip-placement="right"
>Different positions</ic-button
>
What component is this related to?
Button, Tooltip
Why do we need it?
Additional information should be provided to explain the change made in: Make Icon Button Tooltips silent when no title provided
Need to fix this first: https://github.com/mi6/ic-ui-kit/issues/1845