1
0
mirror of synced 2025-12-25 02:17:36 -05:00

Accessibility: Nesting headingLevel 3 mini tocs (#23663)

* nesting headingLevel 3 mini tocs

* fix tests

* Update components/article/ArticlePage.tsx

Co-authored-by: Robert Sese <robert.sese@gmail.com>

* run prettier

Co-authored-by: Robert Sese <robert.sese@gmail.com>
This commit is contained in:
Grace Park
2021-12-13 20:29:09 -08:00
committed by GitHub
parent 6805cd68a8
commit 41c7f58437
2 changed files with 18 additions and 6 deletions

View File

@@ -344,7 +344,7 @@ describe('server', () => {
)
expect($('h2#in-this-article').length).toBe(1)
expect($('h2#in-this-article + div div ul').length).toBeGreaterThan(0) // non-indented items
expect($('h2#in-this-article + div div ul li div div div ul.ml-3').length).toBeGreaterThan(0) // indented items
expect($('h2#in-this-article + div div ul li div div div ul li').length).toBeGreaterThan(0) // indented items
})
test('does not render mini TOC in articles with only one heading', async () => {