diff --git a/.Jules/palette.md b/.Jules/palette.md
new file mode 100644
index 00000000..473ce838
--- /dev/null
+++ b/.Jules/palette.md
@@ -0,0 +1,3 @@
+## 2024-05-24 - HTML Directory Listing Semantic Navigation & Decorative Icons
+**Learning:** When generating raw HTML pages (like directory listings), unicode icons (e.g., 📁 for folders, ↰ for parent dir) are announced poorly by screen readers. Furthermore, a bare `
` lacks semantic context. Wrapping the list in ``, the page in ``, and specifically using ``, while adding descriptive `aria-label`s on the links, significantly improves the structural understanding and voice announcements for keyboard/screen reader users.
+**Action:** Always wrap decorative or visually symbolic unicode characters in ``, wrap primary navigation in a `` element, and explicitly provide `aria-label`s for links where visual icons substitute context.
diff --git a/src/main/kotlin/html4tree/main.kt b/src/main/kotlin/html4tree/main.kt
index 50b2680d..2f079595 100644
--- a/src/main/kotlin/html4tree/main.kt
+++ b/src/main/kotlin/html4tree/main.kt
@@ -118,9 +118,11 @@ fun process_dir(curr_dir: File){
${css}
- ${curr_dir.getName().escapeHtml()}
-
- ↰ ..
+
+ ${curr_dir.getName().escapeHtml()}
+
+
+ ↰ ..
"""
val index_middle = fun():String{
@@ -131,7 +133,9 @@ fun process_dir(curr_dir: File){
dir_files.forEach {
val isLinkedDirectory = it.isDirectory() && !java.nio.file.Files.isSymbolicLink(it.toPath())
if((it.getName() !in exclude) && (isLinkedDirectory || !it.isDirectory())) {
- l += """ ${if (isLinkedDirectory) { "📁" } else { "▸" }} ${it.getName().escapeHtml()} """+"\n"
+ val ariaLabel = if (isLinkedDirectory) { "aria-label=\"${it.getName().escapeHtml()} 디렉토리\"" } else { "aria-label=\"${it.getName().escapeHtml()} 파일\"" }
+ val icon = if (isLinkedDirectory) { "📁 " } else { "▸ " }
+ l += """ $icon ${it.getName().escapeHtml()} """+"\n"
}
}
@@ -139,7 +143,9 @@ fun process_dir(curr_dir: File){
}
val index_bottom="""
-
+
+
+