Navigation bar on phones: every item in the bar, no More, scrolling sideways when they do not fit #912
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#912
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On a phone held upright, the main navigation bar at the foot of the window drops More (the three dots and its label). Every item sits in the bar itself, spread evenly across it, and the bar scrolls sideways when the items do not fit.
What exists today
templates/partials/nav_links.htmldraws the main navigation once. Belowmd(48rem) the same<nav class="nav-main">is a bar fixed to the foot of the window. It holds the first four items and More (<c-dropdown-menu kind="navigation" … data-nav-more>, trigger{% icon "ellipsis" %}+ "More"). More opens a popover upwards that lists the rest.assets/css/app.css, the block under "The main navigation belowmd" (about line 2331 onmain): five equal slots (flex: 1 1 0), an icon over its label,flex-wrap, so More goes to a second row where the labels do not fit (Estonian at 320px). The comment there gives #299's rule: "the bar grows a line and nothing is cut, clipped or scrolled"..nav-main:not(:has(> a:nth-of-type(5))) > [data-nav-more]and the like). So are the rules that shade More when the current page is one of its items (> [data-nav-more]:has(> [data-popover] > a[aria-current="page"]…)).app.jsmeasures the bar into--bottom-bar-height(aroundmainNav/[data-nav-more], about line 2464).What would change
md, every navigation item is in the bar, in the person's order. More and its popover are not drawn there. Frommdup the masthead row keeps More as it is now.overflow-x: auto, noflex-wrap), with each slot at least its current minimum (44px, labels wrapped between words only).app.cssandnav_links.htmlto match.aria-current="page") is scrolled into view inside the bar, so it is never off-screen.--bottom-bar-heightstill measures the bar. With one row it should be stable.Accessibility
<nav aria-label="Main">of links, so no new names are needed. Every item is a link, so keyboard users reach the hidden ones by Tab, and the bar has to scroll the focused link into view (SC 2.4.11, focus not obscured).Notes
Checked against
mainat56fc9d531.