Reading/Web/Desktop Improvements/Features/Table of contents

A main goal of the Desktop Improvements project, is to make frequently used tools more accessible to readers and editors. One of the most crucial of these tools is the table of contents, which is responsible for providing both contextual insight and navigation. Currently, the table of contents is only available at the top of the page, limiting its usefulness. We plan to make the table of contents a persistent element, available throughout the page. Our goal is to make it easier for readers and editors to reach the table of contents, gain context, and navigate throughout the article without needing to scroll all the way to the top of the page.

Background and Goals
A big focus of the Desktop Improvements project is to make our workflows and navigation clearer and easier to use. This has so far included  work on a collapsible sidebar, introducing a sticky header, and now, our current focus - a new table of contents (ToC). Currently:


 * The current ToC is available only at the top of the page.  This makes it difficult to regain context and navigate within the article without having to scroll all the way up
 * For pages with a long lead/intro section, the ToC is not visible until you scroll down a bit
 * Users use the ToC to create a mental model of the article.  This becomes lost without the ability to reference it more frequently
 * The ToC creates a lot of unused space on the page that could be used for displaying article content and other functionality

The new, persistent table of contents will make it easier for readers to understand the context of the article, and to navigate to different parts of the article throughout their reading experience, without having to scroll all the way back to the top of the page every time they want to access the table of contents.

Use Cases

 * As a reader or editor, I want the ability to gain context (content and structure) about the article I am about to read
 * As a reader or editor, I want the ability to reference the next few sections in the article at any location in the page so that I can choose what to read next
 * As a reader or editor, I want the ability know how many sections an article has without having to scroll all the way up a page

Feature description and requirements
The table of contents will appear persistently on one side of the page. This table of contents will contain all sections and sub-sections available in previous versions of the ToC.

The ToC will contain the following functionality:


 * Collapsible sub-sections - for users that only want to view the highest level of section heading
 * Section bolding - the section currently on the page will be displayed as bold. Users will be able to identify where on the page they are currently located by noting the bolding within the ToC
 * Navigation - selecting a section within the Table of Contents will navigate to the appropriate section within the page
 * For screen widths smaller than 1000px, the ToC will collapse and the section titles will be used as a ToC

Prototype
General ToC functionality: https://en-toc.wmcloud.org/wiki/Moon

Collapsible section functionality: https://di-toc-collapsible-sections.web.app/Aretha_Franklin

User Testing with Readers and Editors
We performed user testing of the table of contents with readers and editors in three locations (Argentina, Ghana, Indonedia) and languages. Test participants were asked to interact with different versions of a persistent table of contents and to give their feedback on their preferred version. The test also included an open study of the way readers and editors perceived and used the table of contents. All users found the Table of Contents to be essential to the reading experience of Wikipedia for both navigational purposes as well as for setting the context for the page.

Main observations:


 * Testers prioritized persistent access - the best-performing prototype was the persistent one across all tests
 * Testers prioritized having more information - prototypes that contained all sections and subsections performed better
 * Testers did not want the ToC to overlap the content, even in the cases where it was supplementary to the main toc at the top of the page
 * Testers liked getting a sense of location within the article and noted that additions like bolding the title or the section helped with their orientation

The results of the test were used to select the best performing of our prototypes and iterate to better fit the needs of the participants. See the full results of this test.

Prototype testing with editors
In December 2021, we performed prototype testing with logged-in users across 30 wikis. The test was designed to gather feedback on the usability and functionality of the table of contents. We are currently in the process of evaluating the results

Quantitative testing
We will be performing an A/B test of the functionality of the current versus new version of the table of contents.

Main Questions:


 * 1) Is the new table of contents is used more frequently than the previous table of contents
 * 2) Does the new table of contents reduce the need to scroll back to the top of the page
 * 3) Does the new table of contents decrease the time people spend scrolling/scrolling quickly (if possible)
 * 4) How does the new table of contents affect the time spent on a page