Skip to content
Closed
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 @@ -81,3 +81,7 @@
## 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.

## 2024-10-07 - File Upload Proxy Accessibility
**Learning:** `aria-hidden="true"`๋Š” ํŒŒ์ผ ์ž…๋ ฅ ์š”์†Œ๋ฅผ ์ ‘๊ทผ์„ฑ ํŠธ๋ฆฌ์—์„œ ์ œ๊ฑฐ
**Action:** ๊ธฐ๋ณธ ํŒŒ์ผ ์ž…๋ ฅ ์š”์†Œ(input[type="file"])๋ฅผ ํ”„๋ก์‹œ ๋ฒ„ํŠผ์œผ๋กœ ๋Œ€์ฒดํ•  ๋•Œ ์ ‘๊ทผ์„ฑ ํŠธ๋ฆฌ๋ฅผ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๊ด€๋ฆฌํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
7 changes: 6 additions & 1 deletion scanner/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
<span class="logo"></span><span class="brand">AppGuardrail</span>
<span class="spacer"></span>
<span class="meta" id="src">no findings loaded</span>
<input type="file" id="file" accept="application/json,.json" aria-label="Upload findings file" style="margin-left:12px">
<input type="file" id="file" accept="application/json,.json" aria-label="Upload findings file" style="margin-left:12px" aria-hidden="true" class="sr-only" tabindex="-1">
<button type="button" id="header-browse-findings" class="primary-action" style="margin-left:12px">Upload findings</button>
</header>
<p id="findings-summary" class="sr-only" role="status" aria-live="polite" aria-atomic="true"></p>
<main id="app" tabindex="-1"></main>
Expand Down Expand Up @@ -325,6 +326,10 @@ <h1>Dashboard</h1>
}

const fileInput = document.getElementById('file');
const headerBrowseFindings = document.getElementById('header-browse-findings');
if (headerBrowseFindings) {
headerBrowseFindings.addEventListener('click', () => fileInput.click());
}
fileInput.addEventListener('change', () => {
const selectedFile = fileInput.files?.[0];
fileInput.value = '';
Expand Down
20 changes: 20 additions & 0 deletions tests/test_dashboard_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,23 @@ def test_dashboard_search_escape_clears_input():
assert "e.key === 'Escape'" in html
assert "query = '';" in html
assert "render();" in html

def test_file_upload_proxy_accessibility_contract_is_documented_accurately() -> None:
"""Ensure the learning about aria-hidden is accurately documented in the journal."""
from pathlib import Path
import pytest
journal_path = Path('.jules/palette.md')
if not journal_path.exists():
pytest.skip("Journal file not found.")
content = journal_path.read_text(encoding='utf-8')
assert '`aria-hidden="true"`๋Š” ํŒŒ์ผ ์ž…๋ ฅ ์š”์†Œ๋ฅผ ์ ‘๊ทผ์„ฑ ํŠธ๋ฆฌ์—์„œ ์ œ๊ฑฐ' in content

def test_file_upload_proxy_structure_meets_accessibility_constraints() -> None:
"""Ensure the proxy button and hidden file input meet structural a11y constraints."""
html = dashboard_index_path().read_text(encoding="utf-8")

assert 'aria-hidden="true"' in html
assert 'class="sr-only"' in html
assert 'tabindex="-1"' in html
assert 'id="header-browse-findings"' in html
assert "headerBrowseFindings.addEventListener('click', () => fileInput.click())" in html
Loading