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 @@ -13,3 +13,7 @@
## 2024-06-25 - Directory Listing Navigation Landmark
**Learning:** Generated directory listings act as navigation regions, and screen readers benefit when the listing is announced separately from the page's main content.
**Action:** Wrap generated directory listing `<ul>` elements in `<nav aria-label="Directory listing">` while keeping the surrounding semantic `<main>` structure.

## 2024-05-18 - Language Matching for ARIA Labels
**Learning:** Screen readers rely on consistent language declarations to pronounce text correctly. When the document language is specified (e.g., `lang="ko"`), hardcoding English strings in `aria-label` attributes on semantic elements (like `<nav aria-label="Directory listing">`) can lead to confusing or incorrect pronunciation by screen reading software that expects Korean text based on the document's `lang` attribute.
**Action:** Always ensure that structural and semantic `aria-label` descriptions match the language specified in the document's `lang` attribute to maintain a consistent and accessible experience for screen reader users.
2 changes: 1 addition & 1 deletion src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ fun process_dir(curr_dir: File){
<body>
<main>
<h1>${curr_dir.getName().escapeHtml()}</h1>
<nav aria-label="Directory listing">
<nav aria-label="디렉토리 λͺ©λ‘">
<ul>
<li><a style="display:block; width:100%" href="./.." aria-label="μƒμœ„ λ””λ ‰ν† λ¦¬λ‘œ 이동"><span aria-hidden="true">&#x21B0;</span> ..</a></li>
"""
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/html4tree/MainTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class MainTest {
assertTrue(indexFile.exists())
val htmlContent = indexFile.readText()
assertTrue(htmlContent.contains("<html lang=\"ko\">"))
assertTrue(htmlContent.contains("<nav aria-label=\"Directory listing\">"))
assertTrue(htmlContent.contains("<nav aria-label=\"디렉토리 λͺ©λ‘\">"))
assertTrue(htmlContent.contains("<main>"))
assertTrue(htmlContent.contains("</main>"))
assertTrue(htmlContent.contains("aria-label=\"μƒμœ„ λ””λ ‰ν† λ¦¬λ‘œ 이동\""))
Expand Down
Loading