Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ jobs:
- name: Validate HTML, internal links, and images
# Catches broken internal links/anchors and missing images before deploy.
# External links are skipped (slow, flaky) but must be https; hash-only
# hrefs are allowed.
# hrefs are allowed. An empty alt fails: `![](…)` renders one, which a
# screen reader skips and the lightbox has no caption for.
# --swap-urls strips the Pages base_path so absolute /baseurl/... links
# resolve against _site/ regardless of what base_path the build used.
run: |
bundle exec htmlproofer ./_site \
--disable-external \
--allow-hash-href \
--no-ignore-empty-alt \
--swap-urls "^$BASE_PATH:"
env:
BASE_PATH: ${{ steps.pages.outputs.base_path }}
Expand Down
2 changes: 1 addition & 1 deletion README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ ruby script/lint-posts.rb # 글 원본이 규
bundle exec jekyll build --strict-front-matter \
--destination /tmp/site-verify # 빌드가 깨끗한가?
bundle exec htmlproofer /tmp/site-verify --disable-external \
--allow-hash-href # 깨진 링크·이미지·앵커, http:// 링크는 없나?
--allow-hash-href --no-ignore-empty-alt # 깨진 링크·이미지·앵커, http://, 빈 alt는 없나?
script/validate-site.sh /tmp/site-verify # 사이트맵·피드·메타데이터·헤딩
shellcheck script/*.sh assets/images/*.sh && actionlint # workflow-lint.yml이 PR과 main에서 실행
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ ruby script/lint-posts.rb # post sources follo
bundle exec jekyll build --strict-front-matter \
--destination /tmp/site-verify # does it build clean?
bundle exec htmlproofer /tmp/site-verify --disable-external \
--allow-hash-href # broken links, images, anchors, http://?
--allow-hash-href --no-ignore-empty-alt # broken links, images, anchors, http://, alt=""?
script/validate-site.sh /tmp/site-verify # sitemap, feed, metadata, headings
shellcheck script/*.sh assets/images/*.sh && actionlint # workflow-lint.yml, on PRs and main
```
Expand Down
4 changes: 2 additions & 2 deletions docs/tech-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ Bourbon → base/ → Neat → _layout → _post → _tags → _syntax(Rouge 코
> 않는다.

접근성 기준(`_layout.scss`): 키보드로 이동할 때 포커스가 보이도록 상호작용 요소에
`:focus-visible` 아웃라인을 주고, 움직임에 민감한 사용자를 위해 호버 시 확대/이동 효과를
무력화하는 `prefers-reduced-motion` 블록을 둔다. 모바일 메뉴 버튼은 스크린리더용
`:focus-visible` 아웃라인을 주고, 움직임에 민감한 사용자를 위해 애니메이션·전환·부드러운
스크롤을 사실상 없애는 `prefers-reduced-motion` 블록을 둔다(호버 확대는 움직임 없이 바로 바뀐다). 모바일 메뉴 버튼은 스크린리더용
`aria-label`/`aria-expanded`/`aria-controls`를 갖고, JS가 열림/닫힘 상태에 맞춰
`aria-expanded`를 동기화한다. 현재 보고 있는 내비 링크는 `aria-current="page"`를 받는다.

Expand Down
5 changes: 3 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ document.addEventListener('DOMContentLoaded', function () {
var here = window.location.pathname;
document.querySelectorAll('.nav-link a').forEach(function (link) {
var path = new URL(link.getAttribute('href'), window.location.origin).pathname;
// A post sits under its section's path (/paper-reviews/…).
// A post sits under its section's path (/paper-reviews/…): there the link is
// where the reader is, not the page itself.
if (here === path || (path !== '/' && here.indexOf(path) === 0)) {
link.classList.add('active');
link.setAttribute('aria-current', 'page');
link.setAttribute('aria-current', here === path ? 'page' : 'location');
}
});

Expand Down