-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
SEO: a11y + open external links in new tabs #1463
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThe recent updates primarily enhance the accessibility, security, and semantic structure of the web application. Key changes include consolidating navigation links for better screen reader support, improving external link handling by adding Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Navbar
participant ExternalSite
User->>Navbar: Click on external link
Navbar->>ExternalSite: Open link in new tab
ExternalSite->>Navbar: No access to original page
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (11)
- apps/web/app/docs/layout.tsx (1 hunks)
- apps/web/app/layout.tsx (1 hunks)
- apps/web/components/code-demo.tsx (1 hunks)
- apps/web/components/homepage/contributors-section.tsx (1 hunks)
- apps/web/components/homepage/featured-section.tsx (4 hunks)
- apps/web/components/homepage/figma-section.tsx (2 hunks)
- apps/web/components/homepage/home-navbar.tsx (1 hunks)
- apps/web/components/homepage/react-section.tsx (2 hunks)
- apps/web/components/homepage/social-proof-section.tsx (4 hunks)
- apps/web/components/homepage/tailwind-section.tsx (1 hunks)
- apps/web/components/navbar.tsx (5 hunks)
Files skipped from review due to trivial changes (1)
- apps/web/app/docs/layout.tsx
Additional comments not posted (31)
apps/web/components/homepage/home-navbar.tsx (2)
20-21
: Improved accessibility by consolidating navigation links.The change consolidates the navigation links into a single
<Link>
component, improving accessibility by associating the logo with its text label.
21-21
: Descriptive alt text for better screen reader support.Adding a descriptive alt text ("Flowbite React logo") to the image improves accessibility for screen readers.
apps/web/app/layout.tsx (1)
Line range hint
28-28
:
Greater flexibility in zooming by removingmaximumScale
.The removal of the
maximumScale
property allows for greater flexibility in zooming, which can enhance user experience.However, verify the impact on layout and accessibility to ensure there are no unintended consequences.
apps/web/components/navbar.tsx (3)
24-25
: Enhanced security for external links.Adding
rel="noopener"
andtarget="_blank"
attributes ensures that the link opens in a new tab without giving the new page access to the original page's context, enhancing security.
32-33
: Enhanced security for external links.Adding
rel="noopener"
andtarget="_blank"
attributes ensures that the link opens in a new tab without giving the new page access to the original page's context, enhancing security.
66-66
: Enhanced security and accessibility for external links.Adding
rel="nofollow noopener noreferrer"
,target="_blank"
, andaria-label
attributes ensures that the link opens in a new tab without giving the new page access to the original page's context, enhances security, and improves accessibility for screen readers.apps/web/components/homepage/tailwind-section.tsx (2)
46-46
: Approved: Enhanced security for external link.The addition of
rel="nofollow noopener noreferrer"
is a good practice to enhance security and SEO.
55-55
: Approved: Enhanced security for external link.The addition of
rel="noopener"
is a good practice to enhance security by preventing reverse tabnabbing.apps/web/components/homepage/react-section.tsx (2)
42-47
: Approved: Improved semantic structure and routing integration.Replacing the anchor tag with a
Link
component pointing to the root path (/
) enhances semantic structure and routing integration.
84-90
: Approved: Enhanced security and user experience for external link.The addition of
rel="noopener"
andtarget="_blank"
to theButton
component is a good practice to enhance security and user experience.apps/web/components/homepage/contributors-section.tsx (1)
75-76
: Approved: Enhanced security and user experience for external link.The addition of
rel="noopener"
andtarget="_blank"
to theLink
component is a good practice to enhance security and user experience.apps/web/components/homepage/social-proof-section.tsx (8)
93-93
: Approved: Security enhancement withrel="noopener"
.The addition of
rel="noopener"
improves security by preventing the new page from accessing the window object of the original page.
94-94
: Approved: Usability enhancement withtarget="_blank"
.The addition of
target="_blank"
ensures that the link opens in a new tab, enhancing usability for external links.
119-119
: Approved: Security and SEO enhancement withrel="nofollow noopener noreferrer"
.The addition of
rel="nofollow noopener noreferrer"
improves security by preventing the new page from accessing the window object of the original page and prevents referrer information from being passed. It also improves SEO by preventing search engines from following the link.
120-120
: Approved: Usability enhancement withtarget="_blank"
.The addition of
target="_blank"
ensures that the link opens in a new tab, enhancing usability for external links.
138-138
: Approved: Security and SEO enhancement withrel="nofollow noopener noreferrer"
.The addition of
rel="nofollow noopener noreferrer"
improves security by preventing the new page from accessing the window object of the original page and prevents referrer information from being passed. It also improves SEO by preventing search engines from following the link.
139-139
: Approved: Usability enhancement withtarget="_blank"
.The addition of
target="_blank"
ensures that the link opens in a new tab, enhancing usability for external links.
178-178
: Approved: Security and SEO enhancement withrel="nofollow noopener noreferrer"
.The addition of
rel="nofollow noopener noreferrer"
improves security by preventing the new page from accessing the window object of the original page and prevents referrer information from being passed. It also improves SEO by preventing search engines from following the link.
179-179
: Approved: Usability enhancement withtarget="_blank"
.The addition of
target="_blank"
ensures that the link opens in a new tab, enhancing usability for external links.apps/web/components/code-demo.tsx (2)
275-275
: Approved: Usability enhancement withtarget="_blank"
.The addition of
target="_blank"
ensures that the link opens in a new tab, enhancing usability for external links.
276-276
: Approved: Security and SEO enhancement withrel="nofollow noopener noreferrer"
.The addition of
rel="nofollow noopener noreferrer"
improves security by preventing the new page from accessing the window object of the original page and prevents referrer information from being passed. It also improves SEO by preventing search engines from following the link.apps/web/components/homepage/figma-section.tsx (4)
23-23
: Approved: Security and SEO enhancement withrel="nofollow noopener noreferrer"
.The addition of
rel="nofollow noopener noreferrer"
improves security by preventing the new page from accessing the window object of the original page and prevents referrer information from being passed. It also improves SEO by preventing search engines from following the link.
24-24
: Approved: Usability enhancement withtarget="_blank"
.The addition of
target="_blank"
ensures that the link opens in a new tab, enhancing usability for external links.
70-70
: Approved: Security enhancement withrel="noopener"
.The addition of
rel="noopener"
improves security by preventing the new page from accessing the window object of the original page.
71-71
: Approved: Usability enhancement withtarget="_blank"
.The addition of
target="_blank"
ensures that the link opens in a new tab, enhancing usability for external links.apps/web/components/homepage/featured-section.tsx (6)
10-14
: Accessibility and security improvements.The addition of
aria-label
,rel
, andtarget
attributes enhances accessibility and security.
35-39
: Accessibility and security improvements.The addition of
aria-label
,rel
, andtarget
attributes enhances accessibility and security.
48-52
: Accessibility and security improvements.The addition of
aria-label
,rel
, andtarget
attributes enhances accessibility and security.
69-73
: Accessibility and security improvements.The addition of
aria-label
,rel
, andtarget
attributes enhances accessibility and security.
123-127
: Accessibility and security improvements.The addition of
aria-label
,rel
, andtarget
attributes enhances accessibility and security.
123-127
: Accessibility and security improvements.The addition of
aria-label
,rel
, andtarget
attributes enhances accessibility and security.
Result
Before
After
Summary by CodeRabbit
aria-label
attributes to navigation links for screen reader compatibility.