From 19f9790eef87a712a12964b273592c931108c53d Mon Sep 17 00:00:00 2001 From: rays Date: Wed, 2 Dec 2026 12:03:36 -0500 Subject: [PATCH] The page follows the style guide's design half (#507) Measured at 390 px with touch: the toolbar's buttons were 36 px wide and the tabs 36 px tall, under the guide's 40 for a dense row; both are 40 now. A chapter's hover sat outside (hover:hover) and stuck after a tap. An item row's pin and its download button had a tooltip and no aria-label. Gaps of 5, 7 and 9 px are on the scale's 4, 6 and 8. The guide said 25 palettes where there are 24; it now says every palette. Left as they are: the folder triangle, 18 px wide by design (#486, #491), and an episode's title button, inside a row that is the tap target. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RqkrVCCH8YcP2Y3i8VNYWA --- docs/STYLE-GUIDE.md | 6 +++--- web/CHANGELOG.md | 1 + web/app.css | 26 +++++++++++++------------- web/src/items.ts | 4 ++-- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/STYLE-GUIDE.md b/docs/STYLE-GUIDE.md index f38f771..297d588 100644 --- a/docs/STYLE-GUIDE.md +++ b/docs/STYLE-GUIDE.md @@ -50,8 +50,8 @@ line up on the right. **Colour** is by role, never by value: `--bg`, `--panel`, `--panel2`, `--raise` for surfaces; `--fg`, `--dim`, `--faint` for text by importance; `--accent`, `--accent2` for the selection and the primary action; `--good`, `--warn`, `--bad` for state; `--line` for rules. ✅ -`color:var(--bad)` · ❌ `color:#d33`. Each of the 25 palettes defines every role, and -`node tests/contrast.ts` checks each against WCAG AA; a new role needs a value in all 25 and a +`color:var(--bad)` · ❌ `color:#d33`. Every palette defines every role, and +`node tests/contrast.ts` checks each against WCAG AA; a new role needs a value in every palette and a contrast check. Working on a component never changes a theme's colours. **Colour is never the only signal.** An unread item has its dot and its weight; a failing feed has @@ -177,7 +177,7 @@ focus in it; closing it puts focus back. * Every toggle has `aria-pressed`; every dialog `aria-labelledby` its title; a dialog makes the page behind it `inert`. * Every pointer action has a keyboard path, and every swipe a button. -* Contrast passes WCAG AA in all 25 palettes (`node tests/contrast.ts`), for text and for icons. +* Contrast passes WCAG AA in every palette (`node tests/contrast.ts`), for text and for icons. * Nothing relies on colour alone, on hover alone, or on sound alone. * Reduced motion, reduced transparency and more contrast are honoured (`prefers-reduced-motion`, `prefers-reduced-transparency`, `prefers-contrast`). diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index e60c9da..a8a9c71 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- On a phone the toolbar's buttons and the list's tabs are at least 40 px to tap, a chapter no longer stays lit after a tap, and an item's pin and download buttons have names a screen reader reads, as the style guide's design half asks (#507). - The page's words follow one style (docs/STYLE-GUIDE.md): failures say "Unable to …" and what to do, a podcast is a podcast rather than a show, a feed has an address rather than a URL, and the buttons Auto and Initials in a signal's icon picker read Pick for me and Use initials (#507). - A title that is only the opening of an item's own text, as ipx now names an untitled item, is not shown again above that text in the reader or a directory preview (#502). - A folder's triangle in the feed list is at its row's end, before the count, so every feed lines up with the places above at the list's edge, and on a phone Playlists' and Signals' + button sits beside the title rather than on a line of its own (#486, #487). diff --git a/web/app.css b/web/app.css index e855a93..f4468be 100644 --- a/web/app.css +++ b/web/app.css @@ -571,7 +571,7 @@ a{color:var(--accent)} @media (hover:hover){.sidetools button:hover,.sidefoot button:hover{border-color:var(--accent);color:var(--fg)}} /* Settings and the log are housekeeping: they sit under the feeds, out of the way. */ .sidefoot{ - display:flex;flex-direction:column;gap:7px;padding:8px 12px; + display:flex;flex-direction:column;gap:6px;padding:8px 12px; border-top:1px solid var(--line);flex:none; } .sidefoot .row{display:flex;gap:6px} @@ -690,7 +690,7 @@ body.scan-this .fhead [data-a=scan] .i,body.scan-any .fhead [data-a=scanall] .i, and time left move as it plays. The rest stay neutral, so that one is what stands out. */ #listening .childrow,#nowqueue .childrow{position:relative;overflow:hidden;gap:12px;padding:10px 10px 13px} #listening .childrow .art,#nowqueue .childrow .art{width:44px;height:44px;font-size:13px} -#listening .txt b,#nowqueue .txt b{display:flex;align-items:center;gap:7px} +#listening .txt b,#nowqueue .txt b{display:flex;align-items:center;gap:6px} #listening .txt b span,#nowqueue .txt b span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} #listening .txt small,#nowqueue .txt small{display:flex;gap:12px;margin-top:3px;color:var(--faint);font-size:11.5px} #listening .txt small .fd,#nowqueue .txt small .fd{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} @@ -712,7 +712,7 @@ body.scan-this .fhead [data-a=scan] .i,body.scan-any .fhead [data-a=scanall] .i, /* Chapters (#477): a tap plays from there; the one playing reads bold. */ .chapters{list-style:none;margin:0;padding:0;display:flex;flex-direction:column} .chapters button{display:flex;gap:14px;width:100%;padding:8px 6px;border-radius:8px;text-align:left;font-size:14px} -.chapters button:hover{background:var(--raise)} +@media (hover:hover){.chapters button:hover{background:var(--raise)}} .chapters .ctime{min-width:4.5em;color:var(--dim);font-variant-numeric:tabular-nums} .chapters button[aria-current]{font-weight:600} #pnow{cursor:pointer;border-radius:8px} @@ -751,7 +751,7 @@ body.scan-this .fhead [data-a=scan] .i,body.scan-any .fhead [data-a=scanall] .i, /* The Directory, laid out as Apple's is: a large title, then sections. Every page carries what kind of feed (.tabs, as the item filters are) in its title row. */ .dhead{margin-bottom:6px} -.dback{display:inline-flex;align-items:center;gap:5px;margin:0 0 8px -5px;padding:3px 5px;border-radius:6px;font-size:13px;color:var(--accent)} +.dback{display:inline-flex;align-items:center;gap:4px;margin:0 0 8px -5px;padding:3px 5px;border-radius:6px;font-size:13px;color:var(--accent)} .dback .i{width:11px;height:11px} @media (hover:hover){.dback:hover{background:var(--raise)}} .dtitle{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 18px} @@ -825,7 +825,7 @@ body.scan-this .fhead [data-a=scan] .i,body.scan-any .fhead [data-a=scanall] .i, here reads it beside it, then what it has published lately. */ .show{display:flex;gap:22px;align-items:flex-end;margin-top:4px} .show>.art{width:180px;height:180px;font-size:48px;border-radius:12px;box-shadow:var(--shadow)} -.show .meta{min-width:0;flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:5px} +.show .meta{min-width:0;flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:4px} .show h2{margin:0 0 2px;font-size:30px;line-height:1.15;font-weight:700;letter-spacing:-.02em;overflow-wrap:anywhere} .show .sub{margin:0;color:var(--dim);font-size:13px;font-variant-numeric:tabular-nums} .show .dfail{color:var(--bad)} @@ -843,7 +843,7 @@ body.scan-this .fhead [data-a=scan] .i,body.scan-any .fhead [data-a=scanall] .i, .lep b a{color:var(--fg);text-decoration:none} @media (hover:hover){.lep b a:hover{color:var(--accent)}} .lep p{margin:4px 0 0;color:var(--dim);font-size:13px;line-height:1.5;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden} -.lep small{display:flex;align-items:center;gap:7px;margin-top:6px;color:var(--faint);font-size:12px;font-variant-numeric:tabular-nums} +.lep small{display:flex;align-items:center;gap:6px;margin-top:6px;color:var(--faint);font-size:12px;font-variant-numeric:tabular-nums} /* Outlined, not filled: on --raise the warning and error colours fell short of AA in most light themes, where on the row's own ground they clear it. */ .tag{ @@ -956,7 +956,7 @@ body.scan-this .fhead [data-a=scan] .i,body.scan-any .fhead [data-a=scanall] .i, .fhead .sub{color:var(--dim);font-size:13px;margin-bottom:8px} .fhead .sub a{color:var(--dim);text-decoration:none} @media (hover:hover){.fhead .sub a:hover{color:var(--accent)}} -.acts{display:flex;gap:7px;align-items:center;margin-top:auto} +.acts{display:flex;gap:6px;align-items:center;margin-top:auto} .acts .btn{display:inline-flex;align-items:center;gap:6px;padding:7px 13px;border-radius:999px} .acts .btn i{font-style:normal;font-size:13px;line-height:1;opacity:.7} @media (hover:hover){.acts .btn:hover{background:var(--raise)}} @@ -1123,7 +1123,7 @@ body.playing .eq i:nth-child(3){animation-delay:-.6s} @media (hover:hover){.ep .st:hover,.ep .fl:hover{background:var(--raise)}} .ep .t{font-weight:600;font-size:13.5px;display:block;width:100%;padding:0;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .ep.read .t{color:var(--dim);font-weight:500} -.ep .line{display:flex;gap:9px;align-items:center;flex-wrap:wrap;color:var(--faint);font-size:11.5px} +.ep .line{display:flex;gap:8px;align-items:center;flex-wrap:wrap;color:var(--faint);font-size:11.5px} .ep .line:empty{display:none} /* A phone's marks for what the row's buttons say elsewhere (#484). */ .ep .udot,.ep .pinmark,.ep .pinmark+.dot{display:none} @@ -1173,14 +1173,14 @@ body.has-video #audio{ #pnow .eq{color:var(--accent2);margin-right:6px} #pnow small{color:var(--faint);font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block} #pmid{display:flex;flex-direction:column;gap:3px;min-width:0} -#pbtns{display:flex;gap:5px;align-items:center;justify-content:center} +#pbtns{display:flex;gap:4px;align-items:center;justify-content:center} #pbtns .iconbtn{width:34px;height:34px} #pplay{ width:40px!important;height:40px!important;background:var(--fg);color:var(--bg); border-radius:50%; } @media (hover:hover){#pplay:hover{background:var(--accent);color:var(--ink)}} -#seekrow{display:flex;gap:9px;align-items:center;font-variant-numeric:tabular-nums;font-size:11.5px;color:var(--faint)} +#seekrow{display:flex;gap:8px;align-items:center;font-variant-numeric:tabular-nums;font-size:11.5px;color:var(--faint)} input[type=range]{ -webkit-appearance:none;appearance:none;height:4px;border-radius:3px;flex:1; background:var(--raise);cursor:pointer; @@ -1215,7 +1215,7 @@ dialog.ask p{margin:0;line-height:1.45} background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:10px 12px; height:min(60vh,520px);overflow:auto;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; } -#logbox .l{display:flex;gap:9px;white-space:pre-wrap;overflow-wrap:anywhere} +#logbox .l{display:flex;gap:8px;white-space:pre-wrap;overflow-wrap:anywhere} #logbox time{color:var(--faint);flex:none} #logbox .lv{flex:none;width:42px;font-weight:700} #logbox .lv.ERROR{color:var(--bad)} #logbox .lv.WARN{color:var(--warn)} @@ -1546,7 +1546,7 @@ body:has(#player.on) #status{padding-bottom:3px} .iconbtn{width:40px;height:40px;border-radius:999px;background:var(--panel2)} .tgroup{border-radius:999px} .tgroup button+button,.tgroup button+a{border-left-color:var(--edge)} - .tgroup button,.tgroup a{min-width:36px;height:40px;padding:0 8px} + .tgroup button,.tgroup a{min-width:40px;height:40px;padding:0 8px} /* Text boxes filled, and at 16px or more: Safari zooms the page in on one any smaller. */ input[type=search],input[type=text],input[type=password],input[type=number],select{ @@ -1569,7 +1569,7 @@ body:has(#player.on) #status{padding-bottom:3px} /* Tabs as a segmented control: equal segments on one track, the chosen one lifted. */ .tabs{flex:1 1 100%;border-radius:10px;padding:2px} - .tabs button,.tabs a{flex:1;text-align:center;padding:7px 4px;border-radius:8px;font-size:14px} + .tabs button,.tabs a{flex:1;text-align:center;padding:7px 4px;border-radius:8px;font-size:14px;min-height:40px} .tabs button.on,.tabs a.on{box-shadow:0 1px 3px rgba(0,0,0,.22)} /* Seasons keep their own widths, scrolling past the edge, rather than squeezing eight into 390px. */ .seasonrow{flex:1 1 100%} diff --git a/web/src/items.ts b/web/src/items.ts index ade86a6..37d5f12 100644 --- a/web/src/items.ts +++ b/web/src/items.ts @@ -195,7 +195,7 @@ function epEl(e: Entry){ + e.flagged?'Unpin':'Pin, so it is never deleted'}" aria-label="${e.flagged?'Unpin':'Pin, so it is never deleted'}">${e.flagged?ICON.pinOn:ICON.pin}
${[ @@ -224,7 +224,7 @@ function epEl(e: Entry){ ${enc&&playsKind(enc)?queueButton(e):''} ${playable?``: (enc&&!has?``:'')} + enc.state==='skipped'?kindOf(enc):'file'}" aria-label="Download this ${enc.state==='skipped'?kindOf(enc):'file'}">${ICON.download}`:'')} ${has?``:''}
`; el.onclick=()=>selectEntry(e);