Legal-and-General / canopy

Canopy, the design system from Legal and General implemented in Angular
https://legal-and-general.github.io/canopy/?path=/docs/welcome--docs
Apache License 2.0
24 stars 46 forks source link

Banner message content link colours are not contrast compliant #1417

Open mchand opened 2 months ago

mchand commented 2 months ago

Prerequisites

Description

This bug affects:

Steps to Reproduce

Using links inside the content of the banner message component results in non compliant link colours.

Expected behaviour:

The contrast of the links should be compliant.

Actual behaviour:

The links fail contrast checks.

Recurrence frequency:

Package version

Configuration and environment

Additional Information

I understand from the documentation that this component is a work in progress but we should change the standard blue link colour for both variants until we decide the link/button styling.

Screenshot 2024-06-10 at 16 53 00 Screenshot 2024-06-10 at 16 54 17

It would be good to include some link text in the Storybook example similar to the Inline message component.

Screenshot 2024-06-10 at 17 07 24
paul-request commented 2 months ago

@mchand this was a very quick initial implementation, as such only a generic and warning variant were created. We didn't have a need for links in our messages, so they were not implemented. If you need more variants and links, you could add that functionality as part of your work if that is possible?

owensgit commented 1 month ago

Looking at this it sounds similar to something that was proposed here: https://github.com/Legal-and-General/canopy/discussions/1276

Ideally, the variants mentioned here sound like they should be part of the approach suggested in https://github.com/Legal-and-General/canopy/discussions/1276, which creates the ability to style a component, such as the inline message, cards, etc with a specific colour treatment. This is a very composable and flexible approach, which I think is better than creating specific variants for the Banner Message only and would result in a reduction of duplicated code.

pauleustice commented 1 month ago

Thanks @owensgit, I wasn't aware of the variants work that Elena had done. This sounds like a decent future feature, but not necessarily a fix for this issue. @mchand do you need links to work at present? If so, would you be open to picking up the work to add those styles?