As a reader, I want to be able to see a shorter version of the ToC so that I can scan it more quickly
|collapsed state||expanded state|
- When a section is collapsed, all of its subsections are hidden.
- When a section is expanded, all of its subsections are visible.
- Collapsing/expanding behaviour only applies to top-level sections.
When clicking on a ToC section link:
- It should "activate" (scroll to corresponding section and bolden the text)
- The corresponding ToC section should expand
- Collapsed by default: Sections should expand when clicking the top-level section headings.
- Expanded by default (potentially in the future):-sections should remain expanded when scrolling and clicking. No collapsing should occur.
A11Y & I18N considerations
- The arrow should point left for RTL languages when collapsed (◀) and be aligned with the beginning of the text.
- This feature (expanding and collapsing) should be disabled for users with the prefers-reduced-motion flag enabled in their browser. With this flag enabled, the ToC should essentially fall back to the no-js version.
- Sections will have the ability to collapse and uncollapse the subsections within them
- Collapsing and uncollapsing will be achieved by selecting the section name
- Sections will be collapsed by default when total section count is >= 20
-  A unit test should be added to Vector modelling the behaviour