Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCM button vs. links #4344

Open
alizedebray opened this issue Dec 19, 2024 · 1 comment
Open

HCM button vs. links #4344

alizedebray opened this issue Dec 19, 2024 · 1 comment
Labels
📦 styles Related to the @swisspost/design-system-styles package

Comments

@alizedebray
Copy link
Contributor

How should we colorize the buttons and links in HCM?

Multiple colors exist for the high contrast mode:

  • Buttons:
    • ButtonBorder: the base border color for push buttons.
    • ButtonFace: the face background color for push buttons.
    • ButtonText: text on push buttons.
  • Links:
    • ActiveText: text in active links. For light backgrounds, traditionally red.
    • LinkText: text in non-active, non-visited links. For light backgrounds, traditionally blue.
    • VisitedText: text in visited links. For light backgrounds, traditionally purple.

Reference: https://www.w3.org/TR/css-color-4/#css-system-colors

Normally, buttons use the <button> tag whereas links use the <a> tag.
But we also ha classes that could be used on both tags: .btn-primary, .btn-secondary, .btn-tertiary, and .btn-link.

Should the HCM color be set depending on the class or rather on the HTML tag?

@alizedebray alizedebray added needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers 📦 styles Related to the @swisspost/design-system-styles package labels Dec 19, 2024
@gfellerph gfellerph removed the needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers label Dec 19, 2024
@alizedebray
Copy link
Contributor Author

alizedebray commented Dec 19, 2024

Short term resolution:
Use different colors depending on the semantic element used:

  • <button> tags should use the ButtonText, ButtonFace, and ButtonBorder colors
  • <a> tags should use the LinkText, ActiveText, and VisitedText colors

Long term resolution:
Conduct user tests or follow Access for All recommendations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 styles Related to the @swisspost/design-system-styles package
Projects
Status: 👀 Triage
Development

No branches or pull requests

2 participants