diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 00000000..b54dd3e8 --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2024-06-25 - Hide decorative Unicode icons from screen readers in directory listings +**Learning:** Screen readers will unnecessarily announce Unicode characters like right-pointing triangles or folders if they are not explicitly hidden. In long directory listings, this creates massive auditory noise that slows down navigation. +**Action:** Always wrap decorative or duplicate-meaning Unicode symbols with `` when used alongside text that already conveys the meaning, and use proper semantic landmarks like `
` to group primary content. \ No newline at end of file diff --git a/src/main/kotlin/html4tree/main.kt b/src/main/kotlin/html4tree/main.kt index 50b2680d..78c3cd1c 100644 --- a/src/main/kotlin/html4tree/main.kt +++ b/src/main/kotlin/html4tree/main.kt @@ -118,9 +118,10 @@ fun process_dir(curr_dir: File){ ${css} +

${curr_dir.getName().escapeHtml()}

+
"""