Fix sidebar sub-nav items not reacting to hover#734
Open
Paelsmoessan wants to merge 1 commit into
Open
Conversation
Sidebar sub-items (.nav-subitem) had CSS for only their default and active states, so they never highlighted on hover or keyboard focus. On top of that, .nav-sub was collapsed with pointer-events:none until opened via a parent hover, so a non-active section's children were unreachable until you hovered the top node first. Add a :hover / :focus-visible highlight, and keep the sub-navs expanded so children are always interactive and highlight on their own hover. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In the left sidebar, the sub-nav items (Books/Authors/Series under Audiobooks, and the Settings
children) did not react to hover. You had to hover the parent top node first before a child would
respond, which read as broken.
Changes
Fixed
.nav-subitemhad CSS for only its default and.activestates, so hovering (or keyboard-focusing) a sub-item produced no visual change. Added a:hover/:focus-visiblehighlight that matches the existing blue accent..nav-subwas collapsed withpointer-events: noneuntil it received.open(driven by hovering the parent). So for any sectionyou were not currently on, the children could not be hovered at all until you first hovered the top
node. Made the sub-navs stay expanded so children are always interactive and highlight on their own
hover.
Testing
directly, with no need to hover the parent first. Keyboard focus highlights too.
Notes
that collapse was the source of the reachability gate. If maintainers prefer to keep the accordion,
I am happy to instead fix reachability another way (for example expanding on child focus/hover
without the
pointer-eventsblock). Flagging it since it is a small behavior change.