| name | description | license | metadata | ||||||
|---|---|---|---|---|---|---|---|---|---|
mobile-optimization |
Validates viewport meta configuration, responsive design, font sizes, touch target sizes, and mobile-hostile patterns. Use when checking mobile-friendliness or fixing mobile rendering issues.
|
MIT |
|
Audit the page for mobile-friendliness.
| Check | Status |
|---|---|
Missing <meta name="viewport"> |
❌ FAIL "Page will not render correctly on mobile" |
Present but missing width=device-width |
|
Contains user-scalable=no or maximum-scale=1 |
|
| Properly configured | ✅ PASS |
Scan all elements with inline style="..." for width: Npx:
- If any element has
width > 500px→⚠️ WARN "May cause horizontal scrolling on mobile" - Report the count of offending elements
Scan inline styles for font-size: Npx:
- If any element has
font-size < 12px→⚠️ WARN "Difficult to read on mobile" - Report the count
Check interactive elements (<a>, <button>, <input type="submit">, <input type="button">) with inline height style:
- If
height < 48px→⚠️ WARN "Too small for touch targets" - Minimum recommended: 48px × 48px (per Google's mobile-friendly guidelines)
- Elements with
overflow-x: hiddenoroverflow: hidden→⚠️ WARN "Verify content is not clipped on mobile"
<link rel="stylesheet" media="...">found → ✅ PASS "Media-query-specific stylesheets found"
- If > 2
<table>elements →⚠️ WARN "Tables can be difficult to read on mobile. Consider responsive table patterns"
- If no inline styles are present, skip fixed-width and font-size checks
- CSS-in-JS frameworks (styled-components, Emotion) embed styles at runtime — these cannot be audited from static HTML alone; note this limitation
- Elements with
display: noneorvisibility: hiddenshould be excluded from touch target checks - AMP pages have their own viewport rules — flag but do not fail if AMP boilerplate is detected
- PWA splash screens and app-shell patterns may intentionally use
user-scalable=no— flag as⚠️ WARN but note context