Repository navigation
フォーカスリングを本文の外(ナビ・サイドバー・検索)にも広げる (#472) - #481
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
close #472
#435 で入れたフォーカスリングは
.vp-docの中とスキップリンクだけに当たっていた。同じページを Tab で辿ると、本文に入るまで UA のリング、本文に入ると 2px のネイビーと 2 種類の輪郭が出る。所在の目印は 1 つ(技術ブログ #2686 / #2847)なので、サイト全体に広げた。before
outline: autoの青)base.css)outline: 4px auto -webkit-focus-ring-colorDocSearch-Button)outline: 5px auto -webkit-focus-ring-colorinput:focus)outline: none(目印が無い)inputに目印が無いのはbase.cssのinput:focus, textarea:focus, select:focus { outline: none }による。キーボードで検索を開くと、どこにフォーカスがあるか分からない状態だった。after
a/button/input/summary/[tabindex]の:focus-visibleに 2px のネイビー、outline-offset: 2px。暗い側は地の上でネイビーが 2.67 と非テキストの 3:1 に届かないので、文字の最上段(12.81)に替える(#437 と同じ)。[tabindex]から-1を外している。サイドバーの器(nav[tabindex="-1"])とスキップリンクの着地点を丸ごと囲まないため。Tab で辿れる0のもの(サイドバーの折りたたみ見出しとカレット)だけが対象.VPNavBarMenuLinkと.VPNavBarTitle .titleだけoutline-offset: -2pxで内側へ逃がす。外側だと輪郭が帯の外に出る#appを前置して、部品ごとの4px auto/5px auto/noneに詰め((1,1,1) 対 (0,2,0)):focusではなく:focus-visibleなのは #437 のまま。マウスで押したときには出ない。確認
トップで Tab を押し続けて、輪郭が最後まで同じ形かを見る。
/か 検索ボタン)、入力欄に輪郭が出るか🤖 Generated with Claude Code