UX

User experience checks for viewport, images, and touch targets

How it Works

The UX pillar opens your page with Puppeteer and checks for common user experience issues that cause layout shifts, poor mobile usability, or invisible text.

What it Checks

RuleSeverityDescription
ux/viewport-missingseriousPage must have <meta name="viewport">
ux/img-no-dimensionsmoderateImages should have explicit width and height attributes
ux/touch-target-smallmoderateInteractive elements should be at least 44x44px (mobile only)
ux/font-display-missingminor@font-face rules should have font-display property

Touch Target Check

On mobile device emulation, Web Guard measures the bounding box of all interactive elements (a, button, input, select, textarea, [role='button']). Any element smaller than 44x44px is flagged. This check is skipped in desktop mode.

Configuration

json
{
"ux": {
"minScore": 80,
"ignoreSeverities": ["minor"]
}
}