focus-styles
하는 일
이 스킬은 키보드 사용자가 컨트롤 사이를 이동할 때 사이트가 보이는 윤곽선을 보여 주는지 확인합니다. 접근성 있는 스타일을 원하는 디자이너와 개발자를 위한 스킬입니다.
사용하는 경우
- ✓CSS가 버튼이나 링크의 기본 윤곽선을 제거했을 때.
- ✓키보드 사용자가 어떤 컨트롤이 선택되었는지 볼 수 없을 때.
- ✓사용자 정의 버튼이나 링크 스타일을 디자인할 때.
스킬 링크
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/focus-styles/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“키보드로 이동할 때 버튼에 뚜렷한 윤곽선이 보이도록 해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 스타일시트에서 제거된 윤곽선을 찾고, 그 자리에 보이는 대체 스타일이 있는지 확인합니다. 충분한 대비와 명확한 간격을 가진 focus-visible 스타일을 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Provide visible custom focus indicators
Users who navigate by keyboard (people with motor disabilities, power users, people in assistive technology contexts) rely entirely on focus indicators to know where they are on the page. Removing outlines without replacement makes an entire site unusable for keyboard users. WCAG 2.4.7 requires a visible focus indicator, and WCAG 2.4.13 defines a stronger size-and-contrast target for custom indicators.
Quick Reference
- Never use outline: none or outline: 0 without a visible :focus-visible replacement
- Use :focus-visible instead of :focus to show indicators only during keyboard navigation
- Focus indicators must have 3:1 contrast ratio against adjacent colors (WCAG 2.2)
- Provide at least 2px solid outline with an offset for a high-quality focus ring
- If a focus ring is drawn with pseudo-elements, verify it is anchored to the correct positioned element and not clipped by
overflow: hidden - If the component uses a stretched-link pattern, verify the visible focus ring follows the actual interactive element rather than a parent wrapper by accident
Check
Find all instances of outline: none, outline: 0, or :focus { outline: none } in this CSS. Check if they provide an alternative visible focus indicator. If the replacement uses pseudo-elements, also verify the ring cannot be clipped or misplaced by overflow or missing positioning context.
Fix
Replace outline: none on :focus with :focus-visible styles that provide a clearly visible custom focus ring with appropriate contrast.
Explain
Explain the difference between :focus and :focus-visible, why focus styles matter for accessibility, and how to design an accessible focus ring.
Code Review
Review stylesheets, component styles, and responsive states related to Provide visible custom focus indicators. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/css/focus-styles
자주 묻는 질문
윤곽선을 그냥 없애면 안 되나요?
키보드 사용자는 윤곽선으로 현재 위치를 알기 때문에, 없애면 사이트를 쓰기 어려워집니다.
focus-visible이란 무엇인가요?
주로 키보드 탐색 중에 초점 스타일을 보여 주고, 마우스 클릭 뒤에는 보이지 않게 하는 CSS 선택자입니다.
어떤 대비가 필요한가요?
이 스킬은 초점 표시가 주변 색과 3대 1 이상의 대비를 가져야 한다고 말합니다.
상세 정보
작성자의 원본 설명
Use when reviewing stylesheets, component styles, and responsive behavior related to Provide visible custom focus indicators. Check the rendered layout across breakpoints and interaction states before proposing a fix.
인기도
- GitHub 스타
- 75k
- 순위
- #2852
- 라이선스
- MIT
- 업데이트
- 2026. 10. 31.
댓글
- …
이 저장소의 다른 스킬
frontendchecklist
75k명령줄 도구를 사용해 380개가 넘는 규칙으로 프런트엔드 코드와 실시간 페이지를 접근성, 속도, SEO, 보안 측면에서 점검합니다.
frontend-checklist-global
75kFront-End Checklist의 386개 규칙 전체로 프런트엔드 프로젝트를 감사하고, 발견한 문제마다 구체적인 해결 방법을 제시합니다.
404-page
75k없는 페이지 화면에 도움이 되는 링크가 있고 실제 404 상태 코드를 반환하는지 확인해, 길을 잃은 방문자를 돕습니다.
about-page
75k사이트를 운영하는 사람을 설명하는 명확한 소개 페이지가 있는지 검토해, 방문자와 검색 엔진의 신뢰를 높입니다.
비슷한 스킬
canvas
394k에이전트가 연결된 Mac 패널에 호스팅된 시각적 위젯을 띄우고, 패널을 숨기거나 다른 페이지로 옮기도록 돕습니다.
control-ui
394k에이전트가 세션, 대시보드, 연결된 Gateway를 포함해 OpenClaw Control UI를 정리하고 문제를 해결하도록 돕습니다.
diagram-maker
394k에이전트가 프로세스, 시스템 구조, 화이트보드 스케치를 위해 SVG, HTML, 편집 가능한 Excalidraw 파일로 명확한 다이어그램을 만들도록 돕습니다.