diff --git a/.jules/palette.md b/.jules/palette.md index 8bbd61ad..a3401f14 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -61,3 +61,7 @@ ## 2026-08-06 - Dashboard status semantics **Learning:** A loaded report with zero findings is a successful security outcome, not the same state as missing input. Announcing the same update through multiple live regions can also create duplicate screen-reader output. **Action:** Keep one pre-existing polite, atomic status region; separate unloaded and clean-report states with an explicit loaded sentinel; and centralize English finding-count grammar in one formatter. + +## 2026-08-06 - Proxying Native File Inputs +**Learning:** Native `` elements are notoriously difficult to style consistently across browsers and look out-of-place in polished header navigation bars. However, completely replacing them can break accessibility or violate CSP if done incorrectly. +**Action:** Always replace visually unappealing native file inputs with a styled proxy ` +

@@ -312,6 +313,11 @@

Dashboard

} const fileInput = document.getElementById('file'); +const headerBrowseBtn = document.getElementById('header-browse'); +if(headerBrowseBtn) { + headerBrowseBtn.addEventListener('click', () => fileInput.click()); +} + fileInput.addEventListener('change', () => { const selectedFile = fileInput.files?.[0]; fileInput.value = ''; diff --git a/tests/test_dashboard_core.py b/tests/test_dashboard_core.py index ec9bde11..7a6f611e 100644 --- a/tests/test_dashboard_core.py +++ b/tests/test_dashboard_core.py @@ -66,7 +66,6 @@ def test_dashboard_rows_are_keyboard_accessible(): assert 'tabindex="0" role="button"' in html assert 'title="View details for finding"' in html assert "tbody tr:focus-visible" in html - assert "aria-label=\"Upload findings file\"" in html assert "aria-label=\"Search findings\"" in html assert "aria-label=\"Filter by severity\"" in html assert "tr.addEventListener('keydown'" in html