Spelunking-Studios / The-Caverns-Website

Use valid anchors JS-0739
Anti-pattern
Minor
20 days agoa year old
The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
41                                </div>
42                                <input class="rounded-lg bg-neutral-300 dark:bg-neutral-500 px-2 py-1.5 transition ease-in-out mx-2 my-3 enabled:dark:hover:bg-neutral-400 enabled:dark:focus:bg-neutral-400 block text-xl outline-none cursor-pointer" type="submit" value="Sign In" />
43                                <div className="relative border-b-2 mx-2 my-6">
44                                    <span className="absolute -top-2.5 text-center w-full "><a className="dark:bg-zinc-700 px-2 py-1 rounded-lg">OR</a></span>45                                </div>
46                                <div className="transition ease-in-out dark:bg-zinc-100 dark:hover:bg-zinc-400 mx-2 text-black py-1.5 rounded-lg text-xl flex grid-cols-2 gap-4 my-4 justify-center cursor-pointer" onClick={ ()=>setGoogleSignin(!googleSignin)}>
47                                    <img src="/images/GoogleLogo.webp" className="w-7"/>
The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
20          <div className="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-10 w-2/3 lg:w-1/3 mx-auto pt-10 pb-10">
21            <Link href="/game-info/enemy-stats">
22            <div className="transition ease-in-out rounded-lg rounded-lg border-4 border-zinc-600 bg-zinc-300 dark:border-zinc-500 dark:bg-zinc-800 dark:hover:bg-zinc-700 hover:scale-105 hover:bg-zinc-400 p-4 col-span-3 cursor-pointer">
23                <a className="text-2xl">Enemy Stats</a>24              <p className="text-lg">Learn about different enemies, and the best ways to defeat them.</p>
25            </div>
26            </Link>
The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
60    l.push((
61      <Link href={`/game-info/enemy-stats/${jdata.enemies[i].toLowerCase()}`} className="">
62        <div className="transition ease-in-out rounded-lg border-4 border-zinc-600 bg-zinc-300 dark:border-zinc-500 dark:bg-zinc-800 dark:hover:bg-zinc-700 hover:scale-105 hover:bg-zinc-400 p-2 grid grid-cols-3 gap-5 cursor-pointer">
63          <a className="text-4xl col-span-2 my-auto ml-6">{capitalizeFirstLetter(jdata.enemies[i])}</a>64          <img src={`/api/game-info/images/enemies/${jdata.enemies[i].toLowerCase()}`} className="" />
65        </div>
66      </Link>
The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
45					<div className="grid grid-rows-3 rounded-lg w-9/12 lg:w-1/3 border-4 border-zinc-400 mx-auto text-xl p-4 mb-24">
46						<a className="text-2xl p-1">Name: { jdata.name }</a>
47						<a className="text-2xl p-1">Health: { jdata.a.health } ({ (jdata.a.health / 100) * 100 }% of player's health)</a>
48						<a className="text-2xl p-1">Damage: { jdata.a.damage }</a>49					</div>
50				</main>
51				<Footer/>
The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md
44				<main className="flex-grow w-full mx-auto min-h-full">
45					<div className="grid grid-rows-3 rounded-lg w-9/12 lg:w-1/3 border-4 border-zinc-400 mx-auto text-xl p-4 mb-24">
46						<a className="text-2xl p-1">Name: { jdata.name }</a>
47						<a className="text-2xl p-1">Health: { jdata.a.health } ({ (jdata.a.health / 100) * 100 }% of player's health)</a>48						<a className="text-2xl p-1">Damage: { jdata.a.damage }</a>
49					</div>
50				</main>