a11y support

This commit is contained in:
David
2021-03-17 21:30:47 +01:00
parent 0646b17c9b
commit eafad585fc
6 changed files with 34 additions and 4 deletions

View File

@@ -31,6 +31,7 @@ const CustomError: FC<Props> = ({ statusCode }) => (
<VStack h="100vh">
<Header/>
<Stack
as="main"
flexGrow={1}
color={useColorModeValue("lingva.900", "lingva.100")}
direction={["column", null, "row"]}

View File

@@ -7,11 +7,12 @@ type Props = {
const Footer: FC<Props> = (props) => (
<Center
as="footer"
w="full"
p={3}
fontSize={["sm", null, "md"]}
bgColor={useColorModeValue("lingva.100", "lingva.900")}
color={useColorModeValue("lingva.800", "lingva.200")}
color={useColorModeValue("lingva.900", "lingva.100")}
{...props}
>
<Text as="span">&#169; 2021 TheDavidDelta</Text>

View File

@@ -10,6 +10,7 @@ type Props = {
const Header: FC<Props> = (props) => (
<Flex
as="header"
px={1}
py={3}
justify="space-around"

View File

@@ -1,6 +1,7 @@
import { FC, ChangeEvent } from "react";
import { Select } from "@chakra-ui/react";
type Props = {
value: string,
onChange: (e: ChangeEvent<any>) => void,
@@ -15,6 +16,7 @@ const LangSelect: FC<Props> = ({ value, onChange, langs, ...props }) => (
variant="flushed"
px={2}
textAlign="center"
style={{ textAlignLast: "center" }}
{...props}
>
{langs.map(([code, name]) => (

View File

@@ -13,6 +13,8 @@ const TranslationArea: FC<Props> = ({ value, onChange, readOnly, ...props }) =>
value={value}
onChange={onChange}
readOnly={readOnly}
lang="auto"
dir="auto"
resize="none"
rows={useBreakpointValue([6, null, 12]) ?? undefined}
size="lg"