๐จ Palette: ๋ฃจํธ ๋๋ ํ ๋ฆฌ ๋ ๋๋ง ์ ๊ทผ์ฑ ๊ฐ์ - #266
๐จ Palette: ๋ฃจํธ ๋๋ ํ ๋ฆฌ ๋ ๋๋ง ์ ๊ทผ์ฑ ๊ฐ์ #266seonghobae wants to merge 1 commit into
Conversation
- getName()์ด ๋น ๋ฌธ์์ด์ ๋ฐํํ๋ ๋ฃจํธ ๋๋ ํ ๋ฆฌ์ ๊ฒฝ์ฐ absolutePath๋ฅผ fallback์ผ๋ก ์ฌ์ฉํ๋๋ก ์์ ํ์ฌ <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
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
absolutePathwhengetName()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.
| File | Description |
|---|---|
| src/main/kotlin/html4tree/main.kt | Use absolutePath fallback for <title>/<h1> when directory name is empty to improve A11y context. |
| src/test/kotlin/html4tree/MainTest.kt | Add a unit test covering the root-name-empty fallback behavior in process_dir. |
| .jules/palette.md | Record 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 callscurr_dir.getName()twice. UsingifEmpty { ... }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() |
| **Learning:** ํ์ผ ์์คํ ๋ฃจํธ์ ๊ฐ์ด getName()์ด ๋น ๋ฌธ์์ด์ ๋ฐํํ๋ ๋๋ ํ ๋ฆฌ์ ๊ฒฝ์ฐ, HTML ์์ฑ ์ <title> ๋ฐ <h1> ํ๊ทธ๊ฐ ๋น์ด ์๊ฒ ๋์ด ํ๋ฉด ํ๋ ๊ธฐ ์ฌ์ฉ์์ ์ ๊ทผ์ฑ์ ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค. | ||
| **Action:** ๋๋ ํ ๋ฆฌ ์ด๋ฆ์ด ๋น์ด ์๋ ๊ฒฝ์ฐ fallback์ผ๋ก absolutePath๋ฅผ ์ฌ์ฉํ์ฌ, ๋ฌธ์ ์ ๋ชฉ๊ณผ ํค๋ฉ์ด ํญ์ ์๋ฏธ ์๋ ์ปจํ ์คํธ๋ฅผ ์ ๊ณตํ๋๋ก ํ์ญ์์ค. |
|
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. |
๐ก 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