fix: final-review findings — own-lead descriptions, PHS integration landing, planned tiles, 404, sitemap math, cleanups

This commit is contained in:
ctao
2026-07-25 13:13:27 +02:00
parent ffe54bc766
commit 3362b214c3
36 changed files with 107 additions and 75 deletions
+13
View File
@@ -54,6 +54,17 @@
li.append(a);
return li;
}
// Dropdowns close with a "Press Enter for all results" row — a real list
// element (was a CSS ::after), aria-hidden like the group labels so
// screen-reader exposure stays consistent (the status line announces).
function hint() {
if (!opts.dismiss || !list.firstChild) return;
const li = document.createElement('li');
li.className = 'suggest-hint';
li.setAttribute('aria-hidden', 'true');
li.textContent = 'Press Enter for all results';
list.append(li);
}
// Focused-empty state: up to 4 recent queries, topped up to 5 rows with
// the newest articles from the same index.
async function idle() {
@@ -74,6 +85,7 @@
li.append(small);
list.append(li);
}
hint();
status.textContent = opts.hint || (r.length ? 'Showing recent searches and latest news' : 'Showing latest news');
}
async function run() {
@@ -95,6 +107,7 @@
li.append(small);
list.append(li);
}
hint();
}
input.addEventListener('input', () => { clearTimeout(timer); timer = setTimeout(run, 150); });
input.addEventListener('focus', () => { if (input.value.trim().length < 2) idle(); });
Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB