Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@
## 2026-05-24 - Consistent Search Empty States
**Learning:** Implementing localized empty states for search/filter views using a shared design component (`.reworking-container`) and `aria-live="polite"` ensures that users receive immediate, accessible feedback when no results match their query, maintaining visual consistency across the application.
**Action:** Always provide a localized empty state with appropriate ARIA live regions for interactive lists that can be filtered to zero results.

## 2026-09-02 - Search Keyboard Escape & ARIA Hint Separation
**Learning:** Appending visual keyboard hints (such as `(/)`) directly to `aria-label` causes screen readers to read shortcut syntax as part of the element's accessible name. Keeping `aria-label` concise (e.g. "Search changelog...") while leaving shortcut hints in `placeholder` preserves screen reader clarity. Additionally, handling `Escape` on search inputs to clear query values before blurring provides a familiar, fluid search experience.
**Action:** Exclude keyboard shortcut hints from `aria-label` and handle `Escape` key events on search inputs to clear non-empty queries prior to blurring focus.
5 changes: 3 additions & 2 deletions assets/js/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ function renderHero(hero, stats) {
function renderFilters(releases) {
const allLabel = window.MKSSiteI18n?.get('filters.all', 'all');
const tags = [allLabel, ...new Set((releases || []).map(item => item.tag).filter(Boolean))];
const searchPlaceholder = (window.MKSSiteI18n?.get('changelog.search', 'Search changelog...') || 'Search changelog...') + ' (/)';
const searchBase = window.MKSSiteI18n?.get('changelog.search', 'Search changelog...') || 'Search changelog...';
const searchPlaceholder = searchBase + ' (/)';

return `
<section class="section change-filter-shell">
<div class="change-filters panel glass" data-change-filters>
<input class="change-search" type="search" placeholder="${escapeHtml(searchPlaceholder)}" aria-label="${escapeHtml(searchPlaceholder)}" data-change-search>
<input class="change-search" type="search" placeholder="${escapeHtml(searchPlaceholder)}" aria-label="${escapeHtml(searchBase)}" data-change-search>
<div class="change-filter-list">
${tags.map((tag, index) => `
<button class="change-filter ${index === 0 ? 'active' : ''}" type="button" data-filter="${escapeHtml(tag)}" aria-pressed="${index === 0 ? 'true' : 'false'}">
Expand Down
8 changes: 8 additions & 0 deletions assets/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@
}

if (e.key === 'Escape' && isInput) {
if (active.matches && active.matches('[data-example-search], [data-change-search], input[type="search"]')) {
if (active.value) {
e.preventDefault();
active.value = '';
active.dispatchEvent(new Event('input', { bubbles: true }));
return;
}
}
active.blur();
}
} catch (err) {}
Expand Down
Loading