Skip to content

🎨 Palette: [루트 디렉토리 빈 타이틀 접근성 개선] - #231

Closed
seonghobae wants to merge 4 commits into
masterfrom
palette/fallback-empty-dir-name-5163485704421625255
Closed

🎨 Palette: [루트 디렉토리 빈 타이틀 접근성 개선]#231
seonghobae wants to merge 4 commits into
masterfrom
palette/fallback-empty-dir-name-5163485704421625255

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What: 루트 디렉토리(/) 등에서 디렉토리 이름이 비어있을 경우, HTML <title><h1>에 절대 경로(absolutePath)를 표시하도록 폴백 로직 추가.
🎯 Why: 기존에는 이름이 비어있으면 <title><h1> 내용이 없어 스크린 리더 사용자가 해당 페이지의 목적과 위치를 파악할 수 없는 접근성 문제가 있었습니다.
📸 Before/After: 해당 없음 (텍스트 내용 변화)
♿ Accessibility: 문서 제목과 헤딩 요소가 항상 의미 있는 값을 갖도록 보장하여 화면 판독기 사용자의 탐색 경험을 향상시켰습니다.


PR created automatically by Jules for task 5163485704421625255 started by @seonghobae

루트 디렉토리(`/`)의 경우 `File.getName()`이 빈 문자열을 반환하여 생성된 HTML의 `<title>`과 `<h1>`이 비어 있게 됩니다. 이는 스크린 리더 등 보조 기기가 문서의 목적을 파악하는 데 악영향을 미칩니다. 이를 해결하기 위해 이름이 비어 있을 때 절대 경로(`absolutePath`)를 표시하도록 폴백 로직을 추가했습니다.
CopilotAI review requested due to automatic review settings July 21, 2026 03:33
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

FileDescription
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()
Comment threadsrc/test/kotlin/html4tree/MainTest.kt Outdated
Comment thread.jules/palette.md Outdated
루트 디렉토리(`/`)의 경우 `File.getName()`이 빈 문자열을 반환하여 생성된 HTML의 `<title>`과 `<h1>`이 비어 있게 됩니다. 이는 스크린 리더 등 보조 기기가 문서의 목적을 파악하는 데 악영향을 미칩니다. 이를 해결하기 위해 이름이 비어 있을 때 절대 경로(`absolutePath`)를 표시하도록 폴백 로직을 추가했습니다.
CopilotAI review requested due to automatic review settings July 21, 2026 04:08

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 if process_dir() is invoked directly with a File whose name is empty, so the Palette note should clarify that root crawling remains disallowed and this is about handling empty directory names in process_dir().
## 2026-07-21 - 빈 디렉토리 이름에 대한 폴백 제공 (루트 디렉토리 접근성)
**Learning:** 파일 시스템 루트와 같이 이름이 빈 문자열인 디렉토리를 처리할 때, `<title>` 및 `<h1>` 요소가 비어 있으면 스크린 리더 사용자와 검색 엔진에 문서의 목적을 전달하지 못해 접근성에 악영향을 미칩니다.
**Action:** 디렉토리 이름이 비어 있을 때 화면 판독기가 문서 구조를 적절히 읽고 탐색할 수 있도록 절대 경로(absolutePath) 등을 표시하는 폴백 메커니즘을 제공하여 항상 유의미한 콘텐츠를 출력해야 합니다.

루트 디렉토리(`/`)의 경우 `File.getName()`이 빈 문자열을 반환하여 생성된 HTML의 `<title>`과 `<h1>`이 비어 있게 됩니다. 이는 스크린 리더 등 보조 기기가 문서의 목적을 파악하는 데 악영향을 미칩니다. 이를 해결하기 위해 이름이 비어 있을 때 절대 경로(`absolutePath`)를 표시하도록 폴백 로직을 추가했습니다. 또한 CSP 스타일 해시가 인라인 공백으로 인해 유효하지 않게 되는 문제를 해결했습니다.
CopilotAI review requested due to automatic review settings July 21, 2026 04:33

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

"""
val css = """<style>${exactStyleContent}</style>"""

val displayDirName = curr_dir.getName().ifEmpty { curr_dir.absolutePath }
루트 디렉토리(`/`)의 경우 `File.getName()`이 빈 문자열을 반환하여 생성된 HTML의 `<title>`과 `<h1>`이 비어 있게 됩니다. 이는 스크린 리더 등 보조 기기가 문서의 목적을 파악하는 데 악영향을 미칩니다. 이를 해결하기 위해 이름이 비어 있을 때 절대 경로(`absolutePath`)를 표시하도록 폴백 로직을 추가했습니다. 또한 CSP 스타일 해시가 인라인 공백으로 인해 유효하지 않게 되는 문제를 해결했습니다. 기존 보안 패치를 모두 유지한 상태로 병합됩니다.
CopilotAI review requested due to automatic review settings July 21, 2026 05:47

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment on lines +313 to +316
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>"""
Comment on lines +313 to +316
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>"""
@seonghobaeChatGPT Codex Connector

Copy link
Copy Markdown
CollaboratorAuthor

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.

@google-labs-jules

Copy link
Copy Markdown

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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@seonghobae