Page MenuHomePhabricator

[Minerva TOC] keyboard navigation
Closed, ResolvedPublic2 Estimated Story Points

Description

This task addresses keyboard navigation and focus management.

Acceptance Criteria:

  • "Contents" button can be reached and activated by keyboard
  • Escape key closes the table of contents and focus is restored on the "Contents" button.
  • "Clicks" on TOC section links, navigates to that section, and does not restore focus to the "Contents" button.
  • "Clicks" on "top" link, navigates to the top of the page, and does not restore focus to the "Contents" button.
  • When the table of contents opens, focus is placed on the first item (Top link)
  • When the table of contents is open, the Tab key moves the focus from one item to the next/previous
  • Confirm all of the above with iOS or simulator with both attached physical keyboard and with VoiceOver accessibility mode

Event Timeline

Change #1237585 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC: imrpove key navigation and restore focus to button

https://gerrit.wikimedia.org/r/1237585

lwatson triaged this task as High priority.Feb 6 2026, 8:56 PM
lwatson set the point value for this task to 2.

Change #1237874 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Also show sticky header when TOC button focused

https://gerrit.wikimedia.org/r/1237874

Change #1237585 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC: improve key navigation and restore focus to button

https://gerrit.wikimedia.org/r/1237585

Change #1237874 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Also show sticky header when TOC button focused

https://gerrit.wikimedia.org/r/1237874

Change #1238337 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC: Revise floating button states

https://gerrit.wikimedia.org/r/1238337

"Contents" button can be reached and activated by keyboard

Both the sticky button and the floating button are keyboard accessible.

  • The sticky header button receives focus after 6 tabs from the start of the page. The first five tabs focus on the Minerva header items. Tabbing from Minera's user settings icon button moves focus to the sticky header button.
  • The floating button receives focus at the bottom of the page after the external links section.

The focus state should be more apparent now, following this change, which introduces a revised design from T416598.

Consider MenuButton keyboard navigation behavior.

  • Tab key focuses on the button, not the items inside the expandable container
  • When the expandable container is visible, focus remains on the button
  • Up/down arrows to navigate next/previous item
  • Use aria-expanded and aria-controls. This way the screen reader announces:
    • Closed: "Contents, toggle button, collapsed"
    • Open: "Contents, toggle button, expanded"

Change #1238735 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC: add table of contents region

https://gerrit.wikimedia.org/r/1238735

Change #1238735 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Minerva TOC: add table of contents region

https://gerrit.wikimedia.org/r/1238735

Etonkovidova subscribed.

Consider MenuButton keyboard navigation behavior.

  • Tab key focuses on the button, not the items inside the expandable container
  • When the expandable container is visible, focus remains on the button
  • Up/down arrows to navigate next/previous item
  • ?mpo=minerva-toc-button:treatment > The floating button receives focus at the bottom of the page after the external links section.
    • confirmed; it's very hard to reach the Content button - on longer articles it takes a really long time to reach it.
    • VoiceOver - no issues