viewport-zoom
できること
このスキルは、viewportのmetaタグで、ズームを妨げる設定がないかを確認します。モバイルのページをアクセシブルに保ちたい開発者やテンプレートの作成者向けです。
使う場面
- ✓ページのviewportのmetaタグにuser-scalable=noが含まれているとき。
- ✓ページのmaximum-scaleが1や低い値に設定されているとき。
- ✓テンプレートやCSSのフレームワークが、ズームを妨げる設定を追加しているとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/viewport-zoom/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のモバイルサイトはピンチズームができません。viewportの設定を確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、viewportのmetaタグを読み、ズームを止める設定を指摘します。それらを、標準のwidthとinitial-scaleの設定に置き換えます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Do not disable pinch zoom
Pinch-to-zoom is an essential accessibility feature for low-vision users who cannot read text at the page's default size. When zoom is disabled, these users cannot enlarge text or images, making the page completely inaccessible without external magnification software. Low-vision users who rely on browser zoom are entirely blocked. Additionally, all users benefit from being able to zoom in on small text, fine-print, or complex images. Disabling zoom is one of the most harmful and easily preventable accessibility failures.
Quick Reference
- Never use
user-scalable=nooruser-scalable=0in the viewport meta tag - Never set
maximum-scale=1(or any value below 5) in the viewport meta tag - Both prevent pinch-to-zoom, violating WCAG 2.1 SC 1.4.4 (Resize Text, Level AA)
- The correct viewport meta tag is:
<meta name='viewport' content='width=device-width, initial-scale=1'> - Note: iOS 10+ ignores
user-scalable=noin Safari, but other browsers and older iOS do not
Check
Find the <meta name='viewport'> element in the HTML <head>. Check its content attribute for: (1) user-scalable=no — disables all zoom; (2) user-scalable=0 — same effect; (3) maximum-scale=1 or maximum-scale=1.0 — limits zoom to the initial scale; (4) any maximum-scale value below 2 — significantly limits zoom range. Flag any of these. Also check CSS for touch-action: none or user-zoom: fixed (CSS Device Adaptation, rarely used) that may limit zoom.
Fix
Remove user-scalable=no and maximum-scale=1 from the viewport meta tag. The correct viewport meta tag for a responsive site is: <meta name='viewport' content='width=device-width, initial-scale=1'>. If maximum-scale was set for a specific reason (e.g., to prevent unintended zoom on input focus on iOS), the correct fix is to set form input font-size: 1rem (16px) instead — iOS Safari only auto-zooms on input focus when font-size is below 16px.
Explain
WCAG 2.1 SC 1.4.4 (Resize Text, Level AA) requires that text can be resized up to 200% without loss of content or functionality, except for captions and images of text. On mobile devices, pinch-to-zoom and the browser's built-in text size settings are the primary mechanisms for resizing text. Setting user-scalable=no or maximum-scale=1 in the viewport meta tag disables pinch-to-zoom entirely (or limits it to 1x), preventing low-vision users from enlarging content. This is a direct violation of SC 1.4.4. While iOS 10+ Safari ignores these settings, Android browsers, Chrome for iOS, and older iOS versions do not — so the setting must be removed regardless.
Code Review
Review stylesheets, component styles, and responsive states related to Do not disable pinch zoom. 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/accessibility/viewport-zoom
よくある質問
正しいviewportの設定はどれですか?
このスキルは、width=device-width, initial-scale=1を勧めています。
iPhoneはuser-scalable=noを無視しますか?
このスキルによると、iOS 10以降のSafariではこれを無視しますが、他のブラウザーや古いiOSのバージョンでは今も尊重されます。
ズームはどのガイドラインに関係していますか?
このスキルは、テキストのサイズ変更に関するWCAG 2.1の達成基準1.4.4を挙げています。
詳細
作者による元の説明
Use when applies to any `<meta name='viewport'>` element in HTML documents. Check the `content` attribute for `user-scalable=no`, `user-scalable=0`, `maximum-scale=1`, or `maximum-scale` values less than 2. This is a common mistake in mobile-first templates and CSS frameworks.
人気
- GitHubのスター
- 75k
- ランキング
- #3078
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。