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.

## 2023-10-27 - 파일 μ—…λ‘œλ“œ λ²„νŠΌ μ ‘κ·Όμ„± κ°œμ„ 
**Learning:** `aria-hidden="true"`λŠ” 파일 μž…λ ₯ μš”μ†Œλ₯Ό μ ‘κ·Όμ„± νŠΈλ¦¬μ—μ„œ μ œκ±°ν•˜μ—¬ 슀크린 λ¦¬λ”μ—μ„œ μ½νžˆμ§€ μ•Šλ„λ‘ ν•©λ‹ˆλ‹€. λ„€μ΄ν‹°λΈŒ input[type="file"]을 μ»€μŠ€ν…€ λ²„νŠΌμœΌλ‘œ ꡐ체할 λ•Œ, λ„€μ΄ν‹°λΈŒ μš”μ†Œλ₯Ό μ™„μ „νžˆ 숨기고 μ»€μŠ€ν…€ λ²„νŠΌμ΄ 포컀슀λ₯Ό 받도둝 보μž₯ν•΄μ•Ό ν•©λ‹ˆλ‹€.
**Action:** μ ‘κ·Όμ„± κ°œμ„ μ„ μœ„ν•΄ λ„€μ΄ν‹°λΈŒ μš”μ†Œμ— `aria-hidden="true"`, `tabindex="-1"`, `class="sr-only"`λ₯Ό μ μš©ν•˜κ³  이λ₯Ό νŠΈλ¦¬κ±°ν•˜λŠ” ν”„λ‘μ‹œ λ²„νŠΌμ„ μ‚¬μš©ν•©λ‹ˆλ‹€.
6 changes: 5 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-hidden="true" tabindex="-1" class="sr-only">
<button type="button" id="file-proxy" class="primary-action" aria-label="Upload findings file" 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,9 @@ <h1>Dashboard</h1>
}

const fileInput = document.getElementById('file');
const fileProxy = document.getElementById('file-proxy');
fileProxy.addEventListener('click', () => fileInput.click());

fileInput.addEventListener('change', () => {
const selectedFile = fileInput.files?.[0];
fileInput.value = '';
Expand Down
17 changes: 17 additions & 0 deletions tests/test_dashboard_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,20 @@ 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():
"""File upload must use an accessible proxy button instead of native file input."""
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 and '<input type="file" id="file"' in html
assert '<button type="button" id="file-proxy"' in html and 'class="primary-action"' in html
assert "fileProxy.addEventListener('click', () => fileInput.click())" in html


def test_file_upload_proxy_accessibility_contract_is_documented_accurately():
"""UX accessibility learnings must be properly documented in the journal."""
import pathlib
journal_path = pathlib.Path(__file__).parent.parent / ".jules" / "palette.md"
if journal_path.exists():
journal_text = journal_path.read_text(encoding="utf-8")
assert '`aria-hidden="true"`λŠ” 파일 μž…λ ₯ μš”μ†Œλ₯Ό μ ‘κ·Όμ„± νŠΈλ¦¬μ—μ„œ 제거' in journal_text
Loading