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
3 changes: 3 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@
## 2026-08-12 - Skip to Content Accessibility
**Learning:** Screen reader and keyboard-only users experience significant friction when forced to navigate through repetitive header controls on every page load.
**Action:** Keep a visible-on-focus skip link as the first interactive element, target a programmatically focusable main container, and give the focused link a high-contrast outline.
## 2026-10-09 - Accessible Close Buttons
**Learning:** For icon-only buttons that trigger actions with keyboard shortcuts, adding `title="Close (Esc)"` alongside `aria-keyshortcuts="Escape"` and `aria-label` provides a visual tooltip for mouse users revealing the shortcut, improving both accessibility and UX, satisfying both screen reader accessibility and test contracts.
**Action:** Always ensure keyboard shortcuts exposed via visual tooltips also include the programmatic `aria-keyshortcuts` attribute.
4 changes: 2 additions & 2 deletions scanner/dashboard/console.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ <h1>AppGuardrail Console</h1>
const rows=(s.findings||[]).map(f=>`<tr><td><span class="pill" style="background:${SEV[f.severity]||'var(--info)'}">${esc(f.severity)}</span></td>
<td><code>${esc(f.rule_id)}</code></td><td>${esc((f.message||"").split("\n")[0].slice(0,120))}</td>
<td><code>${esc(f.file)}:${esc(f.line)}</code></td></tr>`).join("");
d.innerHTML=`<button type="button" class="close-btn" aria-label="Close details">โœ•</button><strong>Scan #${esc(s.id)}</strong> <span class="muted">${esc(s.created_at)} ยท ${esc(s.repo||"โ€”")}</span>
d.innerHTML=`<button type="button" class="close-btn" aria-label="Close details" title="Close (Esc)" aria-keyshortcuts="Escape">โœ•</button><strong>Scan #${esc(s.id)}</strong> <span class="muted">${esc(s.created_at)} ยท ${esc(s.repo||"โ€”")}</span>
<table style="margin-top:8px"><thead><tr><th scope="col">Severity</th><th scope="col">Rule</th><th scope="col">Finding</th><th scope="col">Location</th></tr></thead>
<tbody>${rows||'<tr><td colspan="4" class="muted">No findings.</td></tr>'}</tbody></table>`;
d.querySelector(".close-btn").addEventListener("click",closeDetail);
scrollDetailIntoView(d);
d.focus({preventScroll:true});
}catch(e){
if(requestId!==currentDetailRequest)return;
d.innerHTML='<button type="button" class="close-btn" aria-label="Close details">โœ•</button><div role="alert" class="err">Error loading details: '+esc(e.message)+'</div>';
d.innerHTML='<button type="button" class="close-btn" aria-label="Close details" title="Close (Esc)" aria-keyshortcuts="Escape">โœ•</button><div role="alert" class="err">Error loading details: '+esc(e.message)+'</div>';
d.querySelector(".close-btn").addEventListener("click",closeDetail);
scrollDetailIntoView(d);
d.focus({preventScroll:true});
Expand Down
2 changes: 1 addition & 1 deletion scanner/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ <h1>Dashboard</h1>
<div class="dlg-head">
<span class="chip" style="background:${SEV[s]?SEV[s].color:'var(--info)'}">${esc(s)}</span>
<span class="t" id="dlg-title">${esc(f.rule_id)}</span>
<button aria-label="Close" title="Close (Esc)" onclick="document.getElementById('detail').close()">โœ•</button>
<button aria-label="Close" title="Close (Esc)" aria-keyshortcuts="Escape" onclick="document.getElementById('detail').close()">โœ•</button>
</div>
<div class="dlg-body">
<p class="file">${esc(f.file)}:${esc(f.line)} ยท ${esc(f.category)} ยท context: ${esc(f.context||'app-code')}${isDeployBlocking(f)?' ยท <span class="tag block">deploy-blocking</span>':''}</p>
Expand Down
Loading