You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keyboard-only users or users with disabilities may navigate a web page by pressing the key Tab to navigate to the next focus or the keys ShiftTab to navigate to the previous one. When an item gains focus, a rectangular square, called the "focus indicator," will surround it. For screen-reader users, the screen reader is at "focus mode" when keyboard-navigating the web page, which is contrary to "browse mode" when reading textual content inside a web page. Users proceed with the desired focus by pressing the key Enter (announced as "Return" by the Orca screen reader), which is functionally equivalent to a mouse click.
At the top-left corner of the rendered Nix Reference Manual comes three buttons: "Toggle Table of Content" (hamburger menu icon), "Change theme" (pen icon), and "Toggle Searchbar" (magnifier icon). Such buttons should also be the first three focusable item at the page, as the Manual currently doesn't offer the "skip to the main content" hidden focusable item.
Since the button "Toggle Table of Content" should be the first focusable item, it should be focused when pressing the key Tab right after the page finishes loading.
When keyboard-navigating the rendered Nix Reference Manual page with the Mozilla Firefox browser, the button "Navigation Table of Content" is not focusable. The first key press Tab after the page finishes loading turns out ineffective. The second key press Tab focuses the button "Change theme," and the screen reader announces "Change theme collapsed button opens menu." When navigating to the previous item from "Change theme," the visual focus indicator is lost, and the screen reader announces "Browse mode." When navigating again to the previous item, the focus goes to the toolbar of the browser, and the screen reader starts to announce them.
On Chromium, the first key press Tab after the page load brings the focus to the button "Change theme." When navigating onto the previous focus, the focus indicator is also lost. However, the screen reader will then announce "Navigation Tabel of Content," and starts announcing the whole Table of Content. When pressing the keyDown and the keyUp, the screen reader announces the items inside Table of Content as if the user is navigating them, and the visual hint of links being focused appears at the bottom-left of the page. When pressing the key Enter, the browser brings the user to the page of the corresponding section.
Steps To Reproduce
Prerequisites
Prepare the browsers Mozilla Firefox and the Chromium.
(Optional) Prepare and run the Orca screen reader (nix run github:NixOS/nixpkgs/nixos-unstable#orca) (Linux-only). Toggle it off or on with the keys AltSupers.
Windows and MacOS users enjoy more mature screen reader options like NVDA and VoiceOver.
Here the screen reader announced "Finish loading Nix Reference Manual."
Press the key Tab.
See the focus indicator goes to the pen icon, and hear the screen reader announces "Tab" and "Change theme collapsed button opens menu."
Press the keys ShiftTab.
See the focus indicator disappears, but hear the screen reader announces "Navigation Table of Content. Introduction ..."
Press again the keys ShiftTab.
See the keyboard indicator goes up to the bookmark (star) icon at the right of the address bar, and hear the screen reader announces "Panel. Bookmark this tab button."
Press the key Tab.
See the focus indicator disappears, and hear the screen reader announces "Navigation Table of Content. Introduction ..."
Press again the key Tab.
See the focus indicator goes to the pen icon, and hear the screen reader announces "Leaving navigation. Change theme collapsed button opens menu."
Press the keys ShiftTab.
See the focus indicator disappears, but hear the screen reader announces "Navigation Table of Content. Introduction ..."
Press the key Down.
See nothing happen to the top-left corner, but a hint of link https://nix.dev/manual/nix/2.26/quick-start shows up at the down-left corner. Hear the screen reader announces "Quick Start link." ("Quick Start" is the second page, the page next to the first page "Introduction.")
Press the key Enter. The screen reader will announce "Return."
See the "Quick Start" page loaded, and hear the screen reader announces the content of the page.
Press the key Tab.
Hear the screen reader announces "Navigation Table of Content ..."
Press again the key Tab.
See the pen icon gets focused and hear the screen reader announces "Change theme ..."
Press the keys ShiftTab.
See the focus indicator disappears, and the screen reader announces "Navigation Table of Content ..."
See the "Introduction" page loaded, and hear the screen reader announces the content of the page.
Expected behavior
The button "Toggle Table of Content" (the hamburger menu) should be focused before the button "Change theme" (the pen).
When proceed with the key Enter, the menu should visually show up.
Metadata
nix-env (Nix) 2.24.10
Additional context
Below are two screen-recording videos with audio from the screen reader showing the issues. They don't precisely follow the reproduction steps, but should be able to demonstrate the issues.
To hear the audio while playing the video, navigate to the "Unmute" button of the video, press the key Enter, navigate back to the "Play" button, and press the key Enter.
ShamrockLee
changed the title
doc: a11y: "Toggle Table of Content" hamburger manual is not keyboard focusable
doc: a11y: "Toggle Table of Content" hamburger menu is not keyboard focusable
Mar 14, 2025
Describe the bug
Keyboard-only users or users with disabilities may navigate a web page by pressing the key Tab to navigate to the next focus or the keys ShiftTab to navigate to the previous one. When an item gains focus, a rectangular square, called the "focus indicator," will surround it. For screen-reader users, the screen reader is at "focus mode" when keyboard-navigating the web page, which is contrary to "browse mode" when reading textual content inside a web page. Users proceed with the desired focus by pressing the key Enter (announced as "Return" by the Orca screen reader), which is functionally equivalent to a mouse click.
At the top-left corner of the rendered Nix Reference Manual comes three buttons: "Toggle Table of Content" (hamburger menu icon), "Change theme" (pen icon), and "Toggle Searchbar" (magnifier icon). Such buttons should also be the first three focusable item at the page, as the Manual currently doesn't offer the "skip to the main content" hidden focusable item.
Since the button "Toggle Table of Content" should be the first focusable item, it should be focused when pressing the key Tab right after the page finishes loading.
When keyboard-navigating the rendered Nix Reference Manual page with the Mozilla Firefox browser, the button "Navigation Table of Content" is not focusable. The first key press Tab after the page finishes loading turns out ineffective. The second key press Tab focuses the button "Change theme," and the screen reader announces "Change theme collapsed button opens menu." When navigating to the previous item from "Change theme," the visual focus indicator is lost, and the screen reader announces "Browse mode." When navigating again to the previous item, the focus goes to the toolbar of the browser, and the screen reader starts to announce them.
On Chromium, the first key press Tab after the page load brings the focus to the button "Change theme." When navigating onto the previous focus, the focus indicator is also lost. However, the screen reader will then announce "Navigation Tabel of Content," and starts announcing the whole Table of Content. When pressing the keyDown and the keyUp, the screen reader announces the items inside Table of Content as if the user is navigating them, and the visual hint of links being focused appears at the bottom-left of the page. When pressing the key Enter, the browser brings the user to the page of the corresponding section.
Steps To Reproduce
Prerequisites
nix run github:NixOS/nixpkgs/nixos-unstable#orca
) (Linux-only). Toggle it off or on with the keys AltSupers.Windows and MacOS users enjoy more mature screen reader options like NVDA and VoiceOver.
The Mozilla Firefox reproducer
The Chromium reproducer
Expected behavior
Metadata
nix-env (Nix) 2.24.10
Additional context
Below are two screen-recording videos with audio from the screen reader showing the issues. They don't precisely follow the reproduction steps, but should be able to demonstrate the issues.
To hear the audio while playing the video, navigate to the "Unmute" button of the video, press the key Enter, navigate back to the "Play" button, and press the key Enter.
Mozilla Firefox demo video
nix_manual_toc_not_focusable_firefox_Kooha-2025-03-15-08-24-36.webm
Chromium demo video
nix_manual_toc_not_focusable_chromium_Kooha-2025-03-14-22-07-43.webm
Checklist
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: