From 056ed0d5f050158cebad689099214b164539899a Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 15 May 2022 19:08:58 +0200 Subject: chore: improve accessibility --- src/components/organisms/layout/footer.tsx | 15 ++++++++++++++- src/components/organisms/layout/summary.module.scss | 5 +++++ src/components/organisms/layout/summary.tsx | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) (limited to 'src/components/organisms') diff --git a/src/components/organisms/layout/footer.tsx b/src/components/organisms/layout/footer.tsx index 15bfa24..1426e96 100644 --- a/src/components/organisms/layout/footer.tsx +++ b/src/components/organisms/layout/footer.tsx @@ -4,6 +4,7 @@ import Copyright, { import BackToTop from '@components/molecules/buttons/back-to-top'; import Nav, { type NavItem } from '@components/molecules/nav/nav'; import { FC } from 'react'; +import { useIntl } from 'react-intl'; import styles from './footer.module.scss'; export type FooterProps = { @@ -31,6 +32,13 @@ export type FooterProps = { * Renders a footer with copyright and nav; */ const Footer: FC = ({ className, copyright, navItems, topId }) => { + const intl = useIntl(); + const ariaLabel = intl.formatMessage({ + defaultMessage: 'Footer', + description: 'Footer: an accessible name for footer nav', + id: 'd4N8nD', + }); + return (
= ({ className, copyright, navItems, topId }) => { icon={copyright.icon} /> {navItems && ( -
diff --git a/src/components/organisms/layout/summary.module.scss b/src/components/organisms/layout/summary.module.scss index 9d28bc6..7e86dd2 100644 --- a/src/components/organisms/layout/summary.module.scss +++ b/src/components/organisms/layout/summary.module.scss @@ -80,6 +80,11 @@ } } +.link { + display: block; + width: fit-content; +} + .title { margin: 0; background: none; diff --git a/src/components/organisms/layout/summary.tsx b/src/components/organisms/layout/summary.tsx index 078f9ee..3831c0c 100644 --- a/src/components/organisms/layout/summary.tsx +++ b/src/components/organisms/layout/summary.tsx @@ -116,6 +116,7 @@ const Summary: FC = ({ )), comments: { + about: title, count: commentsCount || 0, target: `${url}#comments`, }, @@ -126,7 +127,7 @@ const Summary: FC = ({
{cover && }
- + {title} -- cgit v1.2.3