gcds-components icon indicating copy to clipboard operation
gcds-components copied to clipboard

feat: Links guidance - opening in a new tab

Open LanaStewa opened this issue 1 year ago • 1 comments

Prerequisites | Prérequis

Describe the feature request. | Décrivez la fonctionnalité demandée

A page on Canada.ca recently went live where link open in new tabs - which is not how the majority of links on the site function. https://www.canada.ca/en/services/death.html

Describe the use case. | Décrivez les cas d’utilisation

When I looked at the guidance for links, it say it can be disorienting but not when / when not to open links in a new tab. It's difficult to push back on their decisions to open all their links in new tabs.

https://design-system.alpha.canada.ca/en/components/link/design/

Describe the preferred solution. | Décrivez la solution souhaitée

I would like some additional guidance about when opening links is / isn't appropriate. I would also break that sentence out of anatomy and give it its own heading.

Describe all alternatives. | Décrivez toutes les solutions possibles

No response

Provide related code or examples. | Fournissez du code ou des exemples pertinents

No response

Add other relevant resources. | Ajoutez toute autre ressource utile

No response

LanaStewa avatar Nov 01 '24 15:11 LanaStewa

@LanaStewa Hi Lana, on the implementation of our <gcds-link> component, it does not open in a new tab or window by default. You will have to either add target="_blank" or set the external attribute to true to get the behaviour. I realize that your question specifically concerns our links guidance. At the moment, on its the design guidance we have a section section "Avoid external links when possible" on this page: https://design-system.alpha.canada.ca/en/components/link/design/#. I hope this helps a bit, if not let us know!

This feedback is also an opportunity for us to see if we can improve the guidance page, thanks for opening an issue! cc @SmartMouthWords

daine avatar Dec 11 '24 06:12 daine