From 2296c446eddfc570e4f25ad89b4a584eaba04ae5 Mon Sep 17 00:00:00 2001 From: Ankit Date: Tue, 24 Dec 2024 12:49:44 +0530 Subject: [PATCH 1/2] made the links readable --- app/(auth)/sign-in/page.jsx | 1 + app/(auth)/sign-up/page.jsx | 1 + app/blogs/[slug]/page.jsx | 6 +++++- app/blogs/page.jsx | 7 ++++++- app/bracket/page.js | 1 + app/games/page.js | 1 + app/tournaments/[id]/page.js | 5 ++++- components/BracketList.jsx | 6 +++++- components/Contatct/Contact-left.jsx | 2 +- components/Contatct/Contact-right.jsx | 2 +- .../FeatureSection/FeatureSectionGrid.jsx | 1 + components/Footer.jsx | 14 ++++++++++++-- components/Navbar.jsx | 18 +++++++++++++++--- components/NewsItem.jsx | 1 + components/TournamentSection.jsx | 1 + 15 files changed, 56 insertions(+), 11 deletions(-) diff --git a/app/(auth)/sign-in/page.jsx b/app/(auth)/sign-in/page.jsx index f94bf5e..e5441a4 100644 --- a/app/(auth)/sign-in/page.jsx +++ b/app/(auth)/sign-in/page.jsx @@ -191,6 +191,7 @@ export default function SignInForm() { Sign up diff --git a/app/(auth)/sign-up/page.jsx b/app/(auth)/sign-up/page.jsx index 4838754..1b25337 100644 --- a/app/(auth)/sign-up/page.jsx +++ b/app/(auth)/sign-up/page.jsx @@ -218,6 +218,7 @@ const Page = () => { Sign in diff --git a/app/blogs/[slug]/page.jsx b/app/blogs/[slug]/page.jsx index 413be9f..663c7c9 100644 --- a/app/blogs/[slug]/page.jsx +++ b/app/blogs/[slug]/page.jsx @@ -46,7 +46,11 @@ const page = async ({ params }) => { return (

- + diff --git a/app/blogs/page.jsx b/app/blogs/page.jsx index a589b9c..d6398f0 100644 --- a/app/blogs/page.jsx +++ b/app/blogs/page.jsx @@ -87,7 +87,12 @@ const page = async () => { asChild className="bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded" > - Read More + + Read More + diff --git a/app/bracket/page.js b/app/bracket/page.js index e70d4fd..25fba5e 100644 --- a/app/bracket/page.js +++ b/app/bracket/page.js @@ -11,6 +11,7 @@ const BracketPage = () => { Create a bracket diff --git a/app/games/page.js b/app/games/page.js index abad5ac..46ed6e6 100644 --- a/app/games/page.js +++ b/app/games/page.js @@ -49,6 +49,7 @@ export default async function page({ searchParams }) { diff --git a/components/BracketList.jsx b/components/BracketList.jsx index 42be9d9..7840322 100644 --- a/components/BracketList.jsx +++ b/components/BracketList.jsx @@ -41,7 +41,11 @@ const BracketList = () => { ) : (
{brackets.map((bracket) => ( - +
{bracket.bracketImage && (
diff --git a/components/Contatct/Contact-left.jsx b/components/Contatct/Contact-left.jsx index f3b6b5a..4d40e4e 100644 --- a/components/Contatct/Contact-left.jsx +++ b/components/Contatct/Contact-left.jsx @@ -34,7 +34,7 @@ export default function ContactLeftComp({ className }) {
{socialLinks.map((e, i) => { return ( - + ); diff --git a/components/Contatct/Contact-right.jsx b/components/Contatct/Contact-right.jsx index 7d9de9c..7cb2fa8 100644 --- a/components/Contatct/Contact-right.jsx +++ b/components/Contatct/Contact-right.jsx @@ -219,7 +219,7 @@ export default function ContactRightComp({ className }) {
{socialLinks.map((e, i) => { return ( - + ); diff --git a/components/FeatureSection/FeatureSectionGrid.jsx b/components/FeatureSection/FeatureSectionGrid.jsx index 01c6ca1..524146f 100644 --- a/components/FeatureSection/FeatureSectionGrid.jsx +++ b/components/FeatureSection/FeatureSectionGrid.jsx @@ -131,6 +131,7 @@ export const SkeletonThree = () => { href="https://discord.com/invite/AB2vCdyw" target="__blank" className="relative flex gap-10 h-full group/image border-b" + aria-label="discord-btn" >
{/* logo */}
- + logo {/* */} Join Community - + Contact
diff --git a/components/Navbar.jsx b/components/Navbar.jsx index 8906a07..7ce46e4 100644 --- a/components/Navbar.jsx +++ b/components/Navbar.jsx @@ -51,7 +51,11 @@ const Navbar = () => {
{/* Logo */}
- + logo { className={`font-medium hover:text-foreground/90 transition-all ${isActive(pathname, item.href) ? "text-foreground" : "text-foreground/60"} `} + aria-label={`${item.href}-nav-item`} > {item.title} @@ -84,7 +89,10 @@ const Navbar = () => { {/* buttons */}
- + @@ -115,6 +123,7 @@ const Navbar = () => { key={index} href={item.href} className="font-medium text-lg" + aria-label={`${item.title}-nav-item`} > {item.title} @@ -122,7 +131,10 @@ const Navbar = () => {
- + diff --git a/components/NewsItem.jsx b/components/NewsItem.jsx index b117b79..5729407 100644 --- a/components/NewsItem.jsx +++ b/components/NewsItem.jsx @@ -26,6 +26,7 @@ const NewsItem = ({ title, description, url, urlToImage }) => { className="bg-white text-black font-semibold hover:bg-tertiary transition-all text-[15px] px-4 py-2" href={url} target="_blank" + aria-label="read-article" > Read Article diff --git a/components/TournamentSection.jsx b/components/TournamentSection.jsx index 4a18c20..2269aee 100644 --- a/components/TournamentSection.jsx +++ b/components/TournamentSection.jsx @@ -108,6 +108,7 @@ export default function TournamentSection({ filters }) { href={`/tournaments/${tournament._id}`} className="" prefetch={true} // prefetch the tournament page + aria-label="tournament-redirect-btn" > From bafa81a07e1612ceefc0a05f7fe241701ca837e7 Mon Sep 17 00:00:00 2001 From: Ankit Date: Tue, 24 Dec 2024 13:57:44 +0530 Subject: [PATCH 2/2] made the buttons accessible --- app/(auth)/sign-in/page.jsx | 5 +++- app/(auth)/sign-up/page.jsx | 1 + app/(auth)/verify/[username]/page.jsx | 6 +++- app/blogs/page.jsx | 1 + app/create/team/page.jsx | 4 ++- app/create/tournament/page.js | 25 +++++++++++++---- app/create/tournament/tournament/page.js | 3 ++ app/games/[id]/page.js | 8 +++++- app/layout.js | 5 +--- app/manage/tournament/page.jsx | 3 ++ app/onboarding/completeprofile/page.js | 7 ++++- app/onboarding/selectgame/page.js | 1 + app/teams/page.jsx | 35 +----------------------- app/tournaments/[id]/page.js | 12 ++++++-- app/tournaments/[id]/register/page.js | 1 + app/tournaments/page.js | 7 ++++- components/BracketForm.jsx | 11 ++++++-- components/Contatct/Contact-right.jsx | 1 + components/FaqSection.jsx | 5 +++- components/FiltersSidebar.jsx | 3 +- components/HeroSection.jsx | 18 ++++++++---- components/ModeToggle.jsx | 4 +-- components/Navbar.jsx | 18 ++++++++---- components/Notification.jsx | 6 ++-- components/TeamCard.jsx | 4 ++- 25 files changed, 120 insertions(+), 74 deletions(-) diff --git a/app/(auth)/sign-in/page.jsx b/app/(auth)/sign-in/page.jsx index e5441a4..4f2d42a 100644 --- a/app/(auth)/sign-in/page.jsx +++ b/app/(auth)/sign-in/page.jsx @@ -15,7 +15,7 @@ import { Button } from "../../../@/components/ui/button"; import { Input } from "../../../@/components/ui/input"; import Link from "next/link"; import { useRouter } from "next/navigation"; -import { useToast } from "../../../@/components/ui/use-toast"; +import { useToast } from "../../../@/hooks/use-toast"; import { signInSchema } from "../../../model/Schema/signInSchema"; import React, { useState } from "react"; import { @@ -156,6 +156,7 @@ export default function SignInForm() { className="w-full font-bold" type="submit" disabled={isLoading} + arial-label="signin-btn" > {isLoading ? ( @@ -174,6 +175,7 @@ export default function SignInForm() { variant="default" className="w-full flex gap-4" onClick={handleGoogleSignIn} + arial-label="google-signin-btn" > @@ -182,6 +184,7 @@ export default function SignInForm() { variant="default" className="w-full flex gap-4" onClick={handleDiscordSignIn} + arial-label="discord-signin-btn" > diff --git a/app/(auth)/sign-up/page.jsx b/app/(auth)/sign-up/page.jsx index 1b25337..c738312 100644 --- a/app/(auth)/sign-up/page.jsx +++ b/app/(auth)/sign-up/page.jsx @@ -202,6 +202,7 @@ const Page = () => { type="submit" className="w-full font-bold" disabled={isSubmitting} + arial-label="signup-btn" > {isSubmitting ? ( <> diff --git a/app/(auth)/verify/[username]/page.jsx b/app/(auth)/verify/[username]/page.jsx index e6cf711..accf97d 100644 --- a/app/(auth)/verify/[username]/page.jsx +++ b/app/(auth)/verify/[username]/page.jsx @@ -104,7 +104,11 @@ const VerifyAccount = () => { /> - diff --git a/app/blogs/page.jsx b/app/blogs/page.jsx index d6398f0..d9bd67f 100644 --- a/app/blogs/page.jsx +++ b/app/blogs/page.jsx @@ -86,6 +86,7 @@ const page = async () => {
- +
diff --git a/app/create/tournament/page.js b/app/create/tournament/page.js index a321093..8bd4e04 100644 --- a/app/create/tournament/page.js +++ b/app/create/tournament/page.js @@ -338,7 +338,9 @@ export default function Page() { Prize Configuration{" "}

- +
{/* Rules */} @@ -351,13 +353,20 @@ export default function Page() { className="w-fit bg-foreground/5 p-2 rounded mb-2 text-sm" placeholder="Enter Rule" /> - + {/* Sponsors */}

Sponsors

- +
{/* Game Configuration */} @@ -389,7 +398,9 @@ export default function Page() { /> - + {/* Tournament Configuration */} @@ -466,7 +477,10 @@ export default function Page() { /> - @@ -477,6 +491,7 @@ export default function Page() { type="submit" className={`mt-10 px-6 py-2 rounded-md font-semibold text-white ${isSubmitting ? "bg-blue-500" : "bg-blue-600 hover:bg-blue-700"} transition-colors duration-300`} disabled={isSubmitting} + arial-label="team-create-btn" > {isSubmitting ? "Creating..." : "Create Tournament"} diff --git a/app/create/tournament/tournament/page.js b/app/create/tournament/tournament/page.js index b539ebc..e7d31e8 100644 --- a/app/create/tournament/tournament/page.js +++ b/app/create/tournament/tournament/page.js @@ -144,6 +144,7 @@ export default function Page() { : "bg-slate-500 hover:bg-slate-600" }`} onClick={() => setSelectedPlatform(platform)} + arial-label="platform-btn" > {platform} @@ -216,6 +217,7 @@ export default function Page() { type="submit" className={`px-6 py-2 rounded-md ${isSubmitting ? "bg-blue-300" : "bg-blue-600 hover:bg-blue-700"} transition-colors duration-300`} disabled={isSubmitting} + arial-label="create-tournament-btn" > {isSubmitting ? "Creating..." : "Create Tournament"} @@ -223,6 +225,7 @@ export default function Page() { type="button" className="px-6 py-2 rounded-md text-white bg-red-600 hover:bg-red-700 transition-colors duration-300" onClick={handleReset} + arial-label="reset-btn" > Reset diff --git a/app/games/[id]/page.js b/app/games/[id]/page.js index ee13dfd..5478767 100644 --- a/app/games/[id]/page.js +++ b/app/games/[id]/page.js @@ -67,6 +67,7 @@ export default function GamePage({ params }) { @@ -152,6 +157,7 @@ export default function GamePage({ params }) { variant="ghost" onClick={clearFilters} className="w-full rounded transition-colors" + arial-label="clear-filter-btn" > Clear Filters diff --git a/app/layout.js b/app/layout.js index f327b54..eb5f585 100644 --- a/app/layout.js +++ b/app/layout.js @@ -6,7 +6,6 @@ import Footer from "../components/Footer"; import AuthProvider from "../context/AuthProvider"; import NextTopLoader from "nextjs-toploader"; import dotenv from "dotenv"; -// import { Toaster } from "react-hot-toast"; import { Toaster } from "../@/components/ui/toaster"; dotenv.config(); @@ -59,7 +58,7 @@ export const metadata = { export default function RootLayout({ children }) { return ( - +
{children}