From c1889c6ef31f18d66b350a0d762d5ac63ecaf35e Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 27 Jun 2026 03:44:44 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20[=EC=A0=91?= =?UTF-8?q?=EA=B7=BC=EC=84=B1=20=EA=B0=9C=EC=84=A0]=20HTML=20=EC=9D=B8?= =?UTF-8?q?=EB=8D=B1=EC=8A=A4=20=EC=83=9D=EC=84=B1=20=EC=A0=91=EA=B7=BC?= =?UTF-8?q?=EC=84=B1=20=ED=96=A5=EC=83=81=20=EB=B0=8F=20100%=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EC=BB=A4=EB=B2=84=EB=A6=AC=EC=A7=80=20?= =?UTF-8?q?=EB=8B=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - HTML 메타 태그 추가 (`lang`, `charset`, `viewport`) - 스크린 리더용 `aria-label` 추가 (폴더 및 파일 명확화) - Jacoco 설정 및 단위 테스트 추가로 100% 라인 커버리지 달성 --- .Jules/palette.md | 3 + build.gradle | 26 ++- src/main/kotlin/html4tree/main.kt | 10 +- src/test/kotlin/html4tree/LinkedListTest.kt | 70 +++++++ src/test/kotlin/html4tree/MainKtTest.kt | 193 ++++++++++++++++++++ 5 files changed, 298 insertions(+), 4 deletions(-) create mode 100644 .Jules/palette.md create mode 100644 src/test/kotlin/html4tree/LinkedListTest.kt create mode 100644 src/test/kotlin/html4tree/MainKtTest.kt diff --git a/.Jules/palette.md b/.Jules/palette.md new file mode 100644 index 00000000..bc0e84d3 --- /dev/null +++ b/.Jules/palette.md @@ -0,0 +1,3 @@ +## 2026-06-27 - [CLI Output Accessibility] +**Learning:** Even simple generated HTML outputs (like static index pages) from CLI tools often lack basic accessibility semantics out-of-the-box. Emoticons (📁, ▹) are insufficient indicators for screen readers identifying interactive elements like file links. +**Action:** Always inject `aria-label` attributes to explicitly describe interactive items (e.g., "Parent directory", "Directory: folderName") when generating static HTML UI, replacing or augmenting icon-only context. diff --git a/build.gradle b/build.gradle index 8e088074..f07255f8 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,30 @@ buildscript { apply plugin: 'kotlin' apply plugin: 'application' +apply plugin: 'jacoco' + +jacoco { + toolVersion = "0.8.7" +} + +jacocoTestReport { + reports { + xml.enabled true + html.enabled true + } +} + +jacocoTestCoverageVerification { + violationRules { + rule { + limit { + minimum = 1.0 + } + } + } +} + +check.dependsOn jacocoTestCoverageVerification mainClassName = 'html4tree.MainKt' @@ -33,4 +57,4 @@ jar { } from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } -} \ No newline at end of file +} diff --git a/src/main/kotlin/html4tree/main.kt b/src/main/kotlin/html4tree/main.kt index 59999fce..bd756cf4 100644 --- a/src/main/kotlin/html4tree/main.kt +++ b/src/main/kotlin/html4tree/main.kt @@ -99,15 +99,17 @@ fun process_dir(curr_dir: File){ """ val index_top = """ - + + + ${curr_dir.getName().escapeHtml()} ${css}

${curr_dir.getName().escapeHtml()}