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 @@ -73,3 +73,7 @@
## 2026-08-17 - ๋ธŒ๋ผ์šฐ์ € ๋ฒˆ์—ญ๊ณผ ํ™”๋ฉด ํŒ๋…๊ธฐ์˜ ํ˜ธํ™˜์„ฑ์„ ์œ„ํ•œ ํ…์ŠคํŠธ ์ฒ˜๋ฆฌ
**Learning:** `aria-label` ์†์„ฑ์œผ๋กœ ์ง€์ •๋œ ํ™”๋ฉด ํŒ๋…๊ธฐ์šฉ ๋Œ€์ฒด ํ…์ŠคํŠธ๋Š” Chrome Translate ๋“ฑ ๋ธŒ๋ผ์šฐ์ € ๋ฒˆ์—ญ ๋„๊ตฌ์— ์˜ํ•ด ๋ฒˆ์—ญ๋˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๊ฐ€ ๋งŽ์Šต๋‹ˆ๋‹ค. ์ด๋กœ ์ธํ•ด ๋ฌธ์„œ ์–ธ์–ด๊ฐ€ ๋ณ€ํ™˜๋˜์–ด๋„ ์Šคํฌ๋ฆฐ ๋ฆฌ๋”์—์„œ๋Š” ์›๋ณธ ์–ธ์–ด(์˜ˆ: ์˜์–ด)๋กœ ์ฝํ˜€ ๋‹ค๊ตญ์–ด ์ ‘๊ทผ์„ฑ์ด ์ €ํ•˜๋ฉ๋‹ˆ๋‹ค.
**Action:** ํ™”๋ฉด ํŒ๋…๊ธฐ๋ฅผ ์œ„ํ•œ ์ˆจ๊ฒจ์ง„ ์„ค๋ช… ํ…์ŠคํŠธ๋ฅผ ์ œ๊ณตํ•  ๋•Œ `aria-label` ๋Œ€์‹  CSS `.visually-hidden` ํด๋ž˜์Šค๋ฅผ ์ ์šฉํ•œ `<span>` ์š”์†Œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ, ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ์ผ๋ฐ˜ ํ…์ŠคํŠธ๋กœ ์ธ์‹ํ•˜๊ณ  ๋ฒˆ์—ญํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜์—ฌ ๋‹ค๊ตญ์–ด ์ ‘๊ทผ์„ฑ ํ˜ธํ™˜์„ฑ์„ ํ™•๋ณดํ•˜์‹ญ์‹œ์˜ค.

## 2024-10-24 - ํŒŒ์ผ ๋ฐ ๋””๋ ‰ํ† ๋ฆฌ ์ด๋ฆ„์˜ ์–‘๋ฐฉํ–ฅ ํ…์ŠคํŠธ(BiDi) ์ง€์› ๊ฐœ์„ 
**ํ•™์Šต:** ์•„๋ž์–ด๋‚˜ ํžˆ๋ธŒ๋ฆฌ์–ด์™€ ๊ฐ™์€ Right-To-Left(RTL) ๋ฌธ์ž๊ฐ€ ํฌํ•จ๋œ ํŒŒ์ผ ๋˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ ์ด๋ฆ„์ด Left-To-Right(LTR) ๋ ˆ์ด์•„์›ƒ ๋‚ด์— ๋ Œ๋”๋ง๋  ๋•Œ, ํ…์ŠคํŠธ ๋ฐฉํ–ฅ์„ฑ์ด ์ง€์ •๋˜์ง€ ์•Š์œผ๋ฉด ๊ตฌ๋‘์ ์ด๋‚˜ ํ™•์žฅ์ž์˜ ์œ„์น˜๊ฐ€ ์ž˜๋ชป ํ‘œ์‹œ๋˜์–ด ๊ฐ€๋…์„ฑ์„ ์‹ฌ๊ฐํ•˜๊ฒŒ ํ•ด์นฉ๋‹ˆ๋‹ค.
**์กฐ์น˜:** ํŒŒ์ผ ์ด๋ฆ„์ด๋‚˜ ๋””๋ ‰ํ† ๋ฆฌ ์ด๋ฆ„๊ณผ ๊ฐ™์ด ์‚ฌ์šฉ์ž ์ œ๊ณต ํ…์ŠคํŠธ๊ฐ€ ๋ Œ๋”๋ง๋˜๋Š” HTML ์š”์†Œ(`<h1>`, `<span>` ๋“ฑ)์— ํ•ญ์ƒ `dir="auto"` ์†์„ฑ์„ ์ถ”๊ฐ€ํ•˜์—ฌ ๋ธŒ๋ผ์šฐ์ €๊ฐ€ ํ•ด๋‹น ์ฝ˜ํ…์ธ ์˜ ํ…์ŠคํŠธ ๋ฐฉํ–ฅ์„ ์–‘๋ฐฉํ–ฅ ํ…์ŠคํŠธ(BiDi) ์•Œ๊ณ ๋ฆฌ์ฆ˜์— ๋”ฐ๋ผ ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๋ Œ๋”๋งํ•˜๋„๋ก ๋ณด์žฅํ•˜์‹ญ์‹œ์˜ค.
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>""")
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