From 84c4767ef92baa64c1adb80c34729f5b3c888381 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Wed, 7 Oct 2026 06:43:05 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=8C=8C=EC=9D=BC=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=A0=91=EA=B7=BC=EC=84=B1=20=EB=B0=8F=20UX=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 네이티브 파일 입력 요소를 접근성 트리에서 제거 (aria-hidden="true") - 파일 입력을 위한 스타일이 적용된 프록시 버튼 추가 - .jules/palette.md 저널에 학습 내용 기록 - UI 접근성 구조 테스트 추가 --- .jules/palette.md | 4 ++++ scanner/dashboard/index.html | 7 ++++++- tests/test_dashboard_core.py | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.jules/palette.md b/.jules/palette.md index ea004e2d2..e2b3c25f2 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -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"])를 프록시 버튼으로 대체할 때 접근성 트리를 올바르게 관리해야 합니다. diff --git a/scanner/dashboard/index.html b/scanner/dashboard/index.html index 132bc31b2..34fd4407c 100644 --- a/scanner/dashboard/index.html +++ b/scanner/dashboard/index.html @@ -93,7 +93,8 @@ AppGuardrail no findings loaded - + +

@@ -325,6 +326,10 @@

Dashboard

} 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 = ''; diff --git a/tests/test_dashboard_core.py b/tests/test_dashboard_core.py index 75a5809f8..fcc98912a 100644 --- a/tests/test_dashboard_core.py +++ b/tests/test_dashboard_core.py @@ -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