Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions apps/www/components/page/copy-button.integration.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ describe("CopyButton + useToast + Toaster integration", () => {

// Initially should show Copy icon
const button = screen.getByRole("button", { name: /copy command/i });
expect(screen.getByLabelText(/copy icon/i)).toBeInTheDocument();
expect(screen.queryByLabelText(/check icon/i)).not.toBeInTheDocument();
// Icons are decorative (aria-hidden), so check by SVG class
expect(button.querySelector(".lucide-copy")).toBeInTheDocument();
expect(button.querySelector(".lucide-check")).not.toBeInTheDocument();

await user.click(button);

Expand All @@ -137,10 +138,10 @@ describe("CopyButton + useToast + Toaster integration", () => {
expect(
screen.getByRole("button", { name: /copied/i }),
).toBeInTheDocument();
// Check icon should be visible
expect(screen.getByLabelText(/check icon/i)).toBeInTheDocument();
// Check icon should be visible (decorative, aria-hidden)
expect(button.querySelector(".lucide-check")).toBeInTheDocument();
// Copy icon should no longer be visible
expect(screen.queryByLabelText(/copy icon/i)).not.toBeInTheDocument();
expect(button.querySelector(".lucide-copy")).not.toBeInTheDocument();
});
});

Expand Down
6 changes: 1 addition & 5 deletions apps/www/components/page/copy-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ export function CopyButton({ command }: CopyButtonProps) {
className="hover:bg-slate-800 text-slate-400 hover:text-slate-100"
aria-label={copied ? "Copied" : "Copy command"}
>
{copied ? (
<Check aria-label="Check icon" />
) : (
<Copy aria-label="Copy icon" />
)}
{copied ? <Check aria-hidden="true" /> : <Copy aria-hidden="true" />}
</Button>
);
}
6 changes: 5 additions & 1 deletion apps/www/components/page/edit-on-github.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export const EditOnGithub = ({ path }: EditOnGithubProps) => {
target="_blank"
rel="noopener noreferrer"
>
<SquarePen className="w-4 h-4" data-testid="square-pen-icon" />
<SquarePen
aria-hidden="true"
className="w-4 h-4"
data-testid="square-pen-icon"
/>
Edit this page on GitHub
</Link>
</Button>
Expand Down
1 change: 1 addition & 0 deletions apps/www/components/page/sail-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function SailButton() {
className="inline-flex items-center justify-center gap-2 whitespace-nowrap"
>
<Sailboat
aria-hidden="true"
className={`transition-transform duration-[700ms] ease-in ${isSailing ? "translate-x-[1000%]" : ""}`}
onTransitionEnd={() => router.push("/docs/quickstart")}
/>
Expand Down
11 changes: 8 additions & 3 deletions apps/www/components/page/star-us-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,10 @@ export function StarUsButton({ className }: StarUsProps) {
rel="noopener noreferrer"
>
<div className="flex items-center gap-2">
<SiGithub className="w-4 h-4" />
<SiGithub aria-hidden="true" className="w-4 h-4" />
<span className="font-semibold">Star us on GitHub!</span>
<Star
aria-hidden="true"
className="w-5 h-5 text-yellow-600 dark:text-yellow-400"
fill="currentColor"
/>
Expand Down Expand Up @@ -175,7 +176,10 @@ export function StarUsButton({ className }: StarUsProps) {
rel="noopener noreferrer"
>
{/* Sparkle effects */}
<div className="absolute inset-0 pointer-events-none">
<div
className="absolute inset-0 pointer-events-none"
aria-hidden="true"
>
<div
className="absolute top-1 left-2 w-1 h-1 bg-yellow-400 rounded-full star-sparkle"
style={{ animationDelay: "0s" }}
Expand All @@ -196,9 +200,10 @@ export function StarUsButton({ className }: StarUsProps) {

{/* Main content */}
<div className="flex items-center gap-2 relative z-10">
<SiGithub className="w-4 h-4" />
<SiGithub aria-hidden="true" className="w-4 h-4" />
<span className="font-semibold">Star us on GitHub!</span>
<Star
aria-hidden="true"
className="w-5 h-5 transition-all duration-300 star-bounce text-yellow-600 dark:text-yellow-400"
fill="currentColor"
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/www/components/ui/toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ToastClose = React.forwardRef<
toast-close=""
{...props}
>
<X className="h-4 w-4" />
<X aria-hidden="true" className="h-4 w-4" />
</ToastPrimitives.Close>
));
ToastClose.displayName = ToastPrimitives.Close.displayName;
Expand Down
2 changes: 1 addition & 1 deletion apps/www/content/docs/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ import { SiGithub as GitHub } from "@icons-pack/react-simple-icons";
## Next steps

<Cards>
<Card icon={<GitHub />} title="Contribute an example" href="https://github.com/yamcodes/arkenv/tree/main/examples#contributing-examples" />
<Card icon={<GitHub aria-hidden="true" />} title="Contribute an example" href="https://github.com/yamcodes/arkenv/tree/main/examples#contributing-examples" />
</Cards>
4 changes: 2 additions & 2 deletions apps/www/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ import { SiGithub as GitHub } from "@icons-pack/react-simple-icons";
<Cards>
<Card title="Quickstart" href="/docs/quickstart" description="Add ArkEnv to an existing project" />
<Card title="Start with an example" href="/docs/examples" description="Explore our collection of examples to start a new project" />
<Card icon={<GitHub />} title="ArkEnv on GitHub" href="https://github.com/yamcodes/arkenv" description="View the source code and contribute to the project" />
<Card icon={<Globe />} title="ArkType Documentation" href="https://arktype.io/docs" description="Learn more about the underlying type system" className="bg-blue-900" />
<Card icon={<GitHub aria-hidden="true" />} title="ArkEnv on GitHub" href="https://github.com/yamcodes/arkenv" description="View the source code and contribute to the project" />
<Card icon={<Globe aria-hidden="true" />} title="ArkType Documentation" href="https://arktype.io/docs" description="Learn more about the underlying type system" className="bg-blue-900" />
</Cards>
2 changes: 0 additions & 2 deletions apps/www/content/docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: Quickstart
description: Let's get you started with a few simple steps.
---

import { FolderCode, Blocks } from "lucide-react";

<Steps>
<Step>
## Install
Expand Down
1 change: 0 additions & 1 deletion tooling/playwright-www/tests/a11y.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ test.describe("A11y Smoke Tests", () => {
// fumadocs-ui renders secondary nav items in <div> instead of <ul>
// Track: https://github.com/fuma-nama/fumadocs/issues/2566
"listitem",
"svg-img-alt", // decorative SVGs in buttons/links
],
});
}
Expand Down
Loading