Uh oh!
There was an error while loading. Please reload this page.
🎨 Palette: [루트 디렉토리 빈 타이틀 접근성 개선] - #231
Conversation
루트 디렉토리(`/`)의 경우 `File.getName()`이 빈 문자열을 반환하여 생성된 HTML의 `<title>`과 `<h1>`이 비어 있게 됩니다. 이는 스크린 리더 등 보조 기기가 문서의 목적을 파악하는 데 악영향을 미칩니다. 이를 해결하기 위해 이름이 비어 있을 때 절대 경로(`absolutePath`)를 표시하도록 폴백 로직을 추가했습니다.
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
html4tree(Kotlin CLI)가 생성하는 디렉토리 index.html에서, 디렉토리 이름이 빈 문자열인 경우(<title>, <h1>이 비게 되는 케이스)에 절대 경로로 폴백하여 문서 제목/헤딩이 항상 의미 있는 값을 갖도록 개선합니다.
Changes:
process_dir에서 표시용 디렉토리 이름을name이 비면absolutePath로 폴백하도록 적용- 해당 폴백 동작을 검증하는 테스트 추가
- Jules 학습 노트(.jules/palette.md)에 접근성 관련 항목 추가
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/main/kotlin/html4tree/main.kt | <title>/<h1>에 사용할 디렉토리 표시 이름 폴백 로직 추가 |
| src/test/kotlin/html4tree/MainTest.kt | 빈 이름 폴백을 검증하는 단위 테스트 추가 |
| .jules/palette.md | 접근성 학습/조치 로그에 폴백 관련 항목 추가 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| val fakeRoot = object : File(tempDir, "fakeRoot") { | ||
| override fun getName() = "" | ||
| } | ||
| fakeRoot.mkdir() |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
루트 디렉토리(`/`)의 경우 `File.getName()`이 빈 문자열을 반환하여 생성된 HTML의 `<title>`과 `<h1>`이 비어 있게 됩니다. 이는 스크린 리더 등 보조 기기가 문서의 목적을 파악하는 데 악영향을 미칩니다. 이를 해결하기 위해 이름이 비어 있을 때 절대 경로(`absolutePath`)를 표시하도록 폴백 로직을 추가했습니다.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
.jules/palette.md:54
- PR/Palette entry frames this as a root-directory ("/") accessibility fix, but
go()explicitly rejects crawling the filesystem root (require(top_dir.parentFile != null)in src/main/kotlin/html4tree/main.kt:48). As written, the fallback will only be exercised ifprocess_dir()is invoked directly with aFilewhose name is empty, so the Palette note should clarify that root crawling remains disallowed and this is about handling empty directory names inprocess_dir().
## 2026-07-21 - 빈 디렉토리 이름에 대한 폴백 제공 (루트 디렉토리 접근성)
**Learning:** 파일 시스템 루트와 같이 이름이 빈 문자열인 디렉토리를 처리할 때, `<title>` 및 `<h1>` 요소가 비어 있으면 스크린 리더 사용자와 검색 엔진에 문서의 목적을 전달하지 못해 접근성에 악영향을 미칩니다.
**Action:** 디렉토리 이름이 비어 있을 때 화면 판독기가 문서 구조를 적절히 읽고 탐색할 수 있도록 절대 경로(absolutePath) 등을 표시하는 폴백 메커니즘을 제공하여 항상 유의미한 콘텐츠를 출력해야 합니다.
루트 디렉토리(`/`)의 경우 `File.getName()`이 빈 문자열을 반환하여 생성된 HTML의 `<title>`과 `<h1>`이 비어 있게 됩니다. 이는 스크린 리더 등 보조 기기가 문서의 목적을 파악하는 데 악영향을 미칩니다. 이를 해결하기 위해 이름이 비어 있을 때 절대 경로(`absolutePath`)를 표시하도록 폴백 로직을 추가했습니다. 또한 CSP 스타일 해시가 인라인 공백으로 인해 유효하지 않게 되는 문제를 해결했습니다.
| """ | ||
| val css = """<style>${exactStyleContent}</style>""" | ||
| val displayDirName = curr_dir.getName().ifEmpty { curr_dir.absolutePath } |
루트 디렉토리(`/`)의 경우 `File.getName()`이 빈 문자열을 반환하여 생성된 HTML의 `<title>`과 `<h1>`이 비어 있게 됩니다. 이는 스크린 리더 등 보조 기기가 문서의 목적을 파악하는 데 악영향을 미칩니다. 이를 해결하기 위해 이름이 비어 있을 때 절대 경로(`absolutePath`)를 표시하도록 폴백 로직을 추가했습니다. 또한 CSP 스타일 해시가 인라인 공백으로 인해 유효하지 않게 되는 문제를 해결했습니다. 기존 보안 패치를 모두 유지한 상태로 병합됩니다.
| val exactStyleContent = cssContent.trimIndent() | ||
| val styleHash = "sha256-" + Base64.getEncoder().encodeToString(MessageDigest.getInstance("SHA-256").digest(exactStyleContent.toByteArray(Charsets.UTF_8))) | ||
| val css = """ | ||
| <style> | ||
| ${cssContent} </style> | ||
| """ | ||
| val css = """<style>${exactStyleContent}</style>""" |
| val exactStyleContent = cssContent.trimIndent() | ||
| val styleHash = "sha256-" + Base64.getEncoder().encodeToString(MessageDigest.getInstance("SHA-256").digest(exactStyleContent.toByteArray(Charsets.UTF_8))) | ||
| val css = """ | ||
| <style> | ||
| ${cssContent} </style> | ||
| """ | ||
| val css = """<style>${exactStyleContent}</style>""" |
seonghobae
commented
Aug 5, 2026
Closing as superseded by draft canonical #364. The same non-empty filesystem-root title/heading fallback is retained there under a bounded post-#363 accessibility contract. #364 must centralize one escaped display label, prove root/non-root generated pages, add APA 7 doctoring and changelog, and pass fresh exact-head checks plus independent approval. No evidence from this duplicate head is reused. |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
💡 What: 루트 디렉토리(
/) 등에서 디렉토리 이름이 비어있을 경우, HTML<title>과<h1>에 절대 경로(absolutePath)를 표시하도록 폴백 로직 추가.🎯 Why: 기존에는 이름이 비어있으면
<title>과<h1>내용이 없어 스크린 리더 사용자가 해당 페이지의 목적과 위치를 파악할 수 없는 접근성 문제가 있었습니다.📸 Before/After: 해당 없음 (텍스트 내용 변화)
♿ Accessibility: 문서 제목과 헤딩 요소가 항상 의미 있는 값을 갖도록 보장하여 화면 판독기 사용자의 탐색 경험을 향상시켰습니다.
PR created automatically by Jules for task 5163485704421625255 started by @seonghobae