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.

Copilot AI review requested due to automatic review settings July 25, 2026 03:36

Copilot AI 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.

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 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๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ, ๋ฌธ์„œ ์ œ๋ชฉ๊ณผ ํ—ค๋”ฉ์ด ํ•ญ์ƒ ์˜๋ฏธ ์žˆ๋Š” ์ปจํ…์ŠคํŠธ๋ฅผ ์ œ๊ณตํ•˜๋„๋ก ํ•˜์‹ญ์‹œ์˜ค.

Copy link
Copy Markdown
Collaborator Author

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.

@seonghobae seonghobae closed this Aug 5, 2026
@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 free to 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