Fix accessibility issues reported by PageSpeed tests (#41)

* Set aria-label on all buttons

* Use a <p> instead of <h4> in footer
This commit is contained in:
Samy Pessé
2023-12-18 12:31:56 +01:00
committed by GitHub
parent 705ea6c997
commit fc68dbdd4e
7 changed files with 24 additions and 4 deletions
+3
View File
@@ -1,6 +1,7 @@
'use client';
import { IconSearch } from '@/components/icons/IconSearch';
import { useLanguage, tString } from '@/intl/client';
import { ClassValue, tcls } from '@/lib/tailwind';
import { useSearch } from './useSearch';
@@ -11,6 +12,7 @@ import { useSearch } from './useSearch';
export function SearchButton(props: { children?: React.ReactNode; style?: ClassValue }) {
const { style, children } = props;
const language = useLanguage();
const [, setSearchState] = useSearch();
const onClick = () => {
@@ -23,6 +25,7 @@ export function SearchButton(props: { children?: React.ReactNode; style?: ClassV
return (
<button
onClick={onClick}
aria-label={tString(language, 'search')}
className={tcls(
'flex',
'flex-1',