Skip to content

Commit

Permalink
fix a11y issues
Browse files Browse the repository at this point in the history
  • Loading branch information
subject026 committed Oct 26, 2023
1 parent 3cf5c27 commit d191a9f
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 29 deletions.
10 changes: 5 additions & 5 deletions apps/site/tests/example.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";

test.describe("homepage", () => {
test("has title", async ({ page }) => {
await page.goto("/");
// test("has title", async ({ page }) => {
// await page.goto("/");

await expect(page).toHaveTitle(/Breadchain/);
});
// await expect(page).toHaveTitle(/Breadchain/);
// });

test("should not have any automatically detectable accessibility issues", async ({
page,
Expand All @@ -15,7 +15,7 @@ test.describe("homepage", () => {

const accessibilityScanResults = await new AxeBuilder({ page }).analyze(); // 4

expect(accessibilityScanResults.violations.length).toEqual(0); // 5
expect(accessibilityScanResults.violations).toEqual([]); // 5
});
});

Expand Down
2 changes: 1 addition & 1 deletion packages/site-ui/components/ButtonLink/ButtonLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import type { ReactNode } from "react";

interface IProps {
children: ReactNode;
Expand Down
2 changes: 1 addition & 1 deletion packages/site-ui/components/ColorToggle/ColorToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ export function ColorToggle() {
<section>
{colorMode && (
<button
aria-label="toggle light and dark mode"
className="flex items-center gap-2 px-4 py-2"
onClick={handleColorToggle}
aria-hidden="true"
>
<div
className={classNames(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import type { ReactNode } from "react";

function DesktopNavigationLink(props: {
children: ReactNode;
Expand All @@ -9,7 +9,7 @@ function DesktopNavigationLink(props: {
const { children, ...remainingProps } = props;
return (
<a
className="font-redhat dark:text-breadgray-white dark:hover:text-breadgray-ultra-white text-breadgray-burnt hover:text-breadgray-charcoal active:text-breadgray-violet flex items-center px-2 text-xl font-bold leading-none tracking-wider min-[810px]:px-4"
className="font-redhat dark:text-breadgray-light-grey dark:hover:text-breadgray-white text-breadgray-toast hover:text-breadgray-burnt active:text-breadgray-violet flex items-center px-2 text-xl font-bold leading-none tracking-wider min-[810px]:px-4"
{...remainingProps}
>
{children}
Expand Down
34 changes: 17 additions & 17 deletions packages/site-ui/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import type { ReactNode } from "react";

import classNames from "classnames";
import { pageWrap, pageWrapPadding } from "../classStrings";
Expand Down Expand Up @@ -109,15 +109,15 @@ export function Footer() {
<FooterSectionTitle>Navigate</FooterSectionTitle>
</div>
<FooterSectionList>
<div className="footer-md:text-left text-center">
<li className="footer-md:text-left text-center">
<FooterLink href="#about">About</FooterLink>
</div>
<div className="footer-md:text-left text-center">
</li>
<li className="footer-md:text-left text-center">
<FooterLink href="#projects">Projects</FooterLink>
</div>
<div className="footer-md:text-left text-center">
</li>
<li className="footer-md:text-left text-center">
<FooterLink href="#values">Values</FooterLink>
</div>
</li>
</FooterSectionList>
</FooterSection>

Expand All @@ -126,38 +126,38 @@ export function Footer() {
<FooterSectionTitle>Socials</FooterSectionTitle>
</div>
<FooterSectionList>
<div className="footer-md:text-left text-center">
<li className="footer-md:text-left text-center">
<FooterLink
isExternal
href="https://breadchain.mailchimpsites.com/"
>
Newsletter
</FooterLink>
</div>
</li>

<div className="footer-md:text-left text-center">
<li className="footer-md:text-left text-center">
<FooterLink isExternal href="https://twitter.com/breadchain_">
Twitter
</FooterLink>
</div>
<div className="footer-md:text-left text-center">
</li>
<li className="footer-md:text-left text-center">
<FooterLink isExternal href="https://cryptoleftists.xyz">
Discord
</FooterLink>
</div>
<div className="footer-md:text-left text-center">
</li>
<li className="footer-md:text-left text-center">
<FooterLink isExternal href="https://breadchain.mirror.xyz/">
Mirror
</FooterLink>
</div>
<div className="footer-md:text-left text-center">
</li>
<li className="footer-md:text-left text-center">
<FooterLink
isExternal
href="https://opencollective.com/breadchain-cooperative"
>
Open Collective
</FooterLink>
</div>
</li>
</FooterSectionList>
</SocialsSection>
</FooterGrid>
Expand Down
1 change: 1 addition & 0 deletions packages/site-ui/components/Logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export function Logo() {
<a
href="/"
className="flex h-full w-full items-center justify-center px-4 py-2"
aria-label="home"
>
<img
className="w-full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
MobileNavigationLinkWithRef,
} from "./MobileNavLink";
import { ColorToggle } from "../ColorToggle/ColorToggle";
import { ToggleType } from "../Header";
import type { ToggleType } from "../Header";
import MobileNavigationToggle from "./MobileNavigationToggle";

/*
Expand Down
4 changes: 2 additions & 2 deletions packages/site-ui/components/TertiaryLink/TertiaryLink.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import type { ReactNode } from "react";

interface IProps {
children: ReactNode;
Expand All @@ -8,7 +8,7 @@ interface IProps {

export function TertiaryLink({ children, href, isExternal }: IProps) {
const classes =
"inline-block font-redhat font-bold md:text-xl px-4 py-2.5 md:px-6 md:py-3 text-breadpink-300 hover:text-breadpink-200 active:text-breadpink-200 ";
"inline-block font-redhat font-bold md:text-xl px-4 py-2.5 md:px-6 md:py-3 text-breadpink-500 hover:text-breadpink-600 active:text-breadpink-600 ";

if (isExternal) {
return (
Expand Down

0 comments on commit d191a9f

Please sign in to comment.