diff --git a/src/shared/ui/section-heading/section-heading.tsx b/src/shared/ui/section-heading/section-heading.tsx index a2a9f5c..3460837 100644 --- a/src/shared/ui/section-heading/section-heading.tsx +++ b/src/shared/ui/section-heading/section-heading.tsx @@ -13,7 +13,7 @@ export const SectionHeading = ({ align = "start", eyebrow, id, title }: SectionH

{title}

- {eyebrow ?

{eyebrow}

: null} + {eyebrow ?

{eyebrow}

: null} ); }; diff --git a/src/widgets/contact/ui/contact-section.ui.tsx b/src/widgets/contact/ui/contact-section.ui.tsx index 06f773e..cc65806 100644 --- a/src/widgets/contact/ui/contact-section.ui.tsx +++ b/src/widgets/contact/ui/contact-section.ui.tsx @@ -13,7 +13,7 @@ export const ContactSectionUI = () => {
-

Let's Contact!

+

Let's Contact!

{

-

+

気軽にのぞいたり、声をかけたり

diff --git a/src/widgets/floating-navigation/ui/floating-navigation.test.tsx b/src/widgets/floating-navigation/ui/floating-navigation.test.tsx index 42b50f8..2860386 100644 --- a/src/widgets/floating-navigation/ui/floating-navigation.test.tsx +++ b/src/widgets/floating-navigation/ui/floating-navigation.test.tsx @@ -65,6 +65,22 @@ test("opens the theme panel and reports selected theme", async () => { expect(localStorage.getItem(storageKey.theme)).toBe(JSON.stringify("dark")); }); +test("exposes the selected theme state to assistive technology", async () => { + const user = userEvent.setup(); + + renderFloatingNavigation(); + + await user.click(screen.getByRole("button", { name: "Open navigation" })); + await user.click(screen.getByRole("button", { name: "Theme" })); + + expect(screen.getByRole("button", { name: "System" }).getAttribute("aria-pressed")).toBe("true"); + expect(screen.getByRole("button", { name: "Light" }).getAttribute("aria-pressed")).toBe("false"); + + await user.click(screen.getByRole("button", { name: "Dark" })); + + expect(screen.getByRole("button", { name: "Dark" }).getAttribute("aria-pressed")).toBe("true"); +}); + test("moves focus into the active panel when switching panels", async () => { const user = userEvent.setup(); diff --git a/src/widgets/floating-navigation/ui/panels/parts.tsx b/src/widgets/floating-navigation/ui/panels/parts.tsx index 9d25734..f9d61e2 100644 --- a/src/widgets/floating-navigation/ui/panels/parts.tsx +++ b/src/widgets/floating-navigation/ui/panels/parts.tsx @@ -29,7 +29,7 @@ export const PanelItem = ({ diff --git a/src/widgets/floating-navigation/ui/panels/theme-panel.ui.tsx b/src/widgets/floating-navigation/ui/panels/theme-panel.ui.tsx index 07c224c..c316f8f 100644 --- a/src/widgets/floating-navigation/ui/panels/theme-panel.ui.tsx +++ b/src/widgets/floating-navigation/ui/panels/theme-panel.ui.tsx @@ -32,9 +32,14 @@ export const ThemePanelUI = ({ actions: { onBack, onThemeChange }, theme }: Them onThemeChange(value)} LeftContent={ diff --git a/src/widgets/hero/ui/hero-section.test.tsx b/src/widgets/hero/ui/hero-section.test.tsx new file mode 100644 index 0000000..86cb12f --- /dev/null +++ b/src/widgets/hero/ui/hero-section.test.tsx @@ -0,0 +1,16 @@ +// @vitest-environment happy-dom + +import { cleanup, render, screen } from "@testing-library/react"; +import { afterEach, expect, test } from "vite-plus/test"; + +import { HeroSectionUI } from "./hero-section.ui"; + +afterEach(() => { + cleanup(); +}); + +test("keeps visible scroll link text in its accessible name", () => { + render(); + + expect(screen.getByRole("link", { name: "scroll down to about section" })).not.toBeNull(); +}); diff --git a/src/widgets/hero/ui/hero-section.ui.tsx b/src/widgets/hero/ui/hero-section.ui.tsx index 35c0f2d..1c5e993 100644 --- a/src/widgets/hero/ui/hero-section.ui.tsx +++ b/src/widgets/hero/ui/hero-section.ui.tsx @@ -48,7 +48,7 @@ export const HeroSectionUI = () => {