ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

[ic-card-vertical] Clickable card link styling doesn't match link in Safari

Open GCHQ-Developer-530 opened this issue 2 months ago • 5 comments

Summary of the bug

When you hover over a link in Safari it expands the underline to be taller, but when you hover a clickable card, the card title link only moves the underline on hover.

📸 Screenshots or code

Link on hover:

Image

Card title on hover:

Image

🧐 Expected behaviour

The card title should look like an ic-link

GCHQ-Developer-530 avatar Oct 21 '25 09:10 GCHQ-Developer-530

Figma has no thick underline on hover so match behaviour there

MI6-255 avatar Oct 23 '25 09:10 MI6-255

Confirm with design if we should have a thick underline or not for accessibility reasons, even though that does not match current Figma behaviour

MI6-255 avatar Oct 23 '25 09:10 MI6-255

linked to #4035

ad9242 avatar Oct 23 '25 09:10 ad9242

We discussed this a while back during backlog grooming.

Cards in Figma:

Cards do not use Link component for the title of the card as you cannot utilise a property to populate the title text - you can't do this in Link component (in Figma).

The header text style in Card is using H4 (size:20, weight:semiBold, lineHeight:32) whereas Link uses LinkDefault (size:16, weight:SemiBold, lineHeight:24)...so there's a difference here if we start using Link instead of H4.

Cards using heading property to set the text in a card heading = Figma matches Dev Link does not have such a property = Figma matches Dev

As such, although the title in a clickable card looks a little like a link, it is merely indicating to the user that the whole card is clickable in addition to the whole card's hover and pressed states.

We could attempt to add a thick underline under the label on hover but it;

  • would not match Link
  • would not automatically duck lower ligature letters and
  • would not work with wrapped text

Therefore, from a design perspective there's nothing else to do here.

Cards in Dev: From a design perspective, if the title in a clickable card has been implemented as a Link, then that is fine. The thick underline on the title gives additional feedback to the user that they're hovering over something that could be clicked on (in addition to the background shading of the card changing too). Ideally the Figma and Dev would have perfect alignment.

If we wanted to align them, we would need to;

  • introduce a property on Link to specify the text which is being linked (not the url)
  • introduce different sizing variants for Link, so that it could line up with the H4 text style of a card heading

mi6-577 avatar Oct 31 '25 07:10 mi6-577

TL;DR: The scope of this ticket is to align Safari with the other browsers - make the underline thick.

GCHQ-Developer-299 avatar Nov 06 '25 10:11 GCHQ-Developer-299