Skip to content
Open
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>` μš”μ†Œλ₯Ό μ‚¬μš©ν•˜μ—¬, λΈŒλΌμš°μ €κ°€ 일반 ν…μŠ€νŠΈλ‘œ μΈμ‹ν•˜κ³  λ²ˆμ—­ν•  수 μžˆλ„λ‘ ν•˜μ—¬ λ‹€κ΅­μ–΄ μ ‘κ·Όμ„± ν˜Έν™˜μ„±μ„ ν™•λ³΄ν•˜μ‹­μ‹œμ˜€.

## 2024-08-18 - λ‹€κ΅­μ–΄ μ–‘λ°©ν–₯(BiDi) ν…μŠ€νŠΈλ₯Ό μœ„ν•œ λ°©ν–₯ 속성 μΆ”κ°€
**ν•™μŠ΅:** μ•„λžμ–΄(Arabic)λ‚˜ νžˆλΈŒλ¦¬μ–΄(Hebrew) 같은 Right-to-Left(RTL) ν…μŠ€νŠΈκ°€ ν¬ν•¨λœ λ””λ ‰ν† λ¦¬λ‚˜ 파일 이름이 κΈ°λ³Έ Left-to-Right(LTR) λ ˆμ΄μ•„μ›ƒμ—μ„œ λ Œλ”λ§λ  λ•Œ, ν…μŠ€νŠΈ λ°©ν–₯이 μ˜¬λ°”λ₯΄κ²Œ ν‘œμ‹œλ˜μ§€ μ•Šμ•„ 가독성이 λ–¨μ–΄μ§€λŠ” λ¬Έμ œκ°€ λ°œμƒν•  수 μžˆμŠ΅λ‹ˆλ‹€.
**쑰치:** μƒμ„±λœ HTML의 νŠΉμ • ν…μŠ€νŠΈλ₯Ό ν¬ν•¨ν•˜λŠ” μš”μ†Œ(예: `<h1>` 및 파일 이름을 ν‘œμ‹œν•˜λŠ” `<span>`)에 `dir="auto"` 속성을 μΆ”κ°€ν•˜μ—¬, λΈŒλΌμš°μ €κ°€ ν•΄λ‹Ή μš”μ†Œμ˜ λ‚΄μš©μ„ λΆ„μ„ν•˜κ³  μ μ ˆν•œ ν…μŠ€νŠΈ λ°©ν–₯(LTR λ˜λŠ” RTL)을 λ™μ μœΌλ‘œ μ μš©ν•˜λ„λ‘ ν•˜μ‹­μ‹œμ˜€.
4 changes: 2 additions & 2 deletions src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ fun process_dir(curr_dir: File, excludeSet: Set<String>? = null, dirFiles: Array
</head>
<body>
<main>
<h1>${directoryName.escapeHtml()}</h1>
<h1 dir="auto">${directoryName.escapeHtml()}</h1>
<nav aria-label="디렉토리 λͺ©λ‘">
<ul role="list">
<li><a class="dir-link" href="./.." title="μƒμœ„ λ””λ ‰ν† λ¦¬λ‘œ 이동"><span class="icon" aria-hidden="true">&#x21B0;</span> <span aria-hidden="true">..</span> <span class="visually-hidden">μƒμœ„ λ””λ ‰ν† λ¦¬λ‘œ 이동</span></a></li>
Expand Down Expand Up @@ -460,7 +460,7 @@ fun process_dir(curr_dir: File, excludeSet: Set<String>? = null, dirFiles: Array
val ariaLabel = "${fileName} ${if (isLinkedDirectory) { "디렉토리" } else { "파일" }}".escapeHtml()
val typeLabel = if (isLinkedDirectory) { "디렉토리" } else { "파일" }
val icon = if (isLinkedDirectory) { "&#128193;" } else { "&#128196;" }
l.append(""" <li><a class="dir-link" href="${encodedHref}" title="${ariaLabel}"><span class="icon" aria-hidden="true">${icon}</span> <span>${fileName.escapeHtml()}</span> <span class="visually-hidden">${typeLabel}</span></a></li>""")
l.append(""" <li><a class="dir-link" href="${encodedHref}" title="${ariaLabel}"><span class="icon" aria-hidden="true">${icon}</span> <span dir="auto">${fileName.escapeHtml()}</span> <span class="visually-hidden">${typeLabel}</span></a></li>""")
Comment thread
seonghobae marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ” Filename direction lacks regression coverage

The final test suite checks dir="auto" on headings only. A later filename-template regression can pass without detecting broken BiDi rendering.

Devin Review

Was this helpful? React with πŸ‘ or πŸ‘Ž to provide feedback.

l.append('\n')
}
}
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 @@ -943,7 +943,7 @@ class MainTest {
assertTrue(indexHtml.exists())
val content = indexHtml.readText()
assertTrue(content.contains("<title>Root - 디렉토리 λͺ©λ‘</title>"))
assertTrue(content.contains("<h1>Root</h1>"))
assertTrue(content.contains("<h1 dir=\"auto\">Root</h1>"))
}

}
Loading