From c47d3a896c09bb55e8ac7a4b81c62b69d340ed66 Mon Sep 17 00:00:00 2001 From: Sutu Sebastian <41998826+SutuSebastian@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:23:15 +0300 Subject: [PATCH] SEO: a11y + open external links in new tabs (#1463) * chore: improve SEO lighthouse * chore: open external link in new tab * chore: open external link in new tab #2 --- apps/web/app/docs/layout.tsx | 11 ++---- apps/web/app/layout.tsx | 1 - apps/web/components/code-demo.tsx | 3 +- .../homepage/contributors-section.tsx | 2 ++ .../components/homepage/featured-section.tsx | 35 ++++++++++++++++--- .../web/components/homepage/figma-section.tsx | 4 +++ apps/web/components/homepage/home-navbar.tsx | 11 ++---- .../web/components/homepage/react-section.tsx | 15 ++++++-- .../homepage/social-proof-section.tsx | 9 ++++- .../components/homepage/tailwind-section.tsx | 4 +++ apps/web/components/navbar.tsx | 8 +++++ 11 files changed, 74 insertions(+), 29 deletions(-) diff --git a/apps/web/app/docs/layout.tsx b/apps/web/app/docs/layout.tsx index 8c91b406d..f775c337a 100644 --- a/apps/web/app/docs/layout.tsx +++ b/apps/web/app/docs/layout.tsx @@ -70,15 +70,8 @@ function DocsNavbar({ isCollapsed, setCollapsed }: DocsLayoutState) { )} - - Flowbite React - - - + + Flowbite React logo Flowbite React
diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index aa0ce6744..2e851f266 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -47,7 +47,6 @@ export const metadata: Metadata = { export const viewport: Viewport = { width: "device-width", initialScale: 1, - maximumScale: 1, themeColor: [ { media: "(prefers-color-scheme: light)", color: "#ffffff" }, { media: "(prefers-color-scheme: dark)", color: "#1f2937" }, diff --git a/apps/web/components/code-demo.tsx b/apps/web/components/code-demo.tsx index 15faa9a84..b83d0465c 100644 --- a/apps/web/components/code-demo.tsx +++ b/apps/web/components/code-demo.tsx @@ -272,7 +272,8 @@ function EditOnGithubButton({ githubSlug }: { githubSlug: string }) { return ( Become a member of a community of developers by supporting Flowbite

diff --git a/apps/web/components/homepage/featured-section.tsx b/apps/web/components/homepage/featured-section.tsx index 59fb0b401..9073d4818 100644 --- a/apps/web/components/homepage/featured-section.tsx +++ b/apps/web/components/homepage/featured-section.tsx @@ -7,7 +7,12 @@ export function FeaturedSection() {
Featured in:
- + - + - + - + - + Check out the following resources to learn more about Flowbite Figma:

@@ -65,6 +67,8 @@ export function FigmaSection() {
diff --git a/apps/web/components/homepage/home-navbar.tsx b/apps/web/components/homepage/home-navbar.tsx index d84870bbb..ab2b3b52c 100644 --- a/apps/web/components/homepage/home-navbar.tsx +++ b/apps/web/components/homepage/home-navbar.tsx @@ -17,15 +17,8 @@ export function HomeNavbar() { }} >
- - Flowbite React - - - + + Flowbite React logo Flowbite React
diff --git a/apps/web/components/homepage/react-section.tsx b/apps/web/components/homepage/react-section.tsx index 99e08c4ed..de85003bc 100644 --- a/apps/web/components/homepage/react-section.tsx +++ b/apps/web/components/homepage/react-section.tsx @@ -39,9 +39,12 @@ export function ReactSection() { React UI components

- + Flowbite React - {" "} + {" "} is a free and open-source UI component library based on accessible React components and Tailwind CSS.

@@ -78,7 +81,13 @@ export function ReactSection() { -

diff --git a/apps/web/components/homepage/social-proof-section.tsx b/apps/web/components/homepage/social-proof-section.tsx index 04d27ef06..2f21a9405 100644 --- a/apps/web/components/homepage/social-proof-section.tsx +++ b/apps/web/components/homepage/social-proof-section.tsx @@ -90,6 +90,8 @@ export async function SocialProofSection() {
@@ -131,6 +135,8 @@ export async function SocialProofSection() {
@@ -169,8 +175,9 @@ export async function SocialProofSection() {

@@ -50,6 +52,8 @@ export function TailwindSection() { {" "} is the most popular and open-source utility-first CSS framework on the market and the{" "} diff --git a/apps/web/components/navbar.tsx b/apps/web/components/navbar.tsx index f7fe4faaf..ccf5729ca 100644 --- a/apps/web/components/navbar.tsx +++ b/apps/web/components/navbar.tsx @@ -21,12 +21,16 @@ export function NavbarLinks() { Quickstart Figma @@ -48,6 +52,7 @@ export function NavbarIcons() { rel="noopener" target="_blank" href="https://storybook.flowbite-react.com/" + aria-label="View Storybook" className="hidden rounded-lg p-2.5 text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 lg:block dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:ring-gray-700" > @@ -58,6 +63,7 @@ export function NavbarIcons() { rel="nofollow noopener noreferrer" target="_blank" href="https://discord.gg/4eeurUVvTy" + aria-label="Join Discord Community" className="hidden rounded-lg p-2.5 text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 lg:block dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:ring-gray-700" > @@ -68,6 +74,7 @@ export function NavbarIcons() { rel="noopener" target="_blank" href="https://github.com/themesberg/flowbite-react" + aria-label="View on GitHub" className="hidden rounded-lg p-2.5 text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-4 focus:ring-gray-200 lg:block dark:text-gray-300 dark:hover:bg-gray-700 dark:focus:ring-gray-700" > @@ -80,6 +87,7 @@ export function NavbarIcons() { rel="nofollow noopener noreferrer" target="_blank" href="https://npmjs.com/package/flowbite-react" + aria-label="Toggle dark mode" className="ml-2 hidden lg:block" >