From 8647197a05490e2c10106a021cf6760bdabb5b2a Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 11 Feb 2022 17:56:27 +0100 Subject: chore: improve accessibility --- src/components/Widgets/ToC/ToC.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/components/Widgets/ToC') diff --git a/src/components/Widgets/ToC/ToC.tsx b/src/components/Widgets/ToC/ToC.tsx index 8a2d493..f3f783c 100644 --- a/src/components/Widgets/ToC/ToC.tsx +++ b/src/components/Widgets/ToC/ToC.tsx @@ -1,7 +1,7 @@ import { ExpandableWidget, OrderedList } from '@components/WidgetParts'; import { Heading } from '@ts/types/app'; import useHeadingsTree from '@utils/hooks/useHeadingsTree'; -import { useIntl } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; const ToC = () => { const intl = useIntl(); @@ -15,7 +15,18 @@ const ToC = () => { return headings.map((heading) => { return (
  • - {heading.title} + + ( + {chunks} + ), + }} + /> + {heading.children.length > 0 && ( )} -- cgit v1.2.3