We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d675805 commit d823495Copy full SHA for d823495
src/components/table-of-contents.js
@@ -6,9 +6,15 @@ import usePage from '../hooks/use-page'
6
7
const TableOfContentsItems = ({items, depth}) => (
8
<>
9
- {items.map(item => (
+ {items.map((item, index) => (
10
<React.Fragment key={item.title}>
11
- <NavList.Item href={item.url} sx={{pl: depth > 1 ? 4 : 2}}>
+ <NavList.Item
12
+ href={item.url}
13
+ sx={{pl: depth > 1 ? 4 : 2}}
14
+ aria-setsize={items.length}
15
+ aria-posinset={index + 1}
16
+ aria-level={depth}
17
+ >
18
{item.title}
19
</NavList.Item>
20
{item.items ? <TableOfContentsItems items={item.items} depth={depth + 1} /> : null}
0 commit comments