Skip to content

🎨 Palette: 루트 디렉토리 렌더링 접근성 개선 - #266

Closed
seonghobae wants to merge 1 commit into
masterfrom
palette/root-dir-accessibility-11674565176147400217
Closed

🎨 Palette: 루트 디렉토리 렌더링 접근성 개선#266
seonghobae wants to merge 1 commit into
masterfrom
palette/root-dir-accessibility-11674565176147400217

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What: HTML 생성 시 루트 디렉토리처럼 getName()이 빈 문자열인 경우 absolutePath를 대체 값(fallback)으로 사용하여 의미 있는 제목과 헤딩을 제공하도록 수정했습니다.
🎯 Why: 디렉토리 이름이 비어 있으면 생성되는 HTML의 <title><h1> 태그가 빈 채로 렌더링되어 화면 판독기(Screen Reader) 사용자가 페이지 컨텍스트를 이해하기 어렵고 접근성 및 사용성이 떨어지는 문제가 있었습니다.
📸 Before/After: (Before) <title></title>, <h1></h1> -> (After) <title>/</title>, <h1>/</h1>
Accessibility: 접근성(A11y) 기준에 따라 모든 페이지는 의미 있는 제목(<title>)과 주 랜드마크 텍스트(<h1>)를 포함하도록 개선되어 화면 판독기 경험이 향상되었습니다.


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

- getName()이 빈 문자열을 반환하는 루트 디렉토리의 경우 absolutePath를 fallback으로 사용하도록 수정하여 <title> 및 <h1> 태그가 비어 있지 않도록 개선함.
@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 review requested due to automatic review settings July 25, 2026 03:36

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

This PR improves the accessibility of generated directory listing pages by ensuring the root directory (or any directory whose getName() is empty) produces meaningful <title> and <h1> text, avoiding blank landmarks that reduce screen reader usability.

Changes:

  • Add a fallback to use absolutePath when getName() is empty for the generated HTML <title> and <h1>.
  • Add a regression test verifying the fallback behavior when getName() is empty.
  • Document the learning/action in the Palette log for future reference.

Reviewed changes

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

FileDescription
src/main/kotlin/html4tree/main.ktUse absolutePath fallback for <title>/<h1> when directory name is empty to improve A11y context.
src/test/kotlin/html4tree/MainTest.ktAdd a unit test covering the root-name-empty fallback behavior in process_dir.
.jules/palette.mdRecord the accessibility learning/action about empty directory names and meaningful landmarks.
Comments suppressed due to low confidence (1)

src/main/kotlin/html4tree/main.kt:335

  • Same as the <title> line: the <h1> expression calls curr_dir.getName() twice. Using ifEmpty { ... } makes the fallback clearer and avoids duplicate calls.
 <h1>${(if (curr_dir.getName().isEmpty()) curr_dir.absolutePath else curr_dir.getName()).escapeHtml()}</h1>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<!-- 보안 향상: 리퍼러를 통한 디렉토리 경로 노출 방지 -->
<meta name="referrer" content="no-referrer">
<title>${curr_dir.getName().escapeHtml()}</title>
<title>${(if (curr_dir.getName().isEmpty()) curr_dir.absolutePath else curr_dir.getName()).escapeHtml()}</title>
val fakeRoot = object : File(tempDir, "fakeRoot") {
override fun getName(): String = ""
}
fakeRoot.mkdir()
Comment thread.jules/palette.md
Comment on lines +53 to +54
**Learning:** 파일 시스템 루트와 같이 getName()이 빈 문자열을 반환하는 디렉토리의 경우, HTML 생성 시 <title> 및 <h1> 태그가 비어 있게 되어 화면 판독기 사용자와 접근성에 문제가 발생합니다.
**Action:** 디렉토리 이름이 비어 있는 경우 fallback으로 absolutePath를 사용하여, 문서 제목과 헤딩이 항상 의미 있는 컨텍스트를 제공하도록 하십시오.
@seonghobaeChatGPT Codex Connector

Copy link
Copy Markdown
CollaboratorAuthor

Closing as superseded by draft canonical #364. The same filesystem-root display-label fallback is retained there, but #364 is deliberately blocked until it is updated after #363, computes one escaped shared label, tests root and ordinary generated pages, adds APA 7 doctoring and changelog, and passes fresh exact-head quality/security 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 filesystem-root display-label fallback is retained there, but #364 is deliberately blocked until it is updated after #363, computes one escaped shared label, tests root and ordinary generated pages, adds APA 7 doctoring and changelog, and passes fresh exact-head quality/security 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