feat: hover Coordinator menu; pages named by their own heading
- The Coordinator pill is a real link to Shifts (/admin) and opens the Shifts / Contacts / Settings card on hover or keyboard focus (desktop). Esc closes it. Phones and tablets keep the second row in the menu overlay. - Menu links no longer scale on hover, so the blue highlight stays inside the card. - No gold "current page" line in the menu, the phone row, or the pill; aria-current stays for screen readers. The page heading shows where you are. - The dashboard heading and title are "Shifts". Breadcrumbs start at their section: Shifts > ..., Contacts > Name, Settings > Administrators. - tests: admins.test.ts updated for the new markup.
This commit is contained in:
1 parent
c576613b9d
commit
bf3724d531
6 files changed
+49
-101
No files matched your search
@@ -43,16 +43,16 @@ describe('administrators', () => {
|
||||
const cookie = await signIn(app, db, 'coordinator@example.invalid');
|
||||
const home = await app.request('/admin', { headers: { cookie } });
|
||||
const homeHtml = await home.text();
|
||||
expect(homeHtml).toContain('<details class="coord-menu">');
|
||||
expect(homeHtml).toContain('<summary class="session-here">Coordinator</summary>');
|
||||
expect(homeHtml).toContain('<div class="coord-menu">');
|
||||
expect(homeHtml).toContain('<a href="/admin" aria-haspopup="true">Coordinator</a>');
|
||||
expect(homeHtml).toContain('<a href="/admin" aria-current="page">Shifts</a>');
|
||||
expect(homeHtml).toContain('<a href="/admin/contacts">Contacts</a>');
|
||||
expect(homeHtml).toContain('<a href="/admin/settings">Settings</a>');
|
||||
expect(homeHtml).not.toContain('href="/admin/admins"');
|
||||
expect(homeHtml).toContain('<nav class="session-sections" aria-label="Coordinator">');
|
||||
const publicHtml = await (await app.request('/', { headers: { cookie } })).text();
|
||||
expect(publicHtml).toContain('<details class="coord-menu">');
|
||||
expect(publicHtml).toContain('<summary>Coordinator</summary>');
|
||||
expect(publicHtml).toContain('<div class="coord-menu">');
|
||||
expect(publicHtml).toContain('<a href="/admin" aria-haspopup="true">Coordinator</a>');
|
||||
expect(publicHtml).toContain('<a href="/admin">Shifts</a>');
|
||||
expect(publicHtml).not.toMatch(/href="\/admin[^"]*" aria-current/);
|
||||
const settings = await (await app.request('/admin/settings', { headers: { cookie } })).text();
|
||||
|
||||
Reference in new issue
Block a user