本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #2850

focus-not-obscured

できること

このスキルは、固定されたページの要素が、キーボードのフォーカスを持つ項目を覆っていないかを確認します。固定のメニュー、Cookie バナー、チャットウィジェットを作る開発者向けです。

使う場面

  • ✓Tab キーで移動すると、固定のヘッダーがリンクを隠すとき。
  • ✓Cookie バナーが、キーボードの利用者が入力中のフォームの欄を隠すとき。
  • ✓固定されたチャットのボタンやプロモーションのバーを追加したとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/focus-not-obscured/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/focus-not-obscured/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Tab キーを使うと、固定のヘッダーがフォーカスされたリンクを隠しません。確認してもらえますか。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、固定の要素が表示された状態で、キーボードのフォーカスをテストします。フォーカスされた項目が固定要素の下にスクロールされる場合を探し、スクロールのパディングや、オーバーレイのサイズの変更を提案します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Keep focused elements unobscured

A visible focus ring is not enough if the focused element sits behind a sticky header or footer. Keyboard users need to see the actual focused control and the focus indicator at the same time in order to continue the task.

Quick Reference

  • Sticky UI must not cover the focused control while keyboard users tab through the page
  • Use scroll-padding or equivalent spacing when fixed headers or footers are present
  • Test with cookie banners, chat widgets, and consent bars open
  • Re-test at zoomed and mobile layouts where overlap problems usually appear

Check

Audit keyboard focus with all sticky UI active. Check headers, footers, cookie banners, promo bars, and chat launchers for cases where the focused element scrolls underneath them.

Fix

Add layout spacing such as scroll-padding, reduce overlay height, or change focus/scroll behavior so the focused element remains visible when tabbing.

Explain

Explain WCAG Focus Not Obscured, why fixed-position UI commonly breaks it, and how scroll-padding and overlay layout choices prevent the issue.

Code Review

Review sticky layout, focus styles, overlays, and keyboard navigation related to Keep focused elements unobscured. Flag exact selectors, breakpoints, or UI states where focused controls can be covered.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/accessibility/focus-not-obscured

よくある質問

scroll-padding とは何ですか?

フォーカスされた項目にブラウザがスクロールするとき、上や下に余白を残して、項目が見えたままになるようにする CSS の設定です。

どの要素を確認しますか?

ヘッダー、フッター、Cookie バナー、プロモーションのバー、チャットのランチャーを確認します。

この問題はいつ起きやすいですか?

拡大表示やモバイルのレイアウトで重なる問題が起きやすいため、そこで再テストすることを勧めています。

詳細

作者による元の説明

Use when reviewing sticky navigation, consent banners, chat widgets, skip links, or any fixed-position UI. Validate the actual tab order and viewport behavior at realistic zoom levels.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2850
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル