PUBLIC AI SKILL FULL SOURCE INCLUDED

MOBILE RESPONSIVE / REFERENCE

Mobile Testing Guide

Mobile Testing Guide, included with Mike Filsaime's Mobile Responsive skill.

Mobile Testing Guide

Comprehensive guide for testing responsive designs across devices.

Table of Contents

  1. Device Breakpoints
  2. Browser DevTools Testing
  3. Real Device Testing
  4. Common Issues & Fixes
  5. Performance Testing
  6. Accessibility Testing

Device Breakpoints

Priority Test Widths

Width Device Category Example Devices
320px Small phone iPhone SE, older Android
375px Standard phone iPhone 12/13/14, Pixel
414px Large phone iPhone Plus/Max, Galaxy S
768px Tablet portrait iPad, Galaxy Tab
1024px Tablet landscape / Laptop iPad Pro, small laptops
1280px Desktop Standard monitors
1440px Large desktop Large monitors

Must-Pass Widths

At minimum, test these three widths:

  1. 320px - Smallest supported viewport
  2. 768px - Tablet/desktop transition
  3. 1024px - Full desktop

Browser DevTools Testing

Chrome DevTools

  1. Open DevTools: Cmd+Option+I (Mac) or F12 (Windows)
  2. Toggle device toolbar: Cmd+Shift+M (Mac) or Ctrl+Shift+M (Windows)

Essential features:

Pro tips:

Firefox DevTools

  1. Open DevTools: Cmd+Option+I (Mac) or F12 (Windows)
  2. Toggle responsive design mode: Cmd+Option+M (Mac) or Ctrl+Shift+M (Windows)

Unique features:

Safari DevTools

  1. Enable Develop menu: Safari → Preferences → Advanced → "Show Develop menu"
  2. Open inspector: Cmd+Option+I
  3. Enter responsive mode: Develop → Enter Responsive Design Mode

Best for:


Real Device Testing

Why Real Devices Matter

DevTools emulation misses:

Testing Checklist

Touch Interactions:

Text Input:

Orientation:

Safe Areas (for notched devices):

/* Account for notch and home indicator */
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

Cloud Testing Services

For testing without physical devices:


Common Issues & Fixes

Horizontal Scroll

Symptom: Page scrolls left/right unexpectedly

Causes & Fixes:

/* 1. Element wider than viewport */
/* Find the culprit in DevTools: */
* { outline: 1px solid red; }

/* 2. Fixed width on container */
/* Bad: */
.container { width: 1200px; }
/* Good: */
.container { width: 100%; max-width: 1200px; }

/* 3. Negative margins without overflow hidden */
.parent { overflow-x: hidden; }

/* 4. 100vw includes scrollbar width */
/* Bad: */
.full-width { width: 100vw; }
/* Good: */
.full-width { width: 100%; }

/* 5. Nuclear option (use sparingly) */
html, body { overflow-x: hidden; }

iOS Input Zoom

Symptom: Page zooms in when focusing form fields

Fix: Ensure input font-size is 16px or larger:

input, select, textarea {
  font-size: 16px; /* Prevents iOS zoom */
}

iOS Momentum Scrolling

Symptom: Scrollable areas feel choppy on iOS

Fix:

.scrollable {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

Fixed Position Issues on iOS

Symptom: Fixed elements jump when keyboard opens

Fix:

/* Use position: sticky instead when possible */
.header {
  position: sticky;
  top: 0;
}

/* For true fixed positioning, use visual viewport API */

Tap Highlight on Mobile

Symptom: Blue/gray flash when tapping elements

Fix:

button, a {
  -webkit-tap-highlight-color: transparent;
}

/* Or style it intentionally */
button, a {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

Text Too Small

Symptom: Browser complains about tap target/text size

Fix:

body {
  font-size: 16px; /* Minimum for body text */
  line-height: 1.5;
}

small, .text-small {
  font-size: 14px; /* Minimum for any text */
}

Images Not Scaling

Symptom: Images overflow container or distort

Fix:

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* With aspect ratio preservation */
img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

Flexbox Overflow

Symptom: Flex children don't shrink and overflow

Fix:

.flex-child {
  min-width: 0; /* Allow shrinking below content size */
}

/* For text overflow */
.flex-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

Performance Testing

Lighthouse Mobile Audit

  1. Open Chrome DevTools
  2. Go to Lighthouse tab
  3. Select "Mobile" device
  4. Check "Performance" category
  5. Run audit

Target scores:

Core Web Vitals

Test with PageSpeed Insights or web-vitals library:

Metric Good Needs Improvement Poor
LCP ≤ 2.5s ≤ 4.0s > 4.0s
INP ≤ 200ms ≤ 500ms > 500ms
CLS ≤ 0.1 ≤ 0.25 > 0.25

Network Throttling

Test with slow connections:

  1. DevTools → Network tab → Throttling dropdown
  2. Select "Slow 3G" or "Fast 3G"
  3. Reload and observe load times

Performance budget:


Accessibility Testing

Keyboard Navigation

Test without mouse/touch:

Screen Reader Testing

VoiceOver (Mac/iOS):

TalkBack (Android):

Test for:

Color Contrast

Use browser extensions or DevTools:

Chrome DevTools:

  1. Inspect element
  2. Click color swatch
  3. See contrast ratio and suggestions

Touch Target Size

Minimum sizes:

/* Ensure minimum target size */
button, a, input, select {
  min-height: 44px;
  min-width: 44px;
  padding: 12px;
}

Quick Testing Script

Run through this checklist for every page:

[ ] 320px - No horizontal scroll
[ ] 320px - All content visible
[ ] 320px - Text readable (16px+ body)
[ ] 320px - Touch targets 44px+
[ ] 768px - Layout transitions correctly
[ ] 768px - Navigation works
[ ] 1024px - Desktop layout displays
[ ] Forms - No zoom on focus (iOS)
[ ] Forms - Keyboard doesn't cover inputs
[ ] Images - All scale properly
[ ] Performance - LCP < 2.5s
[ ] Accessibility - Keyboard navigable