-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
feat(link): add target="_blank" for external social links #2636
Conversation
- Add target="_blank" to social media links to open in new tab - Improve user experience by keeping main site navigation intact
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hello! Thank you for opening your first PR to Starlight! ✨ Here’s what will happen next:
|
Thanks for your contribution 🙌 The current behavior is actually an intentional design decision. We avoid opening links in new tabs by default as shown in various UX researches like this one from the Nielsen Norman Group. In general, it's best to avoid forcing a user to open something in a new tab and let them decide how they want to open a link, e.g. a basic click = same window, cmd/ctrl + click or middle click = new window/tab. Thanks to Starlight component overrides, users can still explicitly opt-in to open links in new tabs even though we do not recommend it as the default behavior. Considering the above, I'm going to close this PR. If you have any questions or concerns, feel free to reach out on Discord in the |
I see, thank you for your reply and patient explanation ❤️ |
Add target="_blank" to Social Media Links
Description
This PR enhances the user experience of social media links by making them open in new tabs, allowing users to maintain their current browsing session while accessing external social platforms.
Changes Made
target="_blank"
attribute to social media anchor tagsBefore
Social media links would navigate away from the current page, disrupting the user's browsing experience.
After
Social media links now open in new tabs, preserving the user's current session on the main site.
Technical Details
Modified the social media link component:
html