ic-design-system icon indicating copy to clipboard operation
ic-design-system copied to clipboard

[ic-tooltip] Update code examples so they work with screen readers

Open GCHQ-Developer-718 opened this issue 3 months ago • 3 comments

Summary of the bug

Current guidance suggests using ic-tooltips in the following way:

<ic-tooltip label="the label" target="button-0">
    <ic-button id="button-0" aria-describedby="ic-tooltip-button-0">Button</ic-button>
</ic-tooltip>

In order for the label of ic-tooltips to be announced by screen readers, they need to be used in the following way:

<ic-tooltip id="tooltip-0" label="the label">
    <ic-button aria-describedby="tooltip=0">Button</ic-button>
</ic-tooltip>

The code examples should be updated to use ic-tooltips in this way.

Note that thetarget prop is not used, as it doesn't do anything. It will be removed from the ui-kit in UI kit #3978. Also note that ic-tooltips will only work properly with screen readers after UI kit #3853.

GCHQ-Developer-718 avatar Sep 26 '25 10:09 GCHQ-Developer-718

I have ample experience in frontend development Please assign me this task ETA 2 hours?

Sahib-Aujla avatar Oct 08 '25 04:10 Sahib-Aujla

On hold until #3853 is done so we're sure what the code examples should be changed to

GCHQ-Developer-847 avatar Oct 09 '25 09:10 GCHQ-Developer-847

@Sahib-Aujla this ticket is blocked at the moment but you're welcome to pick this up once it is ready

GCHQ-Developer-847 avatar Oct 09 '25 13:10 GCHQ-Developer-847