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-04 - ๋„ค์ดํ‹ฐ๋ธŒ ํŒŒ์ผ ์ž…๋ ฅ(Input File) ์š”์†Œ๋ฅผ ์ ‘๊ทผ์„ฑ ๋†’์€ ํ”„๋ก์‹œ ๋ฒ„ํŠผ์œผ๋กœ ๋Œ€์ฒด
**Learning:** `aria-hidden="true"`๋Š” ํŒŒ์ผ ์ž…๋ ฅ ์š”์†Œ๋ฅผ ์ ‘๊ทผ์„ฑ ํŠธ๋ฆฌ์—์„œ ์ œ๊ฑฐ(explicitly removes from the Accessibility Object Model)ํ•˜๋ฉฐ, ์‹œ๊ฐ์ ์œผ๋กœ ์ˆจ๊ธฐ๊ธฐ ์œ„ํ•ด `class="sr-only" tabindex="-1"`์„ ํ•จ๊ป˜ ์‚ฌ์šฉํ•˜์—ฌ์•ผ ์Šคํฌ๋ฆฐ ๋ฆฌ๋”์™€ ํ‚ค๋ณด๋“œ ์ ‘๊ทผ์„ฑ์„ ์œ ์ง€ํ•˜๋ฉด์„œ ์ปค์Šคํ…€ ๋ฒ„ํŠผ ๋””์ž์ธ์„ ๋…ธ์ถœ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋‹ค๋Š” ์‚ฌ์‹ค์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.
**Action:** ํ–ฅํ›„ ํŒŒ์ผ ์—…๋กœ๋“œ UI๋ฅผ ๊ฐœ์„ ํ•  ๋•Œ๋Š” ์ธ๋ผ์ธ `onclick` ๋Œ€์‹  ๋ช…์‹œ์ ์ธ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ์ด๋ฒคํŠธ ๋ฆฌ์Šค๋„ˆ๋ฅผ ๋ฐ”์ธ๋”ฉํ•˜๊ณ  ์ ‘๊ทผ์„ฑ ์†์„ฑ์„ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
12 changes: 11 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">
<button type="button" id="header-browse-findings" class="primary-action">Upload findings</button>
<input type="file" id="file" class="sr-only" tabindex="-1" aria-hidden="true" accept="application/json,.json">
</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 @@ -388,6 +389,15 @@ <h1>Dashboard</h1>
if(isDeployBlocking(f)!==expect) console.error('selftest FAIL', f, 'expected', expect);
}
})();

(function() {
const headerBrowseFindings = document.getElementById('header-browse-findings');
const fileInput = document.getElementById('file');
if (headerBrowseFindings && fileInput) {
headerBrowseFindings.addEventListener('click', () => fileInput.click());
}
})();

</script>
</body>
</html>
12 changes: 11 additions & 1 deletion tests/test_dashboard_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,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
Expand Down Expand Up @@ -302,3 +301,14 @@ 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():
html = dashboard_index_path().read_text(encoding="utf-8")
assert 'class="sr-only"' in html and 'tabindex="-1"' in html and 'aria-hidden="true"' in html, "Hidden file input missing exact accessibility hiding attributes"
assert "headerBrowseFindings.addEventListener('click', () => fileInput.click())" in html, "Missing exact event listener wiring"

def test_file_upload_proxy_accessibility_contract_is_documented_accurately():
path = dashboard_index_path().parent.parent.parent / ".jules" / "palette.md"
assert path.exists(), "Journal missing"
content = path.read_text(encoding="utf-8")
assert '`aria-hidden="true"`๋Š” ํŒŒ์ผ ์ž…๋ ฅ ์š”์†Œ๋ฅผ ์ ‘๊ทผ์„ฑ ํŠธ๋ฆฌ์—์„œ ์ œ๊ฑฐ' in content, "Missing exact documentation statement"
Loading