fix: final-review findings — own-lead descriptions, PHS integration landing, planned tiles, 404, sitemap math, cleanups
This commit is contained in:
@@ -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 |
Reference in New Issue
Block a user