From 296697370d174d04e4036eb4f9b8a7e2c47dbdc7 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Thu, 24 Mar 2022 20:14:16 +0000 Subject: [PATCH] Improving A11y across pages (#2219) * Improving Event-Types A11y * Fixing more A11y Issues * Removing Yarn.lock --- apps/web/components/availability/Schedule.tsx | 4 +- apps/web/pages/event-types/[type].tsx | 10 +- yarn.lock | 1967 +++++++++++------ 3 files changed, 1252 insertions(+), 729 deletions(-) diff --git a/apps/web/components/availability/Schedule.tsx b/apps/web/components/availability/Schedule.tsx index 7c13a8ca..05633a59 100644 --- a/apps/web/components/availability/Schedule.tsx +++ b/apps/web/components/availability/Schedule.tsx @@ -5,11 +5,11 @@ import utc from "dayjs/plugin/utc"; import React, { useCallback, useState } from "react"; import { Controller, useFieldArray } from "react-hook-form"; +import { useLocale } from "@calcom/lib/hooks/useLocale"; import Button from "@calcom/ui/Button"; import { defaultDayRange } from "@lib/availability"; import { weekdayNames } from "@lib/core/i18n/weekday"; -import { useLocale } from "@lib/hooks/useLocale"; import { TimeRange } from "@lib/types/schedule"; import { useMeQuery } from "@components/Shell"; @@ -169,6 +169,7 @@ const ScheduleBlock = ({ name, day, weekday }: ScheduleBlockProps) => { size="icon" color="minimal" StartIcon={TrashIcon} + aria-label={t("remove")} type="button" onClick={() => remove(index)} /> @@ -183,6 +184,7 @@ const ScheduleBlock = ({ name, day, weekday }: ScheduleBlockProps) => { size="icon" className={fields.length > 0 ? "visible" : "invisible"} StartIcon={PlusIcon} + aria-label={t("add")} onClick={handleAppend} /> diff --git a/apps/web/pages/event-types/[type].tsx b/apps/web/pages/event-types/[type].tsx index c8ae1972..595d02bd 100644 --- a/apps/web/pages/event-types/[type].tsx +++ b/apps/web/pages/event-types/[type].tsx @@ -784,10 +784,11 @@ const EventTypePage = (props: inferSSRProps) => { locationFormMethods.unregister("locationAddress"); openLocationModal(location.type); }} + aria-label={t("edit")} className="mr-1 p-1 text-gray-500 hover:text-gray-900"> - @@ -883,7 +884,10 @@ const EventTypePage = (props: inferSSRProps) => {
-