-
Notifications
You must be signed in to change notification settings - Fork 0
a11y(external-links): replace title-only warning with persistent context #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
14
commits into
main
Choose a base branch
from
palette-a11y-external-links-12203336915420740993
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+48
−20
Draft
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
84cf2fb
🎨 Palette: [UX improvement] 외부 링크 다국어 title 접근성 개선
seonghobae eca21cb
repair(a11y): restore protected Palette doctrine
seonghobae 571d3a0
🎨 Palette: [UX improvement] 외부 링크 다국어 title 접근성 개선
seonghobae ce7f630
chore: keep external-link finding out of Palette doctrine
seonghobae 92825b7
test(a11y): reject title-only external-link warnings
seonghobae 1c712ca
🎨 Palette: [UX improvement] 외부 링크 다국어 title 접근성 개선
seonghobae f3a0aad
🎨 Palette: [UX improvement] 외부 링크 다국어 title 접근성 개선
seonghobae 180ae7f
chore(a11y): keep Palette doctrine at protected authority
seonghobae 14d2d05
🎨 Palette: [UX improvement] 외부 링크 다국어 title 접근성 개선
seonghobae 2acc46b
chore: restore palette doctrine authority
seonghobae 42f1df1
🎨 Palette: [UX improvement] 외부 링크 다국어 title 접근성 개선
seonghobae ad82470
🎨 Palette: [UX improvement] 외부 링크 다국어 title 접근성 개선
seonghobae 3f3d216
🎨 Palette: [UX improvement] 외부 링크 다국어 title 접근성 개선
seonghobae 744e19d
repair(a11y): remove branch-local external-link doctrine
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| """Test UX/A11y requirements.""" | ||
| from pathlib import Path | ||
|
|
||
| def test_external_links_have_title() -> None: | ||
| """Test that all external links have a dynamic title attribute for a11y.""" | ||
| html = Path("index.html").read_text(encoding="utf-8") | ||
| js = Path("i18n.js").read_text(encoding="utf-8") | ||
|
|
||
| # Verify dynamic logic | ||
| assert "data-i18n-title" in js | ||
| assert '"externalLink": "새 창에서 열기"' in js | ||
|
|
||
| # Check target="_blank" has associated attributes using independent tokens | ||
| for line in html.splitlines(): | ||
| if 'target="_blank"' in line: | ||
| assert "data-i18n-title" in line | ||
| assert "externalLink" in line | ||
| assert "title" in line | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
영문 번역과 실제
title속성을 함께 검증하세요.현재 테스트는 한국어
externalLink번역만 확인합니다. 영문 키가 삭제되어 영어 전환 후 제목이 갱신되지 않아도 테스트가 통과합니다. 또한assert "title" in line은data-i18n-title문자열만으로 통과하므로 실제title속성을 검증하지 않습니다. 영문 번역을 추가로 확인하고title="..."값을 정확히 검사하거나 HTML 파서로 속성을 확인하세요.수정 예시
📝 Committable suggestion
🤖 Prompt for AI Agents