ux-foundations

Use this skill whenever the user mentions UX, UI, interface design, user experience, usability, accessibility, design systems, Nielsen heuristics, WCAG, color contrast, typography scale, spacing, or any question about how an interface should look, feel, or behave. Also use it when designing, reviewing, or auditing any interface — even if the user doesn't explicitly say "UX". This is the foundational knowledge base that underpins all other ux-expert skills. When in doubt about whether UX principles apply, they do — load this skill.

UX Foundations

This skill provides the core UX knowledge base that underpins all interface design work. It covers four pillars:

  1. Usability Heuristics -- Nielsen's 10 principles for evaluating any interface
  2. UX Psychology -- Cognitive laws governing how users perceive, decide, and act
  3. Accessibility (WCAG 2.2 AA) -- Requirements for inclusive, standards-compliant interfaces
  4. Design System Fundamentals -- Spacing, typography, color, and layout specifications

Apply these foundations universally -- they hold true for SaaS dashboards, landing pages, admin portals, mobile apps, and any web-based interface.


Nielsen's 10 Usability Heuristics (Quick Reference)

#HeuristicCore Rule
1Visibility of system statusAlways inform users about what is happening through timely, appropriate feedback.
2Match between system and real worldUse language, concepts, and conventions familiar to the user, not internal jargon.
3User control and freedomProvide undo, redo, cancel, and clear exit paths -- users will make mistakes.
4Consistency and standardsFollow platform conventions; identical actions must produce identical results everywhere.
5Error preventionDesign constraints and confirmations that prevent errors before they occur.
6Recognition rather than recallMake elements, actions, and options visible so users never need to memorize.
7Flexibility and efficiency of useOffer shortcuts and customization for experts without confusing novices.
8Aesthetic and minimalist designRemove every element that does not serve a clear purpose; information competes for attention.
9Help users recognize, diagnose, and recover from errorsWrite error messages in plain language, identify the problem specifically, and suggest a fix.
10Help and documentationProvide searchable, task-focused help that is easy to find and contextually relevant.

Full details with violation examples, good implementation examples, and checkable audit items: see references/nielsen-heuristics.md


Key UX Psychology Laws (Quick Reference)

LawCore Rule
Fitts's LawMake targets large and close to the user's focus area -- time to reach a target depends on its size and distance. Min touch target: 44x44px (WCAG), 48x48px (Material).
Hick's LawLimit choices to reduce decision time -- keep primary navigation to 5-7 items, use progressive disclosure, and break complex decisions into sequential steps.
Miller's LawWorking memory holds 7 +/- 2 items -- chunk information into groups of 3-4, limit steps in wizards, and use external memory aids.
Cognitive Load TheoryMinimize extraneous load (visual clutter, inconsistency), simplify intrinsic load (break tasks into steps), and maximize germane load (use familiar patterns to aid learning).
Gestalt PrinciplesUsers perceive visual groups based on proximity, similarity, closure, continuity, figure-ground, common region, and symmetry -- use these to structure layouts.
Von Restorff EffectAn item that stands out from its group is more likely to be remembered -- use visual distinction for primary CTAs and critical information.
Jakob's LawUsers spend most of their time on other sites and expect similar patterns -- follow established conventions rather than reinventing interactions.

Full details with specific measurements, UI applications, and examples: see references/psychology-laws.md


UX Scoring Rubric (Quick Reference)

Score each dimension from 1 (poor) to 10 (excellent). Global score = sum of 10 dimensions (max 100).

Dimension1-3 (Poor)4-6 (Adequate)7-10 (Excellent)
NavigationUsers cannot find core featuresUsers find features with some searchingUsers find everything instantly
ClarityUsers do not understand what to doUsers figure it out with effortIntent is immediately clear
FeedbackNo response to user actionsBasic loading/success statesRich, contextual feedback for every action
Error HandlingErrors cause data loss or dead endsErrors caught with generic messagesErrors prevented, with specific recovery guidance
ConsistencyEvery page feels like a different appMost patterns are consistentComplete pattern consistency throughout
AccessibilityKeyboard unusable, no alt textPartial WCAG complianceFull WCAG 2.2 AA compliance
PerformanceLCP > 5s, significant CLSLCP 2.5-4s, some layout shiftLCP < 2.5s, CLS < 0.1, FID < 100ms
MobileBroken on mobileFunctional but awkward on mobileNative-quality mobile experience
Visual DesignCluttered, no hierarchyClean with some hierarchy issuesClear hierarchy, purposeful whitespace, polished
ContentJargon-heavy, unclearMostly clear, some jargonScannable, user-centered, helpful
  • Below 60/100 = Critical attention needed
  • 60-80/100 = Solid foundation with room for improvement
  • Above 80/100 = Strong UX

When auditing, score each dimension independently and include a 1-sentence justification per score.


Core Accessibility Requirements (WCAG 2.2 AA)

Apply these four requirements to every interface without exception:

1. Color Contrast

  • Normal text (under 18px bold or 24px regular): minimum 4.5:1 contrast ratio
  • Large text (18px+ bold or 24px+ regular): minimum 3:1 contrast ratio
  • Non-text UI elements (icons, borders, form controls): minimum 3:1 contrast ratio
  • Never use color as the sole means of conveying information -- always pair with text, icons, or patterns

2. Touch and Click Targets

  • Minimum target size: 44x44 CSS pixels (WCAG 2.2), 48x48px recommended (Material Design)
  • Minimum spacing between adjacent targets: 8px
  • Place primary actions in the thumb zone (lower third of mobile screens)

3. Keyboard Navigation

  • All functionality must be operable via keyboard alone
  • Focus indicator must be visible: minimum 2px outline with 3:1 contrast against adjacent colors
  • Focus order must follow logical visual reading order
  • No keyboard traps -- users must be able to Tab away from every element
  • Provide a skip-navigation link as the first focusable element

4. Screen Reader Support

  • All images require alt text (decorative images use alt="")
  • Form inputs must have associated <label> elements or aria-labelledby
  • Dynamic content updates require aria-live regions
  • Use semantic HTML (<nav>, <main>, <section>, <header>, <footer>) as the foundation
  • Custom interactive components require appropriate ARIA roles, states, and properties

Complete WCAG 2.2 AA checklist with POUR principles, ARIA patterns, and screen reader considerations: see references/accessibility-wcag.md


Design System Essentials

Spacing Grid (4pt base)

Use multiples of 4px for all spacing, padding, and margin values: 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96

  • Tight (4-8px): icon-to-label gaps, inline element spacing
  • Default (12-16px): form label to input, component internal padding
  • Loose (24-32px): between components within a section
  • Section (48-96px): between major page sections

Typography Scale

Base size: 16px body text. Apply a modular scale ratio:

Ratio NameValueBest For
Major Second1.125Dense data UIs
Minor Third1.200Text-heavy SaaS interfaces
Major Third1.250General purpose, versatile
Perfect Fourth1.333Marketing and content sites
Augmented Fourth1.414Editorial, blog layouts
Perfect Fifth1.500Presentation-style layouts
Golden Ratio1.618Landing pages, high drama

Recommended type ramp (px): 12, 14, 16, 18, 20, 24, 30, 36, 48, 60, 72

Limit distinct sizes to 6-8 across the product. Use font weight (regular, medium, semibold, bold) as a secondary hierarchy tool.

Breakpoints

TokenWidthTarget
mobile320pxSmall phones
mobile-lg480pxLarge phones
tablet768pxTablets (portrait)
laptop1024pxSmall desktops, landscape tablets
desktop1280pxStandard desktops
desktop-lg1440pxLarge desktops
wide1920pxFull HD monitors

Complete design system reference with color systems, border radius, shadows, elevation, and z-index scale: see references/design-systems.md


Reference Files

For detailed, audit-ready content on each pillar, consult:

FileContents
references/nielsen-heuristics.mdFull Nielsen's 10 heuristics with violation examples, good examples, and checkable audit items
references/psychology-laws.mdComplete UX psychology laws with specific measurements, UI applications, and cognitive load theory
references/accessibility-wcag.mdFull WCAG 2.2 AA reference with POUR checklists, ARIA patterns, and screen reader guidance
references/design-systems.mdComplete design system specifications with spacing, typography, color, shadows, z-index, and breakpoints