Uh oh!
There was an error while loading. Please reload this page.
🎨 Palette: 빈 디렉토리 이름 폴백 추가 (접근성 개선) - #239
Conversation
빈 이름(예: 파일 시스템 루트)을 가진 디렉토리의 경우 `title`과 `h1` 태그가 비어 있어 스크린 리더 접근성에 심각한 문제를 초래하는 것을 수정했습니다. 이제 절대 경로를 폴백으로 사용합니다.
👋 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
Note
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds a fallback display name for directories that have an empty name (e.g., filesystem root) so generated HTML never contains empty <title> / <h1>, improving screen-reader accessibility.
Changes:
- Add
dirNamefallback toabsolutePathwhencurr_dir.nameis empty, and use it in<title>/<h1>. - Add a unit test validating HTML output for an “empty name” directory case.
- Document the accessibility learning/action in
.jules/palette.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/main/kotlin/html4tree/main.kt | Adds empty-directory-name fallback and uses it in generated HTML title/header. |
| src/test/kotlin/html4tree/MainTest.kt | Adds regression test to ensure <title>/<h1> aren’t empty when dir name is empty. |
| .jules/palette.md | Records the new accessibility guideline about empty directory names. |
💡 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() |
| fun process_dir(curr_dir: File, excludeSet: Set<String>? = null, dirFiles: Array<File>? = null){ | ||
| val exclude: Set<String> = excludeSet ?: process_ignore_file(curr_dir) | ||
| val dirName = if (curr_dir.name.isEmpty()) curr_dir.absolutePath else curr_dir.name |
| <!-- 보안 향상: 리퍼러를 통한 디렉토리 경로 노출 방지 --> | ||
| <meta name="referrer" content="no-referrer"> | ||
| <title>${curr_dir.getName().escapeHtml()}</title> | ||
| <title>${dirName.escapeHtml()}</title> |
| <body> | ||
| <main> | ||
| <h1>${curr_dir.getName().escapeHtml()}</h1> | ||
| <h1>${dirName.escapeHtml()}</h1> |
| **조치:** 항상 HTML 문서의 `<head>` 영역에 `<meta name="color-scheme" content="light dark">` 메타 태그를 명시적으로 추가하여 브라우저 수준에서 사용자의 시스템 테마(다크 모드 등)를 완전히 상속받아 일관성 있는 네이티브 UI를 렌더링하도록 보장하십시오. | ||
| ## 2026-07-22 - Empty Directory Name Fallback | ||
| **Learning:** When generating HTML for directory structures, directories with empty names (like filesystem roots) result in empty <title> and <h1> tags, causing a severe accessibility issue for screen readers. |
seonghobae
commented
Aug 5, 2026
Closing as superseded by draft canonical #364. The same root-name fallback is retained there, but #364 is blocked until it is updated after #363, computes one escaped shared display label, proves root and ordinary generated pages, adds APA 7 doctoring and changelog, and passes fresh exact-head quality/security checks plus independent approval. No result from this duplicate head is reused. |
Understood. Acknowledging that this PR is superseded by draft #364 and stopping work on this PR. |
💡 What: 이름이 빈 디렉토리(예: 최상위 루트 등)일 때 절대 경로를 보여주도록 폴백(fallback) 메커니즘을 추가했습니다.
🎯 Why: 디렉토리 이름이 비어 있을 경우
<title>및<h1>태그가 비어 있어, 화면 판독기(스크린 리더) 사용자가 현재 위치를 전혀 파악할 수 없는 심각한 접근성 문제를 해결하기 위함입니다.📸 Before/After: 루트 디렉토리 크롤링 시
<title></title>-><title>/absolute/path</title>♿ Accessibility: 비어 있는 시맨틱 태그(title, h1)를 방지하여 화면 판독기의 탐색 및 컨텍스트 이해도를 크게 향상시켰습니다.
PR created automatically by Jules for task 6972211353999789452 started by @seonghobae