Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -73,3 +73,7 @@
## 2026-08-17 - 브라우저 번역과 화면 판독기의 호환성을 위한 텍스트 처리
**Learning:** `aria-label` 속성으로 지정된 화면 판독기용 대체 텍스트는 Chrome Translate 등 브라우저 번역 도구에 의해 번역되지 않는 경우가 많습니다. 이로 인해 문서 언어가 변환되어도 스크린 리더에서는 원본 언어(예: 영어)로 읽혀 다국어 접근성이 저하됩니다.
**Action:** 화면 판독기를 위한 숨겨진 설명 텍스트를 제공할 때 `aria-label` 대신 CSS `.visually-hidden` 클래스를 적용한 `<span>` 요소를 사용하여, 브라우저가 일반 텍스트로 인식하고 번역할 수 있도록 하여 다국어 접근성 호환성을 확보하십시오.

## 2026-09-01 - 정적 요소에 대한 ARIA 실시간 영역(role="status") 오남용 제거
**Learning:** 빈 디렉토리 메시지와 같이 초기 페이지 로드 시 렌더링되는 정적 요소에 `role="status"`(ARIA live region)를 적용하면 스크린 리더가 페이지를 처음 읽을 때 콘텐츠를 불필요하게 중복해서 읽거나 읽기 흐름을 방해하는 접근성 안티패턴이 발생합니다.
**Action:** 동적으로 업데이트되는 콘텐츠(예: 비동기 작업 결과 알림)가 아닌 이상, 초기 렌더링되는 정적 메시지에는 `role="status"`와 같은 실시간 알림 속성을 추가하지 마십시오.
2 changes: 1 addition & 1 deletion src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ fun process_dir(curr_dir: File, excludeSet: Set<String>? = null, dirFiles: Array
}

if(l.isEmpty()){
l.append(""" <li><div class="empty-dir" role="status"><span class="icon" aria-hidden="true">&#128194;</span> <span>이 디렉토리는 비어 있습니다.</span></div></li>""")
l.append(""" <li><div class="empty-dir"><span class="icon" aria-hidden="true">&#128194;</span> <span>이 디렉토리는 비어 있습니다.</span></div></li>""")
l.append('\n')
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/html4tree/GeneratedIndexReadabilityTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class GeneratedIndexReadabilityTest {

val generatedHtml = generatedHtml()
val expectedEmptyRow =
"""<li><div class="empty-dir" role="status"><span class="icon" aria-hidden="true">&#128194;</span> <span>이 디렉토리는 비어 있습니다.</span></div></li>"""
"""<li><div class="empty-dir"><span class="icon" aria-hidden="true">&#128194;</span> <span>이 디렉토리는 비어 있습니다.</span></div></li>"""

assertTrue(generatedHtml.contains(expectedEmptyRow))
assertTrue(generatedHtml.indexOf(expectedEmptyRow) == generatedHtml.lastIndexOf(expectedEmptyRow))
Expand Down
1 change: 0 additions & 1 deletion src/test/kotlin/html4tree/MainTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class MainTest {
assertTrue(htmlContent.contains("<html lang=\"ko\">"))
assertRobotsDirective(htmlContent)
assertTrue(htmlContent.contains("이 디렉토리는 비어 있습니다."))
assertTrue(htmlContent.contains("role=\"status\""))
assertTrue(htmlContent.contains("role=\"list\""))
assertTrue(htmlContent.contains("&#128194;"))
}
Expand Down
Loading