Skip to content

Commit 114304e

Browse files
committed
Revert "feat: enhance accessibility by adding ARIA attributes to table of contents items"
This reverts commit d823495.
1 parent d823495 commit 114304e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/components/table-of-contents.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@ import usePage from '../hooks/use-page'
66

77
const TableOfContentsItems = ({items, depth}) => (
88
<>
9-
{items.map((item, index) => (
9+
{items.map(item => (
1010
<React.Fragment key={item.title}>
11-
<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-
>
11+
<NavList.Item href={item.url} sx={{pl: depth > 1 ? 4 : 2}}>
1812
{item.title}
1913
</NavList.Item>
2014
{item.items ? <TableOfContentsItems items={item.items} depth={depth + 1} /> : null}

0 commit comments

Comments
 (0)