docs
docs copied to clipboard
Use HTMLAnchorElement for links instead of HTMLButtonElement
Describe this PR
Refactored CustomLink
to use a styled <a>
tag for better accessibility and security.
Changes
- Replaced
CustomButton
with a Link styled component. - Updated
CustomLink
to includehref
,target
, andrel
directly. - Removed
goToPath
andwindow.open.
- Added
noreferrer
attribute is a crucial security measure for external links opened in a new tab. - Removed
inline-block
for link to be wrapped - Updated
CSS
breaking changes due to<a>
tag integration
What issue does this fix?
Improves link handling for security and accessibility. Fixes https://github.com/prisma/docs/issues/5582 Fixes https://github.com/prisma/docs/issues/5574 Fixes https://github.com/prisma/docs/issues/5666 Fixes https://github.com/prisma/docs/issues/5653 Fixes https://github.com/prisma/docs/issues/5544 Fixes https://github.com/prisma/docs/issues/5428
Any other relevant information
Has Open in new tab context menu, middle click works and link Preview in bottom #5582 #5666 #5653
Link is aligned Properly #5574
Added Line break to Links #5428
@Tejs1 is attempting to deploy a commit to the Prisma Team on Vercel.
A member of the Team first needs to authorize it.
Hey @janpio , there could be additional breaking changes similar to below one. Could you please approve the Vercel fork deployment so we can identify any issues using Lost Pixel Bot?
I can't, but I can let the relevant team know to look at this.
(Thanks for taking a look at all these issues, quite some are from my observations - so I am looking forward to get these fixed)
Glad to help 🙌
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Feb 27, 2024 1:37pm |
Thanks for doing this, @Tejs1. I have approved the deployment. The changes look good to me, but we will need to wait for a web engineer to take a look before we can push this through. I really appreciate the help! We will get this in once we know it's all working correctly.
@carlagn @mhessdev Any updates? lemme know if you want any changes.
I tested with lost pixel in my repo only link line breaks were changed in 95 shots[pages/routes]
like following
Hi @Tejs1
Thanks for your PR here. We recently updated our docs repo from Gatsby to Docusaurus. We resolved a number of accessibility issues. I'm unsure if this is one of them. You can find our modified links here: https://github.com/prisma/docs/blob/a114584a9b2800b686eaaa7f388c683e61a350d4/src/theme/MDXComponents.tsx#L95-L107