Skip to content
Draft
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 @@ -73,3 +73,7 @@
## 2026-08-17 - λΈŒλΌμš°μ € λ²ˆμ—­κ³Ό ν™”λ©΄ νŒλ…κΈ°μ˜ ν˜Έν™˜μ„±μ„ μœ„ν•œ ν…μŠ€νŠΈ 처리
**Learning:** `aria-label` μ†μ„±μœΌλ‘œ μ§€μ •λœ ν™”λ©΄ νŒλ…κΈ°μš© λŒ€μ²΄ ν…μŠ€νŠΈλŠ” Chrome Translate λ“± λΈŒλΌμš°μ € λ²ˆμ—­ 도ꡬ에 μ˜ν•΄ λ²ˆμ—­λ˜μ§€ μ•ŠλŠ” κ²½μš°κ°€ λ§ŽμŠ΅λ‹ˆλ‹€. 이둜 인해 λ¬Έμ„œ μ–Έμ–΄κ°€ λ³€ν™˜λ˜μ–΄λ„ 슀크린 λ¦¬λ”μ—μ„œλŠ” 원본 μ–Έμ–΄(예: μ˜μ–΄)둜 μ½ν˜€ λ‹€κ΅­μ–΄ 접근성이 μ €ν•˜λ©λ‹ˆλ‹€.
**Action:** ν™”λ©΄ νŒλ…κΈ°λ₯Ό μœ„ν•œ μˆ¨κ²¨μ§„ μ„€λͺ… ν…μŠ€νŠΈλ₯Ό μ œκ³΅ν•  λ•Œ `aria-label` λŒ€μ‹  CSS `.visually-hidden` 클래슀λ₯Ό μ μš©ν•œ `<span>` μš”μ†Œλ₯Ό μ‚¬μš©ν•˜μ—¬, λΈŒλΌμš°μ €κ°€ 일반 ν…μŠ€νŠΈλ‘œ μΈμ‹ν•˜κ³  λ²ˆμ—­ν•  수 μžˆλ„λ‘ ν•˜μ—¬ λ‹€κ΅­μ–΄ μ ‘κ·Όμ„± ν˜Έν™˜μ„±μ„ ν™•λ³΄ν•˜μ‹­μ‹œμ˜€.

## 2024-09-26 - μ—”νŠΈλ¦¬ μ‹œκ°μ  밑쀄 문제 μˆ˜μ •
**Learning:** `a:hover span:last-child`와 같은 ꡬ쑰적 μ„ νƒμžλ₯Ό μ‚¬μš©ν•  λ•Œ λ§ˆν¬μ—… ꡬ쑰가 λ³€κ²½λ˜μ–΄ λ§ˆμ§€λ§‰ μš”μ†Œκ°€ `span`이 μ•„λ‹Œ 경우 (예: 슀크린 λ¦¬λ”μš© `.visually-hidden` μš”μ†Œκ°€ μΆ”κ°€λ˜μ—ˆμ„ λ•Œ) μ›ν•˜λŠ” ν…μŠ€νŠΈ μš”μ†Œ(μ—”νŠΈλ¦¬ 이름)에 밑쀄 λ“±μ˜ μ‹œκ°μ  μŠ€νƒ€μΌλ§μ΄ μ˜¬λ°”λ₯΄κ²Œ μ μš©λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μ΄λŠ” μ‚¬μš©μžμ˜ μ‹œκ°μ  ν˜Έλ²„ ν”Όλ“œλ°±μ„ μ €ν•˜μ‹œν‚΅λ‹ˆλ‹€.
**Action:** ꡬ쑰적 가상 클래슀(pseudo-class) λŒ€μ‹  λͺ…μ‹œμ μΈ μ‹œλ§¨ν‹± 클래슀(`.entry-label`)λ₯Ό μΆ”κ°€ν•˜μ—¬, μŠ€νƒ€μΌλ§μ΄ DOM ꡬ쑰의 변화에 영ν–₯을 λ°›μ§€ μ•Šκ³  μ•ˆμ •μ μœΌλ‘œ μœ μ§€λ˜λ„λ‘ ν•΄μ•Ό ν•©λ‹ˆλ‹€. μƒμœ„ 디렉토리 링크(`..`) 및 ν•˜μœ„ 파일/디렉토리 링크의 ν…μŠ€νŠΈμ— `.entry-label` 클래슀λ₯Ό μ μš©ν–ˆμŠ΅λ‹ˆλ‹€.
6 changes: 3 additions & 3 deletions src/main/kotlin/html4tree/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ a:hover, a:focus-visible {
outline: 2px solid #0969da;
outline-offset: -2px;
}
a:hover span:last-child, a:focus-visible span:last-child {
a:hover .entry-label, a:focus-visible .entry-label {
text-decoration: underline;
}
@media (prefers-reduced-motion: reduce) {
Expand Down Expand Up @@ -429,7 +429,7 @@ fun process_dir(curr_dir: File, excludeSet: Set<String>? = null, dirFiles: Array
<h1>${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>
<li><a class="dir-link" href="./.." title="μƒμœ„ λ””λ ‰ν† λ¦¬λ‘œ 이동"><span class="icon" aria-hidden="true">&#x21B0;</span> <span class="entry-label" aria-hidden="true">..</span> <span class="visually-hidden">μƒμœ„ λ””λ ‰ν† λ¦¬λ‘œ 이동</span></a></li>
"""

val index_middle = fun():String{
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 class="entry-label">${fileName.escapeHtml()}</span> <span class="visually-hidden">${typeLabel}</span></a></li>""")
l.append('\n')
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/kotlin/html4tree/GeneratedIndexReadabilityTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class GeneratedIndexReadabilityTest {
)

val generatedHtml = generatedHtml()
val parentIndex = generatedHtml.indexOf("<span aria-hidden=\"true\">..</span>")
val parentIndex = generatedHtml.indexOf("<span class=\"entry-label\" aria-hidden=\"true\">..</span>")
val firstIndex = generatedHtml.indexOf("alpha.txt")
val middleIndex = generatedHtml.indexOf("middle.txt")
val lastIndex = generatedHtml.indexOf("zulu.txt")
Expand Down Expand Up @@ -147,7 +147,7 @@ class GeneratedIndexReadabilityTest {
assertTrue(
style.contains(
"""
a:hover span:last-child, a:focus-visible span:last-child {
a:hover .entry-label, a:focus-visible .entry-label {
text-decoration: underline;
}
""".trimIndent()
Expand Down
Loading