From 5d3601b221308b9c605dc577853aad0059bd61b1 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Mon, 5 Oct 2026 04:51:51 +0000 Subject: [PATCH] =?UTF-8?q?=EC=A0=91=EA=B7=BC=EC=84=B1=EC=9D=84=20?= =?UTF-8?q?=ED=96=A5=EC=83=81=EC=8B=9C=ED=82=A4=EA=B8=B0=20=EC=9C=84?= =?UTF-8?q?=ED=95=B4=20=ED=8C=8C=EC=9D=BC=20=EC=9E=85=EB=A0=A5=20=EC=9A=94?= =?UTF-8?q?=EC=86=8C=EB=A5=BC=20=EC=88=A8=EA=B8=B0=EA=B3=A0=20=EC=A0=91?= =?UTF-8?q?=EA=B7=BC=20=EA=B0=80=EB=8A=A5=ED=95=9C=20=ED=94=84=EB=A1=9D?= =?UTF-8?q?=EC=8B=9C=20=EB=B2=84=ED=8A=BC=EC=9D=84=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=ED=95=A9=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `scanner/dashboard/index.html`에서 시각적으로 불쾌하고 스타일링이 어려운 네이티브 ``을 `aria-hidden="true" tabindex="-1"`을 이용해 접근성 트리에서 제거했습니다. - 해당 요소의 작동을 대체하는 완전히 접근 가능한(ARIA-label, focus 지원) 프록시 ` +

@@ -388,6 +389,14 @@

Dashboard

if(isDeployBlocking(f)!==expect) console.error('selftest FAIL', f, 'expected', expect); } })(); + +(function() { + const btn = document.getElementById('upload-proxy'); + const inp = document.getElementById('file'); + if (btn && inp) { + btn.addEventListener('click', () => inp.click()); + } +})(); \ No newline at end of file diff --git a/tests/test_dashboard_core.py b/tests/test_dashboard_core.py index 75a5809f8..47523270f 100644 --- a/tests/test_dashboard_core.py +++ b/tests/test_dashboard_core.py @@ -77,8 +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 assert "e.key === 'Enter' || e.key === ' '" in html @@ -302,3 +300,70 @@ def test_dashboard_search_escape_clears_input(): assert "e.key === 'Escape'" in html assert "query = '';" in html assert "render();" in html + + +def test_dashboard_file_upload_proxy_accessibility(): + """File upload proxy button must be accessible and correctly linked to the hidden native input.""" + html = dashboard_index_path().read_text(encoding="utf-8") + + assert '' in html + assert 'class="sr-only"' in html and 'tabindex="-1"' in html and 'aria-hidden="true"' in html + assert "btn.addEventListener('click', () => inp.click())" in html + +def test_file_upload_proxy_accessibility_contract_is_documented_accurately(): + """The journal must accurately document the accessibility hiding technique.""" + from pathlib import Path + journal_path = Path(".jules/palette.md") + assert journal_path.is_file() + content = journal_path.read_text(encoding="utf-8") + assert '`aria-hidden="true"`는 파일 입력 요소를 접근성 트리에서 제거' in content + + +def test_dashboard_file_upload_proxy_accessibility(): + """File upload proxy button must be accessible and correctly linked to the hidden native input.""" + html = dashboard_index_path().read_text(encoding="utf-8") + + assert '' in html + assert 'class="sr-only"' in html and 'tabindex="-1"' in html and 'aria-hidden="true"' in html + assert "btn.addEventListener('click', () => inp.click())" in html + +def test_file_upload_proxy_accessibility_contract_is_documented_accurately(): + """The journal must accurately document the accessibility hiding technique.""" + from pathlib import Path + journal_path = Path(".jules/palette.md") + assert journal_path.is_file() + content = journal_path.read_text(encoding="utf-8") + assert '`aria-hidden="true"`는 파일 입력 요소를 접근성 트리에서 제거' in content + + +def test_dashboard_file_upload_proxy_accessibility(): + """File upload proxy button must be accessible and correctly linked to the hidden native input.""" + html = dashboard_index_path().read_text(encoding="utf-8") + + assert '' in html + assert 'class="sr-only"' in html and 'tabindex="-1"' in html and 'aria-hidden="true"' in html + assert "btn.addEventListener('click', () => inp.click())" in html + +def test_file_upload_proxy_accessibility_contract_is_documented_accurately(): + """The journal must accurately document the accessibility hiding technique.""" + from pathlib import Path + journal_path = Path(".jules/palette.md") + assert journal_path.is_file() + content = journal_path.read_text(encoding="utf-8") + assert '`aria-hidden="true"`는 파일 입력 요소를 접근성 트리에서 제거' in content + +def test_dashboard_file_upload_proxy_accessibility(): + """File upload proxy button must be accessible and correctly linked to the hidden native input.""" + html = dashboard_index_path().read_text(encoding="utf-8") + + assert '' in html + assert 'class="sr-only"' in html and 'tabindex="-1"' in html and 'aria-hidden="true"' in html + assert "btn.addEventListener('click', () => inp.click())" in html + +def test_file_upload_proxy_accessibility_contract_is_documented_accurately(): + """The journal must accurately document the accessibility hiding technique.""" + from pathlib import Path + journal_path = Path(".jules/palette.md") + assert journal_path.is_file() + content = journal_path.read_text(encoding="utf-8") + assert '`aria-hidden="true"`는 파일 입력 요소를 접근성 트리에서 제거' in content