orientation
它能做什么
这个技能检查手机或平板旋转后,网站的内容和控件是否仍然可用。它面向希望每位访客都能访问内容的移动端和前端开发者。
适用场景
- ✓你请智能体检查手机或平板旋转时网站表现如何的时候。
- ✓网站显示“请旋转设备”提示,阻止了内容或表单的时候。
- ✓你在构建可能在平板上使用的全屏流程、仪表板或表单的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/orientation/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的网站要求用户旋转手机,并挡住了页面。请帮我让它在两种方向下都能使用吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会查找方向锁定、旋转设备的遮罩层,以及在某一方向下隐藏功能的布局。它会去掉这些阻碍,并用响应式 CSS 调整布局,让旋转后一切都能正常使用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Support both portrait and landscape orientation
Many users mount devices to wheelchairs, use tablets on stands, or cannot easily rotate a device. If a site only works in one orientation, these users may lose access to content or critical actions entirely.
Quick Reference
- Do not lock the interface to portrait-only or landscape-only unless the task truly requires it
- Ensure all core content and controls remain usable after device rotation
- Use responsive layouts that adapt instead of hiding functionality in one orientation
- If a specific orientation is essential, explain why and provide the best available alternative
Check
Rotate the page between portrait and landscape on mobile and tablet viewports. Verify all primary content, navigation, forms, and interactive controls remain available and usable in both orientations. Flag any use of orientation locks, rotate-device overlays that block content, or layouts that hide essential functionality in one orientation.
Fix
Remove orientation locks and redesign the layout to work in both portrait and landscape. Use responsive CSS, wrapping layouts, and adaptive spacing instead of blocking content behind a rotate-device message. Only keep an orientation requirement if the task is genuinely orientation-essential.
Explain
Explain why WCAG requires content to support both portrait and landscape unless orientation is essential to the activity, and how orientation locks can block users who cannot rotate their devices.
Code Review
Review responsive layouts, viewport handling, overlays, and any JavaScript related to device rotation. Flag exact selectors, components, or route states that require one orientation, hide essential content after rotation, or show blocking rotate-device messages instead of adapting the layout.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/accessibility/orientation
常见问题
方向对无障碍为什么重要?
这个技能指出,有些用户会把设备固定在轮椅上或支架上的平板,他们可能无法旋转设备。
只允许横屏或只允许竖屏的布局有没有可以接受的情况?
这个技能说,只有当任务确实需要时才保留单一方向,并且要说明原因。
智能体应该如何检查结果?
这个技能建议在手机和平板尺寸下,分别检查竖屏和横屏的实际表现。
详情
作者的原始描述
Use when reviewing mobile-first layouts, tablet experiences, fullscreen flows, forms, dashboards, or media interfaces. Check rendered behavior in both portrait and landscape and separate genuine layout constraints from unnecessary orientation assumptions.
热度
- GitHub 星标
- 75k
- 排名
- #2964
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。