From 01ecc69a14ec8293c1af640003faffaf05f5d61b Mon Sep 17 00:00:00 2001
From: seonghobae <8172694+seonghobae@users.noreply.github.com>
Date: Thu, 16 Jul 2026 20:52:20 +0000
Subject: [PATCH 1/4] feat: add role status to empty directory message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
빈 디렉토리를 렌더링할 때 생성되는 메시지에 `role="status"`를 추가하여
스크린 리더 사용자가 상태 변경("이 디렉토리는 비어 있습니다.")을 즉시
인지할 수 있도록 접근성을 개선했습니다.
---
.jules/palette.md | 4 ++++
src/main/kotlin/html4tree/main.kt | 2 +-
src/test/kotlin/html4tree/MainTest.kt | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.jules/palette.md b/.jules/palette.md
index 9a12c9d..db2c76d 100644
--- a/.jules/palette.md
+++ b/.jules/palette.md
@@ -48,3 +48,7 @@
## 2024-08-01 - 네이티브 브라우저 UI의 다크 모드 지원 강제
**학습:** CSS 미디어 쿼리(`@media (prefers-color-scheme: dark)`)를 통해 다크 모드를 지원하더라도, 브라우저의 네이티브 UI 요소(스크롤바, 기본 폼 컨트롤, 기본 백그라운드 등)는 테마 변경을 인식하지 못해 어두운 테마 환경에서 밝은 스크롤바가 표시되는 등 시각적 불일치를 초래합니다.
**조치:** 항상 HTML 문서의 `
` 영역에 `` 메타 태그를 명시적으로 추가하여 브라우저 수준에서 사용자의 시스템 테마(다크 모드 등)를 완전히 상속받아 일관성 있는 네이티브 UI를 렌더링하도록 보장하십시오.
+
+## 2024-08-01 - 정적 출력의 상태 메시지 접근성 향상
+**Learning:** "이 디렉토리는 비어 있습니다."와 같은 상태 메시지는 화면이 렌더링될 때 시각적으로는 분명하지만, 스크린 리더 사용자에게는 명시적인 역할 부여 없이는 중요한 상태 변화로 즉각적으로 전달되지 않을 수 있습니다.
+**Action:** 정적 HTML을 생성할 때 빈 상태나 중요 메시지를 표시하는 요소에 `role="status"`(또는 문맥에 따라 다른 적절한 ARIA 라이브 영역 역할)를 추가하여 스크린 리더가 해당 내용을 즉시 읽어주도록 하십시오.
diff --git a/src/main/kotlin/html4tree/main.kt b/src/main/kotlin/html4tree/main.kt
index b455862..e57b930 100644
--- a/src/main/kotlin/html4tree/main.kt
+++ b/src/main/kotlin/html4tree/main.kt
@@ -370,7 +370,7 @@ ${cssContent}
}
if(l.isEmpty()){
- l.append(""" 이 디렉토리는 비어 있습니다.
""")
+ l.append(""" 이 디렉토리는 비어 있습니다.
""")
l.append('\n')
}
diff --git a/src/test/kotlin/html4tree/MainTest.kt b/src/test/kotlin/html4tree/MainTest.kt
index 1349471..83739c9 100644
--- a/src/test/kotlin/html4tree/MainTest.kt
+++ b/src/test/kotlin/html4tree/MainTest.kt
@@ -94,6 +94,7 @@ class MainTest {
val htmlContent = indexFile.readText()
assertTrue(htmlContent.contains(""))
assertTrue(htmlContent.contains("이 디렉토리는 비어 있습니다."))
+ assertTrue(htmlContent.contains("role=\"status\""))
assertTrue(htmlContent.contains("role=\"list\""))
}
From 1aa1755c36558e7b02c4cada3247768fe8761b6e Mon Sep 17 00:00:00 2001
From: seonghobae <8172694+seonghobae@users.noreply.github.com>
Date: Thu, 16 Jul 2026 21:07:36 +0000
Subject: [PATCH 2/4] feat: add role status to empty directory message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
빈 디렉토리를 렌더링할 때 생성되는 메시지에 `role="status"`를 추가하여
스크린 리더 사용자가 상태 변경("이 디렉토리는 비어 있습니다.")을 즉시
인지할 수 있도록 접근성을 개선했습니다.
From a7fc7754b18b57c72f9e6c844787bb9e990f4af5 Mon Sep 17 00:00:00 2001
From: seonghobae <8172694+seonghobae@users.noreply.github.com>
Date: Thu, 16 Jul 2026 21:31:49 +0000
Subject: [PATCH 3/4] feat: add role status to empty directory message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
빈 디렉토리를 렌더링할 때 생성되는 메시지에 `role="status"`를 추가하여
스크린 리더 사용자가 상태 변경("이 디렉토리는 비어 있습니다.")을 즉시
인지할 수 있도록 접근성을 개선했습니다.
From 151b2fe51968b862ff35d37c81e6f013bb8e6d03 Mon Sep 17 00:00:00 2001
From: seonghobae <8172694+seonghobae@users.noreply.github.com>
Date: Thu, 16 Jul 2026 21:49:03 +0000
Subject: [PATCH 4/4] feat: add role status to empty directory message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
빈 디렉토리를 렌더링할 때 생성되는 메시지에 `role="status"`를 추가하여
스크린 리더 사용자가 상태 변경("이 디렉토리는 비어 있습니다.")을 즉시
인지할 수 있도록 접근성을 개선했습니다.