Repository navigation
フォーカスの輪郭を1つにそろえ、スキップリンクを置く - #170
Merged
Merged
Conversation
テーマは部品ごとに輪郭が違い、入力欄には目印が無かった。2px のネイビー・ オフセット 2px にそろえ、暗い地(左のナビ・スキップリンクの板)では 白に替える。着地点そのものには輪郭を出さない。 スキップリンクは extrabody に置き、content ブロックを差し替えて本体の div に id と tabindex を足す。左のナビが自動スクロールしているページでは Chrome が Tab の起点を動かすので最初の Tab では来ないが、起点がページの先頭にあるときは 効く(これまでは逃げ道が無かった)。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
11 tasks done
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.
#158 の最後の項目、フォーカスの輪郭とスキップリンクです。
変更
_templates/layout.htmlを新設。extrabodyにスキップリンクを置き、contentブロックを差し替えて本体の div にid="main-content"とtabindex="-1"を足す(tabindexが無いとフォーカスが本文へ移らず、次の Tab がまた先頭から始まる)_static/custom.cssに輪郭を1つにそろえる規則と、スキップリンクの見た目-webkit-focus-ring-color、入力欄はoutline: none(目印が無い)#main-content)contentブロックの中身は sphinx_rtd_theme 3.0.2 のものと同じです(版はrequirements.txtで固定しているので、差分はそこだけ)。スキップリンクが効く条件に制限があります
左のナビが自動スクロールしているページでは、最初の Tab がスキップリンクに来ません。 テーマの JS が読み込み時に現在の項目を
scrollIntoViewしていて、Chrome はスクロールで Tab の起点を動かすためです。実測した3ページ:index.htmlpreface.htmlsyntax.html置く価値はあると考えています。起点がページの先頭にあるとき(
index.html、Ctrl+Homeの後、リンクの一覧から辿る支援技術)には効き、これまではそもそも逃げ道が無かったためです。ナビの自動スクロールを止めれば常に効きますが、あれは現在位置を示す仕掛けなので触っていません。🤖 Generated with Claude Code