qfai 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/init/.qfai/assistant/skills/qfai-discussion/references/ui_ux_best_practices.md +1066 -0
- package/dist/cli/index.cjs +2308 -224
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.mjs +2298 -214
- package/dist/cli/index.mjs.map +1 -1
- package/dist/index.cjs +2089 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.mjs +2089 -23
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1066 @@
|
|
|
1
|
+
# UI/UX Best Practices Reference (QFAI Discussion Pack)
|
|
2
|
+
|
|
3
|
+
This document is a comprehensive reference for UI/UX design principles, platform-specific guidelines, anti-patterns, and audit frameworks. It serves as input for QFAI's quality assurance processes across Web, Desktop (Windows/macOS), and Mobile (iOS/Android) platforms.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
1. [Universal UI/UX Design Principles](#1-universal-uiux-design-principles)
|
|
10
|
+
2. [Platform-Specific Guidelines](#2-platform-specific-guidelines)
|
|
11
|
+
3. [Screen Design Best Practices](#3-screen-design-best-practices)
|
|
12
|
+
4. [Navigation and Information Architecture](#4-navigation-and-information-architecture)
|
|
13
|
+
5. [Interaction Design](#5-interaction-design)
|
|
14
|
+
6. [Accessibility (WCAG 2.2)](#6-accessibility-wcag-22)
|
|
15
|
+
7. [Anti-Patterns](#7-anti-patterns)
|
|
16
|
+
8. [UI/UX Specification Formats](#8-uiux-specification-formats)
|
|
17
|
+
9. [Review and Audit Frameworks](#9-review-and-audit-frameworks)
|
|
18
|
+
10. [Emerging Trends (2025-2026)](#10-emerging-trends-2025-2026)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Universal UI/UX Design Principles
|
|
23
|
+
|
|
24
|
+
### 1.1 Nielsen's 10 Usability Heuristics
|
|
25
|
+
|
|
26
|
+
#### H1: Visibility of System Status
|
|
27
|
+
|
|
28
|
+
- **Description**: The system should always keep users informed about what is going on through appropriate feedback within reasonable time.
|
|
29
|
+
- **Impact**: Without status visibility, users feel uncertain, repeat actions, or abandon tasks. Trust erodes when the system appears unresponsive.
|
|
30
|
+
- **How to verify**: (a) Every user action produces visible feedback within 100ms. (b) Long operations show progress indicators. (c) State changes (save, submit, delete) confirm completion. (d) Network/loading states are clearly communicated.
|
|
31
|
+
- **Common violations**: Silent form submissions; no loading indicator during API calls; background saves without confirmation; stale data displayed without staleness indicator.
|
|
32
|
+
|
|
33
|
+
#### H2: Match Between System and the Real World
|
|
34
|
+
|
|
35
|
+
- **Description**: The system should speak the user's language with words, phrases, and concepts familiar to the user rather than system-oriented terms. Follow real-world conventions, making information appear in a natural and logical order.
|
|
36
|
+
- **Impact**: Jargon and unfamiliar metaphors increase cognitive load and error rates. Users must translate system language into their mental model.
|
|
37
|
+
- **How to verify**: (a) Labels use domain terminology, not technical jargon. (b) Icons follow established conventions. (c) Data ordering matches user expectations (chronological, alphabetical, priority). (d) Metaphors are consistent and culturally appropriate.
|
|
38
|
+
- **Common violations**: Error codes displayed raw (e.g., "ERR_4012"); file system paths shown to non-technical users; "Submit" instead of domain-appropriate action verbs; sort order that does not match user expectations.
|
|
39
|
+
|
|
40
|
+
#### H3: User Control and Freedom
|
|
41
|
+
|
|
42
|
+
- **Description**: Users often choose system functions by mistake and need a clearly marked "emergency exit" to leave the unwanted state without having to go through an extended dialogue. Support undo and redo.
|
|
43
|
+
- **Impact**: Without escape routes, users feel trapped and anxious. Irreversible actions cause data loss and erode confidence.
|
|
44
|
+
- **How to verify**: (a) Undo/redo is available for destructive actions. (b) Dialogs have clear cancel/close options. (c) Multi-step flows allow back navigation. (d) Accidental deletions are recoverable (soft delete or confirmation).
|
|
45
|
+
- **Common violations**: No undo after delete; modals without close button; wizard flows without back button; auto-save without version history; forced completion of multi-step flows.
|
|
46
|
+
|
|
47
|
+
#### H4: Consistency and Standards
|
|
48
|
+
|
|
49
|
+
- **Description**: Users should not have to wonder whether different words, situations, or actions mean the same thing. Follow platform conventions.
|
|
50
|
+
- **Impact**: Inconsistency increases learning time and error rates. Users transfer expectations from one part of the UI to another.
|
|
51
|
+
- **How to verify**: (a) Same action uses same label/icon everywhere. (b) Component behavior is uniform (e.g., all dropdowns behave identically). (c) Platform conventions are followed (e.g., primary action placement). (d) Design tokens are applied consistently.
|
|
52
|
+
- **Common violations**: "Save" vs. "Submit" vs. "Apply" for the same action; inconsistent icon meanings; primary button color varies across screens; different date formats on different pages.
|
|
53
|
+
|
|
54
|
+
#### H5: Error Prevention
|
|
55
|
+
|
|
56
|
+
- **Description**: Even better than good error messages is a careful design that prevents a problem from occurring in the first place. Either eliminate error-prone conditions or present users with a confirmation option before they commit to the action.
|
|
57
|
+
- **Impact**: Prevention reduces support costs, user frustration, and data corruption.
|
|
58
|
+
- **How to verify**: (a) Destructive actions require confirmation. (b) Input fields have appropriate constraints (type, range, format). (c) Defaults are safe. (d) Ambiguous actions are disambiguated. (e) Real-time validation prevents submission of invalid data.
|
|
59
|
+
- **Common violations**: Delete button adjacent to edit button without confirmation; free-text fields where structured input is possible; no character limits; allowing submission of incomplete forms.
|
|
60
|
+
|
|
61
|
+
#### H6: Recognition Rather Than Recall
|
|
62
|
+
|
|
63
|
+
- **Description**: Minimize the user's memory load by making objects, actions, and options visible. The user should not have to remember information from one part of the dialogue to another.
|
|
64
|
+
- **Impact**: Recall-dependent interfaces slow users down and increase errors, especially for infrequent users.
|
|
65
|
+
- **How to verify**: (a) Context is preserved across screens (breadcrumbs, headers). (b) Recently used items are surfaced. (c) Input fields show format hints. (d) Related information is co-located. (e) Search supports auto-complete.
|
|
66
|
+
- **Common violations**: Requiring users to memorize IDs to enter elsewhere; no breadcrumbs in deep navigation; empty search without suggestions; form fields without placeholder/format hints.
|
|
67
|
+
|
|
68
|
+
#### H7: Flexibility and Efficiency of Use
|
|
69
|
+
|
|
70
|
+
- **Description**: Accelerators -- unseen by the novice user -- may speed up the interaction for the expert user such that the system can cater to both inexperienced and experienced users.
|
|
71
|
+
- **Impact**: Power users become frustrated without shortcuts; novice users are overwhelmed by too many options.
|
|
72
|
+
- **How to verify**: (a) Keyboard shortcuts exist for frequent actions. (b) Customizable workflows or preferences exist. (c) Bulk actions are available. (d) Search and filtering support advanced syntax. (e) Default flows are simple but expandable.
|
|
73
|
+
- **Common violations**: No keyboard shortcuts; no bulk operations; inability to customize dashboards; search that only supports exact match; no "recent items" for frequent tasks.
|
|
74
|
+
|
|
75
|
+
#### H8: Aesthetic and Minimalist Design
|
|
76
|
+
|
|
77
|
+
- **Description**: Dialogues should not contain information that is irrelevant or rarely needed. Every extra unit of information in a dialogue competes with the relevant units and diminishes their relative visibility.
|
|
78
|
+
- **Impact**: Visual noise increases scan time and reduces task completion rates. Information overload leads to decision paralysis.
|
|
79
|
+
- **How to verify**: (a) Each screen element serves a clear purpose. (b) Progressive disclosure hides advanced options. (c) White space is used effectively. (d) Content density is appropriate for the platform (desktop denser than mobile).
|
|
80
|
+
- **Common violations**: Dashboard with 20+ widgets; settings page showing all options at once; gratuitous animations; decorative elements that compete with functional elements; redundant labels.
|
|
81
|
+
|
|
82
|
+
#### H9: Help Users Recognize, Diagnose, and Recover from Errors
|
|
83
|
+
|
|
84
|
+
- **Description**: Error messages should be expressed in plain language (no codes), precisely indicate the problem, and constructively suggest a solution.
|
|
85
|
+
- **Impact**: Poor error messages leave users stranded. Clear recovery paths reduce abandonment and support requests.
|
|
86
|
+
- **How to verify**: (a) Error messages use plain language. (b) Messages indicate what went wrong AND what to do next. (c) Errors appear inline near the source. (d) Severity is visually differentiated (warning vs. error). (e) Retry mechanisms are available.
|
|
87
|
+
- **Common violations**: "An error occurred" with no detail; error toast that disappears before reading; validation errors shown only at top of form; technical stack traces shown to users; no retry button on transient failures.
|
|
88
|
+
|
|
89
|
+
#### H10: Help and Documentation
|
|
90
|
+
|
|
91
|
+
- **Description**: Even though it is better if the system can be used without documentation, it may be necessary to provide help and documentation. Any such information should be easy to search, focused on the user's task, list concrete steps to be carried out, and not be too large.
|
|
92
|
+
- **Impact**: Missing help increases support costs and user frustration. Excessive documentation is never read.
|
|
93
|
+
- **How to verify**: (a) Contextual help is available (tooltips, inline help). (b) Help is searchable. (c) Onboarding flows exist for new users. (d) Documentation is task-oriented, not feature-oriented. (e) Empty states include guidance.
|
|
94
|
+
- **Common violations**: No tooltips on complex fields; help pages only accessible from a separate site; no onboarding for first-time users; empty states showing only "no data"; FAQ-only help without task-based guides.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### 1.2 Gestalt Principles Applied to UI
|
|
99
|
+
|
|
100
|
+
#### Proximity
|
|
101
|
+
|
|
102
|
+
- **Description**: Elements placed close together are perceived as related.
|
|
103
|
+
- **Impact**: Proper grouping reduces cognitive load; poor grouping causes misassociation.
|
|
104
|
+
- **How to verify**: Related form fields are grouped; labels are closer to their fields than to adjacent fields; section spacing is larger than intra-section spacing.
|
|
105
|
+
- **Common violations**: Label equidistant between two fields; action buttons not clearly associated with their content section; inconsistent spacing between related/unrelated items.
|
|
106
|
+
|
|
107
|
+
#### Similarity
|
|
108
|
+
|
|
109
|
+
- **Description**: Elements sharing visual characteristics (color, shape, size) are perceived as related.
|
|
110
|
+
- **Impact**: Consistent visual treatment helps users categorize and predict behavior.
|
|
111
|
+
- **How to verify**: Interactive elements share consistent styling; status indicators use a coherent color system; similar functions look similar.
|
|
112
|
+
- **Common violations**: Links styled inconsistently (some blue, some not underlined); different button styles for same-level actions; status colors used inconsistently.
|
|
113
|
+
|
|
114
|
+
#### Continuity
|
|
115
|
+
|
|
116
|
+
- **Description**: The eye follows the smoothest path and groups elements along a line or curve.
|
|
117
|
+
- **Impact**: Proper alignment creates visual flow; misalignment creates visual noise.
|
|
118
|
+
- **How to verify**: Elements align to a grid; text blocks share alignment; visual flow guides the eye to the primary action.
|
|
119
|
+
- **Common violations**: Ragged left edges; centered text mixed with left-aligned text; elements that break grid alignment without purpose.
|
|
120
|
+
|
|
121
|
+
#### Closure
|
|
122
|
+
|
|
123
|
+
- **Description**: The brain completes incomplete shapes, perceiving closed forms even when parts are missing.
|
|
124
|
+
- **Impact**: Cards, containers, and borders can be implied rather than explicitly drawn.
|
|
125
|
+
- **How to verify**: Containers use consistent boundary treatment; implied groupings are unambiguous; icons are recognizable even when simplified.
|
|
126
|
+
- **Common violations**: Ambiguous card boundaries on low-contrast backgrounds; icon designs that are too abstract to recognize.
|
|
127
|
+
|
|
128
|
+
#### Figure-Ground
|
|
129
|
+
|
|
130
|
+
- **Description**: Users instinctively separate foreground elements from background.
|
|
131
|
+
- **Impact**: Proper use of elevation and contrast establishes visual hierarchy.
|
|
132
|
+
- **How to verify**: Modals clearly separate from background (overlay); primary content stands out from secondary; interactive elements are distinguishable from decorative.
|
|
133
|
+
- **Common violations**: Modals without background overlay; cards that blend into background; disabled states that look identical to enabled states.
|
|
134
|
+
|
|
135
|
+
#### Common Region
|
|
136
|
+
|
|
137
|
+
- **Description**: Elements within a shared boundary are perceived as a group.
|
|
138
|
+
- **Impact**: Cards, panels, and sections leverage this to organize content.
|
|
139
|
+
- **How to verify**: Related content is enclosed; boundaries are consistent; nesting depth is limited and clear.
|
|
140
|
+
- **Common violations**: Content outside its visual container; inconsistent card styling; over-nested containers creating confusion.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### 1.3 Cognitive Psychology Laws
|
|
145
|
+
|
|
146
|
+
#### Fitts's Law
|
|
147
|
+
|
|
148
|
+
- **Description**: The time to acquire a target is a function of the distance to and size of the target. Larger and closer targets are faster to reach.
|
|
149
|
+
- **Impact**: Directly affects task completion speed and error rates for pointer/touch interactions.
|
|
150
|
+
- **How to verify**: (a) Primary actions have large click/tap targets (min 44x44 CSS px web, 48x48dp Android, 44x44pt iOS). (b) Destructive actions are not adjacent to frequent actions. (c) Important controls are near likely cursor/thumb positions. (d) Corner/edge targeting is exploited on desktop (e.g., menu bars at screen edge).
|
|
151
|
+
- **Common violations**: Tiny icon-only buttons; close-together "Delete" and "Edit" buttons; mobile nav items in hard-to-reach screen corners; action links in dense text paragraphs.
|
|
152
|
+
|
|
153
|
+
#### Hick's Law (Hick-Hyman Law)
|
|
154
|
+
|
|
155
|
+
- **Description**: The time to make a decision increases logarithmically with the number of choices.
|
|
156
|
+
- **Impact**: Too many options cause decision paralysis and increase task time.
|
|
157
|
+
- **How to verify**: (a) Menu items are limited per level (7 plus or minus 2 as a guideline, not a rule). (b) Progressive disclosure is used. (c) Defaults are provided for common choices. (d) Search/filter is available for large option sets.
|
|
158
|
+
- **Common violations**: Dropdown with 50+ unstructured items; navigation with 15+ top-level items; settings page with all options visible; action menus with 20+ items.
|
|
159
|
+
|
|
160
|
+
#### Miller's Law
|
|
161
|
+
|
|
162
|
+
- **Description**: The average person can hold approximately 7 (plus or minus 2) items in working memory.
|
|
163
|
+
- **Impact**: Chunking information aids comprehension; exceeding memory limits causes errors.
|
|
164
|
+
- **How to verify**: (a) Information is chunked (e.g., phone numbers as 123-456-7890). (b) Lists are grouped or categorized. (c) Step counts in wizards are manageable (ideally 3-5 steps). (d) Dashboard metrics are prioritized, not exhaustive.
|
|
165
|
+
- **Common violations**: Long unstructured lists; 15-step wizards; ungrouped navigation; raw data without summarization.
|
|
166
|
+
|
|
167
|
+
#### Jakob's Law
|
|
168
|
+
|
|
169
|
+
- **Description**: Users spend most of their time on other sites/apps. They prefer your interface to work the same way as all the other interfaces they already know.
|
|
170
|
+
- **Impact**: Novel interaction patterns require learning. Familiar patterns leverage existing knowledge.
|
|
171
|
+
- **How to verify**: (a) Standard UI patterns are used (shopping cart icon, hamburger menu, swipe to delete). (b) Platform conventions are followed. (c) Innovation is reserved for core differentiators, not basic interactions.
|
|
172
|
+
- **Common violations**: Custom scrollbar behavior; non-standard navigation placement; reinventing the date picker; unconventional gesture mappings.
|
|
173
|
+
|
|
174
|
+
#### Doherty Threshold
|
|
175
|
+
|
|
176
|
+
- **Description**: Productivity soars when a system and its users interact at a pace (<400ms response time) that ensures neither has to wait on the other.
|
|
177
|
+
- **Impact**: Response times above 400ms break flow state; above 1s users notice delay; above 10s users abandon.
|
|
178
|
+
- **How to verify**: (a) UI responses are under 100ms for direct manipulation (typing, dragging). (b) System responses are under 400ms for most actions. (c) Operations exceeding 1s show progress indicators. (d) Perceived performance is optimized (skeleton screens, optimistic updates).
|
|
179
|
+
- **Common violations**: No loading state for API calls; blocking UI during computation; no skeleton screens; spinner-only feedback for long operations.
|
|
180
|
+
|
|
181
|
+
#### Peak-End Rule
|
|
182
|
+
|
|
183
|
+
- **Description**: Users judge an experience largely based on how they felt at its most intense point (peak) and at its end, rather than on the average of every moment.
|
|
184
|
+
- **Impact**: A frustrating peak moment or a bad ending overshadows an otherwise good experience.
|
|
185
|
+
- **How to verify**: (a) Error/failure moments include graceful recovery. (b) Completion/success moments are celebrated (confirmation, summary). (c) Onboarding starts and ends positively. (d) Critical pain points in the flow are identified and addressed.
|
|
186
|
+
- **Common violations**: Form submission that silently redirects without confirmation; error pages with no guidance; abrupt session timeout without warning; payment flow that ends with a technical error page.
|
|
187
|
+
|
|
188
|
+
#### Aesthetic-Usability Effect
|
|
189
|
+
|
|
190
|
+
- **Description**: Users perceive aesthetically pleasing designs as more usable, even when they are not objectively so. Visual design creates a positive first impression that increases tolerance for minor usability issues.
|
|
191
|
+
- **Impact**: Attractive interfaces increase trust, engagement, and perceived quality. However, aesthetics must not mask genuine usability problems.
|
|
192
|
+
- **How to verify**: (a) Visual design is polished and consistent. (b) Typography, color, and spacing follow a coherent system. (c) Aesthetics complement rather than compete with functionality. (d) User testing validates actual usability, not just preference.
|
|
193
|
+
- **Common violations**: Beautiful but unusable interfaces; sacrificing readability for visual style; animation that delays interaction; form-over-function design decisions.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### 1.4 Don Norman's Design Principles
|
|
198
|
+
|
|
199
|
+
#### Affordance
|
|
200
|
+
|
|
201
|
+
- **Description**: The properties of an object that suggest how it can be used. A button affords pressing; a slider affords dragging.
|
|
202
|
+
- **Impact**: Strong affordances reduce learning time; weak affordances cause confusion.
|
|
203
|
+
- **How to verify**: Interactive elements look interactive (buttons look pressable, links look clickable); non-interactive elements do not look interactive.
|
|
204
|
+
- **Common violations**: Flat text that is actually a link; cards that look clickable but are not; decorative elements that look interactive; ghost buttons that look like labels.
|
|
205
|
+
|
|
206
|
+
#### Signifiers
|
|
207
|
+
|
|
208
|
+
- **Description**: Indicators that communicate where, how, and what action should be taken. Signifiers tell users what to do.
|
|
209
|
+
- **Impact**: Even when affordances exist, users need signals about how to use them.
|
|
210
|
+
- **How to verify**: Hover states, cursor changes, visual cues for drag handles, scroll indicators, tooltip triggers are all present.
|
|
211
|
+
- **Common violations**: No hover state on clickable elements; no visual cue for scrollable areas; drag-and-drop without handle indicators; swipe actions without hints.
|
|
212
|
+
|
|
213
|
+
#### Mapping
|
|
214
|
+
|
|
215
|
+
- **Description**: The relationship between controls and their effects. Good mapping provides clear correspondence.
|
|
216
|
+
- **Impact**: Natural mapping (spatial, cultural) reduces errors and learning time.
|
|
217
|
+
- **How to verify**: (a) Scroll direction matches content movement. (b) Slider direction matches value increase. (c) Control proximity to the thing it affects is close. (d) Toggle state visually matches the controlled state.
|
|
218
|
+
- **Common violations**: Toggle label that does not clearly indicate on/off state; volume slider that goes right-to-left; remote controls far from the item they control; settings that affect a different screen with no indication.
|
|
219
|
+
|
|
220
|
+
#### Feedback
|
|
221
|
+
|
|
222
|
+
- **Description**: Every action should produce an immediate and obvious result that communicates the system's state.
|
|
223
|
+
- **Impact**: Without feedback, users do not know if their action worked, leading to repeated actions or abandonment.
|
|
224
|
+
- **How to verify**: Click/tap produces visual response; form submission shows result; state changes are communicated; errors are immediately visible.
|
|
225
|
+
- **Common violations**: Button with no visual press state; form that submits without confirmation; background process with no indicator; toggle that changes database state without visual acknowledgment.
|
|
226
|
+
|
|
227
|
+
#### Constraints
|
|
228
|
+
|
|
229
|
+
- **Description**: Limiting the range of possible actions to prevent errors. Physical, logical, semantic, and cultural constraints all apply.
|
|
230
|
+
- **Impact**: Good constraints make errors impossible rather than merely recoverable.
|
|
231
|
+
- **How to verify**: Input fields restrict invalid values (date pickers instead of free text); disabled states prevent invalid actions; form structure prevents illogical combinations.
|
|
232
|
+
- **Common violations**: Free-text date entry; allowing negative quantities in a cart; enabling "Submit" when required fields are empty; allowing conflicting filter combinations.
|
|
233
|
+
|
|
234
|
+
#### Conceptual Models
|
|
235
|
+
|
|
236
|
+
- **Description**: The user's understanding of how a system works. Good design creates accurate mental models.
|
|
237
|
+
- **Impact**: Mismatched mental models cause persistent, systematic errors.
|
|
238
|
+
- **How to verify**: (a) System behavior matches user expectations. (b) Metaphors are consistent. (c) Feedback reinforces the correct model. (d) Terminology is consistent with the model.
|
|
239
|
+
- **Common violations**: "Save" that does not persist data (draft behavior); "Delete" that actually archives; folder metaphor but flat storage behind the scenes; copy behavior that creates references instead of duplicates.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## 2. Platform-Specific Guidelines
|
|
244
|
+
|
|
245
|
+
### 2.1 Web
|
|
246
|
+
|
|
247
|
+
#### Material Design 3 (Google)
|
|
248
|
+
|
|
249
|
+
- **Description**: Google's design system emphasizing dynamic color, adaptive layouts, and updated component library.
|
|
250
|
+
- **Key principles**: Personalization via dynamic color theming; responsive layouts with canonical breakpoints (compact <600dp, medium 600-839dp, expanded 840dp+); emphasis on large touch targets; elevation through tonal surface colors rather than drop shadows.
|
|
251
|
+
- **How to verify**: (a) Color tokens use Material 3 roles (primary, secondary, tertiary, surface, on-surface, etc.). (b) Components follow M3 specs (FAB, Navigation Rail, Top App Bar). (c) Typography uses M3 type scale (display, headline, title, body, label). (d) Shape system uses M3 corner definitions.
|
|
252
|
+
- **Common violations**: Mixing M2 and M3 component styles; not using dynamic color; ignoring tonal elevation; fixed layouts without responsive adaptation.
|
|
253
|
+
|
|
254
|
+
#### WCAG 2.2 AA/AAA
|
|
255
|
+
|
|
256
|
+
- **Description**: Web Content Accessibility Guidelines version 2.2 define success criteria for web accessibility.
|
|
257
|
+
- **AA requirements** (minimum): Contrast ratio 4.5:1 for normal text, 3:1 for large text; keyboard operability for all functionality; focus indicators visible; text resizable to 200% without loss; target size minimum 24x24 CSS px (SC 2_5_8 AA).
|
|
258
|
+
- **AAA requirements** (enhanced): Contrast ratio 7:1 for normal text, 4.5:1 for large text; target size minimum 44x44 CSS px; sign language for multimedia; extended audio descriptions.
|
|
259
|
+
- **How to verify**: Automated tools (axe, Lighthouse) for detectable issues; manual testing for keyboard navigation, screen reader flow, cognitive accessibility.
|
|
260
|
+
- **Common violations**: Insufficient color contrast; missing alt text; inaccessible custom components; focus traps; missing skip navigation links; non-descriptive link text ("click here").
|
|
261
|
+
|
|
262
|
+
#### Apple HIG (Web)
|
|
263
|
+
|
|
264
|
+
- **Description**: Apple's Human Interface Guidelines for web content accessed via Safari and WebKit-based browsers.
|
|
265
|
+
- **Key principles**: Respect system appearance (dark mode); support Dynamic Type equivalents; avoid custom controls that break platform expectations; support touch and pointer input.
|
|
266
|
+
- **How to verify**: CSS supports prefers-color-scheme; touch targets are adequate; viewport meta tag is properly set; no hover-only interactions on touch devices.
|
|
267
|
+
|
|
268
|
+
### 2.2 Mobile
|
|
269
|
+
|
|
270
|
+
#### iOS Human Interface Guidelines (Apple)
|
|
271
|
+
|
|
272
|
+
- **Key principles**: Clarity (text is legible at every size, icons are precise, adornments are subtle); deference (fluid motion and crisp interface help people understand content); depth (visual layers and realistic motion convey hierarchy).
|
|
273
|
+
- **Navigation**: Tab bar (bottom, up to 5 items), navigation bar (top, with back button), modal presentations.
|
|
274
|
+
- **Typography**: SF Pro with Dynamic Type support. Minimum body text 17pt. System font sizes: Large Title 34pt, Title 1 28pt, Title 2 22pt, Title 3 20pt, Headline 17pt semibold, Body 17pt, Callout 16pt, Subheadline 15pt, Footnote 13pt, Caption 1 12pt, Caption 2 11pt.
|
|
275
|
+
- **Touch targets**: Minimum 44x44 pt.
|
|
276
|
+
- **Safe areas**: Respect safe area insets for notch, home indicator, status bar.
|
|
277
|
+
- **How to verify**: (a) Navigation follows standard patterns. (b) System controls are used where possible. (c) Dynamic Type is supported. (d) Safe areas are respected. (e) Haptic feedback follows Apple patterns.
|
|
278
|
+
- **Common violations**: Custom back button that breaks swipe-to-go-back; tab bar with more than 5 items without "More"; ignoring safe area insets; fixed font sizes; non-standard alert dialogs.
|
|
279
|
+
|
|
280
|
+
#### Android Material Design
|
|
281
|
+
|
|
282
|
+
- **Key principles**: Material is the metaphor; bold, graphic, intentional; motion provides meaning.
|
|
283
|
+
- **Navigation**: Bottom navigation (3-5 destinations), navigation drawer, tabs, navigation rail (tablets).
|
|
284
|
+
- **Typography**: Roboto (default). Type scale: Display Large 57sp, Display Medium 45sp, Display Small 36sp, Headline Large 32sp, Headline Medium 28sp, Headline Small 24sp, Title Large 22sp, Title Medium 16sp, Title Small 14sp, Body Large 16sp, Body Medium 14sp, Body Small 12sp, Label Large 14sp, Label Medium 12sp, Label Small 11sp.
|
|
285
|
+
- **Touch targets**: Minimum 48x48 dp (recommended).
|
|
286
|
+
- **How to verify**: (a) Material components used. (b) Touch targets meet 48dp minimum. (c) Elevation/shadow system followed. (d) Navigation patterns are standard. (e) Edge-to-edge content with system bar handling.
|
|
287
|
+
- **Common violations**: iOS-style navigation on Android; bottom sheets that do not follow Material specs; ignoring system back button; non-standard status bar handling.
|
|
288
|
+
|
|
289
|
+
### 2.3 Desktop
|
|
290
|
+
|
|
291
|
+
#### Windows 11 Fluent Design
|
|
292
|
+
|
|
293
|
+
- **Key principles**: Light, depth, motion, material (acrylic/mica), and scale. Mica (subtle desktop wallpaper tint) for title bars; acrylic for transient surfaces.
|
|
294
|
+
- **Layout**: Navigation view (hamburger + rail), command bar, tree view for hierarchy. Content areas use 4px/8px spacing grid. Minimum recommended control height 32px. Recommended touch-mode control height 40px.
|
|
295
|
+
- **Typography**: Segoe UI Variable. Caption 12px, Body 14px, Body Strong 14px semibold, Subtitle 20px semibold, Title 28px semibold, Title Large 40px semibold, Display 68px semibold.
|
|
296
|
+
- **How to verify**: (a) Mica/acrylic used appropriately. (b) NavigationView pattern used. (c) System theme (light/dark) is respected. (d) High contrast mode is supported. (e) Keyboard and narrator accessibility.
|
|
297
|
+
- **Common violations**: Custom title bar that breaks snap layouts; ignoring high contrast mode; using web-style navigation in desktop apps; not respecting system accent color.
|
|
298
|
+
|
|
299
|
+
#### macOS Human Interface Guidelines (Apple)
|
|
300
|
+
|
|
301
|
+
- **Key principles**: Mental model consistency with physical world; direct manipulation; see-and-point; consistency; WYSIWYG; user control; feedback and dialog; forgiveness; perceived stability; aesthetic integrity.
|
|
302
|
+
- **Layout**: Toolbar, sidebar, content area, inspector. Standard window controls (traffic light). Menu bar is mandatory.
|
|
303
|
+
- **Typography**: SF Pro. System font sizes: Large Title 26pt, Title 1 22pt, Title 2 17pt, Title 3 15pt, Headline 13pt bold, Body 13pt, Callout 12pt, Subheadline 11pt, Footnote 10pt.
|
|
304
|
+
- **How to verify**: (a) Menu bar has standard menus (File, Edit, View, Window, Help). (b) Standard keyboard shortcuts work (Cmd+C/V/Z). (c) Dark mode supported. (d) Trackpad gestures respected. (e) Window resizing behavior is correct.
|
|
305
|
+
- **Common violations**: Missing menu bar; non-standard keyboard shortcuts; custom title bar breaking native behavior; ignoring dark mode; modal-heavy design instead of non-modal.
|
|
306
|
+
|
|
307
|
+
### 2.4 Cross-Platform Consistency Principles
|
|
308
|
+
|
|
309
|
+
- **Same conceptual model**: Users moving between platforms should recognize the same features, flows, and terminology.
|
|
310
|
+
- **Platform-native interaction**: While concepts stay consistent, interaction patterns should follow platform conventions (e.g., bottom nav on mobile, side nav on desktop; swipe to delete on iOS, long-press menu on Android).
|
|
311
|
+
- **Adaptive layout, not responsive alone**: Desktop, tablet, and mobile may need fundamentally different layouts, not just reflow.
|
|
312
|
+
- **Shared design tokens**: Color, typography, spacing, and elevation tokens should map to platform-native values.
|
|
313
|
+
- **How to verify**: (a) Feature parity is documented. (b) Platform-specific deviations are intentional and documented. (c) Design tokens have platform-specific mappings. (d) User flows are consistent in outcome, even if interaction differs.
|
|
314
|
+
- **Common violations**: Pixel-identical design forced across platforms; iOS patterns on Android or vice versa; missing features on one platform without explanation; inconsistent terminology across platforms.
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
## 3. Screen Design Best Practices
|
|
319
|
+
|
|
320
|
+
### 3.1 Layout Patterns
|
|
321
|
+
|
|
322
|
+
#### F-Pattern
|
|
323
|
+
|
|
324
|
+
- **Description**: Users scan web pages in an F-shaped pattern: two horizontal stripes followed by a vertical scan down the left side. Most effective for text-heavy pages.
|
|
325
|
+
- **Impact**: Content placed outside the F-pattern is likely to be missed.
|
|
326
|
+
- **How to verify**: Important content and CTAs are positioned along the F-pattern; left column contains key information; headers are front-loaded with important words.
|
|
327
|
+
- **Common violations**: Important actions in the right column of text-heavy pages; burying key information below the fold; right-aligned critical content.
|
|
328
|
+
|
|
329
|
+
#### Z-Pattern
|
|
330
|
+
|
|
331
|
+
- **Description**: For pages with minimal text or strong visual hierarchy, users scan in a Z-shape: top-left to top-right, diagonally to bottom-left, then to bottom-right.
|
|
332
|
+
- **Impact**: Effective for landing pages, marketing pages, and login screens.
|
|
333
|
+
- **How to verify**: Logo/brand at top-left; primary CTA at terminal point (bottom-right); visual hierarchy guides diagonal flow.
|
|
334
|
+
- **Common violations**: CTA at top-left on landing pages; no visual anchor points to guide the Z; competing focal points.
|
|
335
|
+
|
|
336
|
+
#### Grid Systems
|
|
337
|
+
|
|
338
|
+
- **Description**: Consistent column grid (typically 4-column mobile, 8-column tablet, 12-column desktop) provides alignment and rhythm.
|
|
339
|
+
- **Impact**: Grid systems create visual order, speed up design decisions, and ensure responsive behavior.
|
|
340
|
+
- **How to verify**: (a) Column count matches platform (4/8/12). (b) Gutters are consistent (typically 16-24px). (c) Content aligns to grid columns. (d) Breakpoints transition grid columns appropriately.
|
|
341
|
+
- **Common violations**: Arbitrary widths that do not align to grid; inconsistent gutters; content that spans partial columns; no grid definition in the design system.
|
|
342
|
+
|
|
343
|
+
### 3.2 Typography Scale and Hierarchy
|
|
344
|
+
|
|
345
|
+
- **Description**: A type scale provides a limited, harmonious set of font sizes that create clear hierarchy. Major Second (1.125), Minor Third (1.2), Major Third (1.25), Perfect Fourth (1.333), and Augmented Fourth (1.414) are common ratios.
|
|
346
|
+
- **Impact**: Consistent typography reduces cognitive load and establishes information hierarchy.
|
|
347
|
+
- **How to verify**: (a) No more than 4-5 distinct font sizes per screen. (b) Size progression follows a defined ratio. (c) Weight is used for emphasis, not size alone. (d) Line height is appropriate (1.4-1.6 for body text). (e) Maximum line length is 45-75 characters for readability.
|
|
348
|
+
- **Common violations**: Arbitrary font sizes (13px, 14px, 15px, 16px all used); too many font sizes on one screen; line length exceeding 80 characters; insufficient line height; using size instead of weight for emphasis.
|
|
349
|
+
|
|
350
|
+
### 3.3 Color Theory and Accessibility
|
|
351
|
+
|
|
352
|
+
#### Color System Structure
|
|
353
|
+
|
|
354
|
+
- **Primary, secondary, tertiary**: Core brand and functional colors.
|
|
355
|
+
- **Semantic colors**: Success (green), warning (amber/yellow), error (red), info (blue).
|
|
356
|
+
- **Neutral palette**: Grays for text, borders, backgrounds, and surfaces.
|
|
357
|
+
- **Surface and elevation colors**: Background hierarchy.
|
|
358
|
+
|
|
359
|
+
#### Contrast Requirements (WCAG 2.2)
|
|
360
|
+
|
|
361
|
+
| Element | AA Minimum | AAA Enhanced |
|
|
362
|
+
| ------------------------------------ | ---------- | ------------ |
|
|
363
|
+
| Normal text (<24px / <18.66px bold) | 4.5:1 | 7:1 |
|
|
364
|
+
| Large text (>=24px / >=18.66px bold) | 3:1 | 4.5:1 |
|
|
365
|
+
| UI components and graphical objects | 3:1 | 3:1 |
|
|
366
|
+
| Focus indicators | 3:1 | 3:1 |
|
|
367
|
+
|
|
368
|
+
#### Color Blindness Considerations
|
|
369
|
+
|
|
370
|
+
- **Description**: Approximately 8% of males and 0.5% of females have color vision deficiency. The most common types are protanopia/protanomaly (red weakness) and deuteranopia/deuteranomaly (green weakness).
|
|
371
|
+
- **How to verify**: (a) Color is never the sole means of conveying information. (b) Status indicators use icons/shapes in addition to color. (c) Charts use patterns or labels in addition to color. (d) Test with simulated color blindness (protanopia, deuteranopia, tritanopia).
|
|
372
|
+
- **Common violations**: Red/green only status indicators; color-coded charts without labels; error states conveyed only by input border color change; link text distinguished only by color.
|
|
373
|
+
|
|
374
|
+
### 3.4 Spacing Systems
|
|
375
|
+
|
|
376
|
+
#### 4px/8px Base Grid
|
|
377
|
+
|
|
378
|
+
- **Description**: All spacing, sizing, and positioning values are multiples of 4px (or 8px for coarser control): 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, etc.
|
|
379
|
+
- **Impact**: Consistent spacing creates visual rhythm and simplifies design-development handoff.
|
|
380
|
+
- **How to verify**: (a) All margins, padding, and gaps are multiples of 4px. (b) Component heights align to the grid. (c) Icon sizes align to the grid (16, 20, 24, 32, 48). (d) Spacing tokens are defined and used consistently.
|
|
381
|
+
- **Common violations**: Arbitrary padding values (7px, 13px); inconsistent spacing between same-type elements; component heights that do not align; mixing spacing systems.
|
|
382
|
+
|
|
383
|
+
### 3.5 Responsive/Adaptive Design Breakpoints
|
|
384
|
+
|
|
385
|
+
#### Common Breakpoint Ranges
|
|
386
|
+
|
|
387
|
+
| Category | Range | Typical devices |
|
|
388
|
+
| ----------- | ----------- | ----------------------------- |
|
|
389
|
+
| Compact | 0-599px | Phone portrait |
|
|
390
|
+
| Medium | 600-839px | Phone landscape, small tablet |
|
|
391
|
+
| Expanded | 840-1199px | Tablet, small desktop |
|
|
392
|
+
| Large | 1200-1599px | Desktop |
|
|
393
|
+
| Extra-large | 1600px+ | Large desktop, ultrawide |
|
|
394
|
+
|
|
395
|
+
- **How to verify**: (a) All breakpoints are defined and documented. (b) Layout adapts at each breakpoint (not just scales). (c) Touch targets scale appropriately. (d) Navigation pattern changes at appropriate breakpoints. (e) Content priority shifts are intentional.
|
|
396
|
+
- **Common violations**: Only one mobile breakpoint; layout that breaks between defined breakpoints; content that overflows at specific widths; fixed-width elements that do not adapt.
|
|
397
|
+
|
|
398
|
+
### 3.6 Dark Mode Considerations
|
|
399
|
+
|
|
400
|
+
- **Description**: Dark mode uses light-colored text and UI elements on dark backgrounds. It is not simply an inversion of light mode.
|
|
401
|
+
- **Key principles**: (a) Use desaturated colors (high saturation vibrates against dark backgrounds). (b) Reduce elevation differentiation (lighter surfaces are elevated). (c) Ensure contrast ratios still meet WCAG requirements. (d) Avoid pure black (#000000) backgrounds -- use dark gray (#121212 or similar). (e) White text on dark backgrounds should be slightly reduced opacity for large areas.
|
|
402
|
+
- **How to verify**: (a) All WCAG contrast requirements met in dark mode. (b) Semantic colors adjusted for dark backgrounds. (c) Images and illustrations are appropriate for dark mode. (d) Shadows replaced with lighter surface colors for elevation. (e) User preference (system/manual) is respected.
|
|
403
|
+
- **Common violations**: Pure black backgrounds; saturated colors that vibrate; images with transparent backgrounds and dark elements; logos that disappear; contrast failures unique to dark mode; forced dark mode without opt-out.
|
|
404
|
+
|
|
405
|
+
### 3.7 Screen States
|
|
406
|
+
|
|
407
|
+
#### Empty States
|
|
408
|
+
|
|
409
|
+
- **Description**: What users see when there is no content to display.
|
|
410
|
+
- **Best practices**: (a) Explain why it is empty. (b) Provide a primary action to add content. (c) Use illustration or icon to soften the experience. (d) Distinguish first-use empty from cleared/filtered-empty.
|
|
411
|
+
- **Common violations**: Blank screen; "No data" text only; no action to create first item; same empty state for all contexts.
|
|
412
|
+
|
|
413
|
+
#### Loading States
|
|
414
|
+
|
|
415
|
+
- **Description**: Visual indication that content or action results are being loaded.
|
|
416
|
+
- **Best practices**: (a) Skeleton screens for initial loads (preferable to spinners). (b) Inline spinners for section-level loads. (c) Progress bars for determinate operations. (d) Optimistic updates for interactive operations. (e) Show loading within 100ms if operation is not instant.
|
|
417
|
+
- **Common violations**: Full-screen spinner blocking all interaction; no loading state at all; loading indicator that persists after load; layout shift when content loads.
|
|
418
|
+
|
|
419
|
+
#### Error States
|
|
420
|
+
|
|
421
|
+
- **Description**: Visual indication that something has gone wrong.
|
|
422
|
+
- **Best practices**: (a) Explain what went wrong in plain language. (b) Provide a recovery action (retry, go back, contact support). (c) Preserve user input. (d) Use inline errors for field-level issues. (e) Use banner/toast for page-level issues.
|
|
423
|
+
- **Common violations**: "Something went wrong" with no recovery path; clearing form data on error; error toast that auto-dismisses too quickly; only showing error after full form submission.
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## 4. Navigation and Information Architecture
|
|
428
|
+
|
|
429
|
+
### 4.1 Navigation Patterns
|
|
430
|
+
|
|
431
|
+
#### Top Navigation (Horizontal Nav Bar)
|
|
432
|
+
|
|
433
|
+
- **When to use**: Web apps with 2-7 top-level destinations; marketing/content sites.
|
|
434
|
+
- **Best practices**: Limit items; use dropdown for secondary items; highlight current section; include logo/home link.
|
|
435
|
+
- **Common violations**: More than 7 top-level items; no active state indicator; dropdown that requires hover on touch devices.
|
|
436
|
+
|
|
437
|
+
#### Side Navigation (Sidebar/Drawer)
|
|
438
|
+
|
|
439
|
+
- **When to use**: Enterprise applications with many sections; admin panels; tools with hierarchical content.
|
|
440
|
+
- **Best practices**: Collapsible for space efficiency; group items with headers; persistent on desktop, drawer on mobile; show active state; limit nesting depth to 2 levels.
|
|
441
|
+
- **Common violations**: Nesting deeper than 2 levels; no collapse option; sidebar that pushes content on mobile; inconsistent icon + label treatment.
|
|
442
|
+
|
|
443
|
+
#### Bottom Navigation (Tab Bar)
|
|
444
|
+
|
|
445
|
+
- **When to use**: Mobile apps with 3-5 primary destinations.
|
|
446
|
+
- **Best practices**: 3-5 items only; use icon + label; highlight active tab; avoid gestures that conflict; fixed position (does not scroll away).
|
|
447
|
+
- **Common violations**: More than 5 items; label-only or icon-only items; hiding bottom nav on scroll; inconsistent badge treatment.
|
|
448
|
+
|
|
449
|
+
#### Breadcrumbs
|
|
450
|
+
|
|
451
|
+
- **When to use**: Hierarchical content structures with depth greater than 2.
|
|
452
|
+
- **Best practices**: Show full path or truncate middle; each level is a link; current page is not linked; separator is clear.
|
|
453
|
+
- **Common violations**: Breadcrumbs on flat structures; inconsistent with actual hierarchy; non-clickable intermediate levels; breadcrumbs that do not match navigation path.
|
|
454
|
+
|
|
455
|
+
#### Tabs
|
|
456
|
+
|
|
457
|
+
- **When to use**: Switching between related content at the same level; filtering views.
|
|
458
|
+
- **Best practices**: 2-6 tabs visible; horizontal scrolling for overflow; clear active state; content changes without page load; tab order matches logical order.
|
|
459
|
+
- **Common violations**: Too many tabs causing overflow without scroll indication; tabs that trigger navigation to different pages; inconsistent tab content structure; nested tabs.
|
|
460
|
+
|
|
461
|
+
### 4.2 Screen Transition Patterns and Animations
|
|
462
|
+
|
|
463
|
+
- **Principles**: (a) Transitions should communicate spatial relationships. (b) Duration: 100-300ms for most transitions (200ms is typical). (c) Easing: Ease-out for entering, ease-in for exiting, ease-in-out for moving. (d) Transitions should not block interaction. (e) Respect user preference for reduced motion (prefers-reduced-motion).
|
|
464
|
+
- **How to verify**: (a) Transitions are meaningful, not decorative. (b) Duration is under 300ms for most UI transitions. (c) Reduced motion preference is respected. (d) No animation causes content to be inaccessible. (e) Forward/back navigation has directional consistency.
|
|
465
|
+
- **Common violations**: Long animation delays before content is interactive; animations that cannot be disabled; inconsistent transition directions; animation that causes motion sickness; decorative animation on frequently used paths.
|
|
466
|
+
|
|
467
|
+
### 4.3 User Flow Design Principles
|
|
468
|
+
|
|
469
|
+
- **Single primary action per screen**: Each screen should have one clear primary action.
|
|
470
|
+
- **Progressive disclosure**: Show only what is needed now; reveal complexity as needed.
|
|
471
|
+
- **Minimize steps**: Each additional step loses users (approximately 20% drop per step in conversion funnels).
|
|
472
|
+
- **Clear wayfinding**: Users should always know where they are, where they came from, and where they can go.
|
|
473
|
+
- **Dead-end prevention**: Every screen should offer a path forward or back.
|
|
474
|
+
- **How to verify**: (a) Flow diagrams show all paths including error cases. (b) Each screen has a clear primary CTA. (c) Back navigation is always possible. (d) Step count is minimized. (e) Progress indication exists for multi-step flows.
|
|
475
|
+
- **Common violations**: Screens with no clear primary action; wizard flows with no progress indicator; dead-end error pages; flows that require starting over on any error.
|
|
476
|
+
|
|
477
|
+
### 4.4 Wayfinding and Orientation
|
|
478
|
+
|
|
479
|
+
- **Description**: Users must always be able to answer: Where am I? How did I get here? Where can I go?
|
|
480
|
+
- **Mechanisms**: Page titles, breadcrumbs, navigation highlighting, URL structure (web), back button behavior, section headers.
|
|
481
|
+
- **How to verify**: (a) Current location is always visible (nav highlight, breadcrumb, title). (b) Page title matches navigation label. (c) URL reflects location (web). (d) Back button behavior is predictable. (e) Deep links land on pages with full context.
|
|
482
|
+
- **Common violations**: No indication of current page in navigation; page title that does not match nav item; back button going to unexpected location; deep-linked pages lacking context or navigation.
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## 5. Interaction Design
|
|
487
|
+
|
|
488
|
+
### 5.1 Form Design Best Practices
|
|
489
|
+
|
|
490
|
+
- **Layout**: Single-column layout preferred (37% faster completion than multi-column per Baymard Institute research). Left-aligned labels for long/complex forms; top-aligned labels for short forms. Group related fields.
|
|
491
|
+
- **Labels**: Always visible (not placeholder-only). Associated with fields via `for`/`id` or `aria-labelledby`. Descriptive but concise.
|
|
492
|
+
- **Validation**: Inline, real-time validation after the field loses focus (not on every keystroke). Error messages next to the field. Clearly indicate required vs. optional (mark the minority -- if most are required, mark optional ones).
|
|
493
|
+
- **Input types**: Use appropriate HTML input types (email, tel, number, date) to trigger correct mobile keyboards. Use select/radio for fewer than 7 options; autocomplete/search for more.
|
|
494
|
+
- **Submit**: Primary action button at the bottom of the form. Label should describe the action ("Create Account", not "Submit"). Disable or show loading state during submission to prevent double submission.
|
|
495
|
+
- **How to verify**: (a) All fields have visible labels. (b) Required fields are indicated. (c) Validation messages appear inline. (d) Input types match data type. (e) Tab order is logical. (f) Form preserves data on error.
|
|
496
|
+
- **Common violations**: Placeholder-only labels; validation only on submit; "Submit" as button label; multi-column form on mobile; required indicator on every field when only one is optional; loss of entered data on validation failure.
|
|
497
|
+
|
|
498
|
+
### 5.2 Button Hierarchy and Placement
|
|
499
|
+
|
|
500
|
+
- **Hierarchy**: Primary (high emphasis, filled), Secondary (medium emphasis, outlined/tonal), Tertiary (low emphasis, text-only). One primary button per context.
|
|
501
|
+
- **Placement**: Primary action on the right in dialog boxes (Windows convention) or on the right/leading edge following platform convention. Destructive actions separated visually and positionally from constructive actions.
|
|
502
|
+
- **Sizing**: Minimum touch target 48x48dp mobile, 44x44pt iOS, 32px height desktop. Full-width buttons only when appropriate (mobile CTAs, single-column forms). Avoid full-width as default.
|
|
503
|
+
- **How to verify**: (a) Only one primary button per visible context. (b) Button hierarchy is visually distinct. (c) Destructive actions are visually differentiated (often red) and separated. (d) Button labels are action-oriented verbs. (e) Loading/disabled states exist.
|
|
504
|
+
- **Common violations**: Multiple primary-styled buttons on one screen; "OK" / "Cancel" instead of descriptive labels; destructive button adjacent to primary; full-width buttons by default; icon-only buttons without tooltip or aria-label.
|
|
505
|
+
|
|
506
|
+
### 5.3 Feedback Mechanisms
|
|
507
|
+
|
|
508
|
+
#### Toast / Snackbar
|
|
509
|
+
|
|
510
|
+
- **When to use**: Non-critical, temporary notifications. Action confirmations. Background process completion.
|
|
511
|
+
- **Best practices**: Auto-dismiss after 4-8 seconds. Include undo action when applicable. Do not block content. Stack or queue multiple toasts. Position at bottom or top consistently.
|
|
512
|
+
- **Common violations**: Toast for critical errors; auto-dismiss too fast for the message length; toast that blocks interactive elements; no way to review dismissed toasts.
|
|
513
|
+
|
|
514
|
+
#### Modal / Dialog
|
|
515
|
+
|
|
516
|
+
- **When to use**: Critical decisions requiring user attention. Confirmation of destructive actions. Focused sub-tasks that must complete before returning.
|
|
517
|
+
- **Best practices**: Clear title and description. Limit to one primary action. Dismissible via close button and overlay click (non-destructive) or only via explicit action (destructive). Focus trapped within modal. Scrollable content if needed.
|
|
518
|
+
- **Common violations**: Modal for non-critical information; nested modals; modal without close button; modal that opens on page load; modal with too much content; modal for simple yes/no that could be inline.
|
|
519
|
+
|
|
520
|
+
#### Inline Feedback
|
|
521
|
+
|
|
522
|
+
- **When to use**: Form validation errors. Field-level status. Contextual help. Real-time data changes.
|
|
523
|
+
- **Best practices**: Appears immediately adjacent to the relevant element. Persists until resolved. Uses color + icon + text (not color alone). Does not shift layout unexpectedly.
|
|
524
|
+
- **Common violations**: Inline error that causes layout shift; error messages far from the source field; disappearing on focus instead of on resolution; color-only feedback.
|
|
525
|
+
|
|
526
|
+
### 5.4 Micro-Interactions
|
|
527
|
+
|
|
528
|
+
- **Description**: Small, single-purpose animations/feedback that enhance the feeling of direct manipulation.
|
|
529
|
+
- **Examples**: Button press states, toggle animations, pull-to-refresh, like/heart animation, character count approaching limit.
|
|
530
|
+
- **Principles**: (a) Trigger: user action or system event. (b) Rules: what happens in response. (c) Feedback: visual/haptic/audio response. (d) Loops/modes: what happens on repeat or state change.
|
|
531
|
+
- **How to verify**: (a) Micro-interactions reinforce system state, not just decorate. (b) They respect reduced motion preferences. (c) They do not delay primary interaction. (d) They are consistent across similar interactions.
|
|
532
|
+
- **Common violations**: Decorative animations that delay interaction; inconsistent press states; animation that plays once but not on repeat interactions; micro-interactions that distract from the primary task.
|
|
533
|
+
|
|
534
|
+
### 5.5 Gesture Patterns (Mobile/Touch)
|
|
535
|
+
|
|
536
|
+
| Gesture | Common use | Platform notes |
|
|
537
|
+
| ---------------- | -------------------------------- | ------------------------------------ |
|
|
538
|
+
| Tap | Primary action | Universal |
|
|
539
|
+
| Double tap | Zoom, like | Avoid for essential actions |
|
|
540
|
+
| Long press | Context menu, selection | More common on Android |
|
|
541
|
+
| Swipe horizontal | Navigate, delete, reveal actions | iOS: swipe actions; Android: similar |
|
|
542
|
+
| Swipe vertical | Scroll, dismiss | Universal |
|
|
543
|
+
| Pinch | Zoom in/out | Maps, images, documents |
|
|
544
|
+
| Pull down | Refresh | Universal (pull-to-refresh) |
|
|
545
|
+
| Drag | Reorder, move | Needs handle affordance |
|
|
546
|
+
|
|
547
|
+
- **How to verify**: (a) All gestures have visual affordances or discoverability. (b) No gesture is the only way to perform an action (accessibility). (c) Gestures do not conflict with system gestures. (d) Gesture areas are large enough.
|
|
548
|
+
- **Common violations**: Swipe-only delete with no alternative; gesture conflicting with system back (Android) or swipe-back (iOS); no visual hint that swipe is available; drag targets too small.
|
|
549
|
+
|
|
550
|
+
### 5.6 Keyboard Navigation and Shortcuts
|
|
551
|
+
|
|
552
|
+
- **Tab order**: Follows visual order (left-to-right, top-to-bottom for LTR languages). All interactive elements are reachable by Tab. Skip navigation links for repetitive elements.
|
|
553
|
+
- **Focus indicators**: Always visible; minimum 3:1 contrast against adjacent colors; not removed via `outline: none` without a replacement.
|
|
554
|
+
- **Standard shortcuts**: Follow platform conventions (Ctrl/Cmd+Z undo, Ctrl/Cmd+S save, Ctrl/Cmd+F find, Escape to close/cancel).
|
|
555
|
+
- **Custom shortcuts**: Discoverable via help overlay or tooltip. Do not conflict with browser/OS shortcuts. Configurable when possible.
|
|
556
|
+
- **How to verify**: (a) All interactive elements reachable by keyboard. (b) Focus indicator is always visible. (c) Tab order matches visual order. (d) Escape closes modals/popups. (e) No keyboard traps (except intentional focus traps like modals).
|
|
557
|
+
- **Common violations**: Custom components not keyboard accessible; focus indicator removed for aesthetics; tab order that does not match visual order; keyboard traps; custom shortcuts overriding browser shortcuts.
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
561
|
+
## 6. Accessibility (WCAG 2.2)
|
|
562
|
+
|
|
563
|
+
### 6.1 POUR Principles
|
|
564
|
+
|
|
565
|
+
#### Perceivable
|
|
566
|
+
|
|
567
|
+
- **Description**: Information and UI components must be presentable to users in ways they can perceive.
|
|
568
|
+
- **Key requirements**: (a) Text alternatives for non-text content. (b) Captions and alternatives for multimedia. (c) Content adaptable to different presentations (e.g., screen reader). (d) Content distinguishable (color contrast, text sizing, audio control).
|
|
569
|
+
- **How to verify**: All images have alt text; videos have captions; color is not sole information carrier; contrast ratios meet requirements; text is resizable.
|
|
570
|
+
- **Common violations**: Decorative images with empty alt; missing video captions; information conveyed only by color; insufficient contrast; fixed font sizes.
|
|
571
|
+
|
|
572
|
+
#### Operable
|
|
573
|
+
|
|
574
|
+
- **Description**: UI components and navigation must be operable by all users.
|
|
575
|
+
- **Key requirements**: (a) All functionality via keyboard. (b) Users have enough time to read and use content. (c) Content does not cause seizures or physical reactions. (d) Users can navigate, find content, and determine where they are. (e) Input modalities beyond keyboard are supported.
|
|
576
|
+
- **How to verify**: Keyboard-only navigation testing; no auto-play without control; no flashing content exceeding 3 per second; skip links present; focus order logical.
|
|
577
|
+
- **Common violations**: Mouse-only interactions; auto-advancing carousels without pause; flash/strobe effects; no skip navigation; illogical focus order.
|
|
578
|
+
|
|
579
|
+
#### Understandable
|
|
580
|
+
|
|
581
|
+
- **Description**: Information and operation of UI must be understandable.
|
|
582
|
+
- **Key requirements**: (a) Text is readable and understandable. (b) Content appears and operates in predictable ways. (c) Users are helped to avoid and correct mistakes.
|
|
583
|
+
- **How to verify**: Language attribute set; content written at appropriate reading level; navigation is consistent across pages; form errors are clearly described; labels and instructions are clear.
|
|
584
|
+
- **Common violations**: Missing lang attribute; inconsistent navigation; cryptic error messages; auto-submitting forms; unexpected context changes.
|
|
585
|
+
|
|
586
|
+
#### Robust
|
|
587
|
+
|
|
588
|
+
- **Description**: Content must be robust enough to be reliably interpreted by a wide variety of user agents, including assistive technologies.
|
|
589
|
+
- **Key requirements**: (a) Valid HTML. (b) Proper use of ARIA roles, states, and properties. (c) Status messages communicated programmatically.
|
|
590
|
+
- **How to verify**: HTML validation; ARIA usage follows authoring practices; custom components expose proper roles; dynamic content changes announced by screen readers.
|
|
591
|
+
- **Common violations**: Invalid HTML; ARIA misuse (wrong roles, missing states); custom widgets without proper semantics; dynamic updates not announced.
|
|
592
|
+
|
|
593
|
+
### 6.2 Focus Management
|
|
594
|
+
|
|
595
|
+
- **Description**: Programmatic control of keyboard focus to guide users through dynamic content changes.
|
|
596
|
+
- **Key scenarios**: (a) Modal open: focus moves to modal. (b) Modal close: focus returns to trigger. (c) Inline content added: focus moves to new content or announced. (d) Page navigation in SPA: focus moves to main content or page title. (e) Delete action: focus moves to logical next item.
|
|
597
|
+
- **How to verify**: Open modal and verify focus is inside; close modal and verify focus returns; add/remove dynamic content and verify focus is managed; test SPA navigation with screen reader.
|
|
598
|
+
- **Common violations**: Focus remaining behind a modal; focus lost after modal close; SPA page changes not communicated; deleted item leaving focus on invisible element.
|
|
599
|
+
|
|
600
|
+
### 6.3 Screen Reader Compatibility
|
|
601
|
+
|
|
602
|
+
- **Key requirements**: (a) Semantic HTML used as first choice (button, nav, main, header, footer, article, section). (b) ARIA landmarks define page structure. (c) Live regions (aria-live) for dynamic updates. (d) Proper heading hierarchy (h1-h6 in order, no skipping). (e) Form inputs have associated labels. (f) Tables have proper headers (th, scope). (g) Custom components implement ARIA authoring practices.
|
|
603
|
+
- **How to verify**: Navigate entire UI with screen reader (VoiceOver, NVDA, TalkBack); verify all content is announced; verify interactive elements are properly described; verify dynamic changes are announced.
|
|
604
|
+
- **Common violations**: div/span used instead of semantic elements; missing landmarks; heading levels skipped (h1 to h3); unlabeled form inputs; complex tables without proper headers; custom components without ARIA.
|
|
605
|
+
|
|
606
|
+
### 6.4 Touch Target Sizes
|
|
607
|
+
|
|
608
|
+
| Standard | Minimum | Recommended |
|
|
609
|
+
| ---------------------- | ------------------ | ---------------- |
|
|
610
|
+
| WCAG 2.2 AA (SC 2_5_8) | 24x24 CSS px | 44x44 CSS px |
|
|
611
|
+
| WCAG 2.2 AAA | 44x44 CSS px | 48x48 CSS px |
|
|
612
|
+
| Android (Material) | 48x48 dp | 48x48 dp |
|
|
613
|
+
| iOS (Apple HIG) | 44x44 pt | 44x44 pt |
|
|
614
|
+
| Windows (Fluent) | 32x32 px (pointer) | 40x40 px (touch) |
|
|
615
|
+
|
|
616
|
+
- **How to verify**: Measure interactive element sizes including padding; verify spacing between adjacent targets (at least 8dp/pt between edges); test with actual touch devices.
|
|
617
|
+
- **Common violations**: Icon buttons without padding; inline text links with no touch padding; closely spaced action items; checkboxes/radio buttons at native size without enlarged tap area.
|
|
618
|
+
|
|
619
|
+
### 6.5 Color Contrast Requirements
|
|
620
|
+
|
|
621
|
+
See Section 3.3 for detailed contrast ratio table.
|
|
622
|
+
|
|
623
|
+
Additional WCAG 2.2 considerations:
|
|
624
|
+
|
|
625
|
+
- **Focus appearance (SC 2_4_11 AA, SC 2_4_12 AAA)**: Focus indicator must have an area at least as large as a 2px thick perimeter of the unfocused component and a contrast ratio of at least 3:1 against adjacent colors.
|
|
626
|
+
- **Dragging movements (SC 2_5_7 AA)**: Any action achievable via dragging must also be achievable via a single pointer action (click/tap).
|
|
627
|
+
- **Consistent help (SC 3_2_6 A)**: If a help mechanism is provided across multiple pages, it must be in the same relative position.
|
|
628
|
+
- **Redundant entry (SC 3_3_7 A)**: Information previously entered by or provided to the user should be auto-populated or available for selection.
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## 7. Anti-Patterns
|
|
633
|
+
|
|
634
|
+
### 7.1 Layout Anti-Patterns
|
|
635
|
+
|
|
636
|
+
| Anti-pattern | Description | Impact | Detection |
|
|
637
|
+
| --------------------------- | ------------------------------------------------------------ | ------------------------------------------------- | ------------------------------------------------------------------ |
|
|
638
|
+
| **Mystery meat navigation** | Navigation items with no text labels, only cryptic icons | Users cannot discover features; high error rate | Check all nav items have text labels or clear tooltips |
|
|
639
|
+
| **False bottom** | Layout suggests content ends when more exists below the fold | Users miss content; reduced engagement | Verify no full-bleed sections create false termination cues |
|
|
640
|
+
| **Trapped in space** | Excessive white space that breaks visual grouping | Content appears disconnected; reading flow breaks | Check spacing ratios between related vs. unrelated elements |
|
|
641
|
+
| **Overloaded interface** | Too many elements competing for attention | Decision paralysis; increased error rate | Count distinct visual elements per screen; verify clear hierarchy |
|
|
642
|
+
| **Inconsistent alignment** | Mixed alignment systems on one screen | Visual noise; reduced trust | Check all elements align to a defined grid |
|
|
643
|
+
| **Content shifting** | Layout moves as content loads (Cumulative Layout Shift) | Accidental clicks; disorientation | Measure CLS score (target <0.1); reserve space for dynamic content |
|
|
644
|
+
|
|
645
|
+
### 7.2 Form Anti-Patterns
|
|
646
|
+
|
|
647
|
+
| Anti-pattern | Description | Impact | Detection |
|
|
648
|
+
| ----------------------------- | ------------------------------------------------ | ------------------------------------------------ | --------------------------------------------------------------- |
|
|
649
|
+
| **Unnecessary fields** | Collecting data not needed for the task | Increased abandonment (each field adds friction) | Audit each field for necessity; remove or defer optional fields |
|
|
650
|
+
| **Placeholder-only labels** | Using placeholder text as the sole label | Label disappears on input; accessibility failure | Check all inputs have persistent visible labels |
|
|
651
|
+
| **Premature validation** | Showing errors before user finishes input | Frustration; perceived hostility | Verify validation triggers on blur, not on keystroke |
|
|
652
|
+
| **Submit-only validation** | Deferring all validation to form submission | Users must find and fix errors after effort | Verify inline validation exists for key fields |
|
|
653
|
+
| **Ambiguous required fields** | Not clearly indicating which fields are required | Users guess; submission errors | Check required/optional marking is clear and consistent |
|
|
654
|
+
| **Reset button** | Including a reset/clear button near submit | Accidental data loss | Verify no reset button exists, or it requires confirmation |
|
|
655
|
+
| **Infinite form** | Single page with 20+ fields and no grouping | Cognitive overload; abandonment | Check form length; verify grouping and progressive disclosure |
|
|
656
|
+
|
|
657
|
+
### 7.3 Navigation Anti-Patterns
|
|
658
|
+
|
|
659
|
+
| Anti-pattern | Description | Impact | Detection |
|
|
660
|
+
| ------------------------ | ------------------------------------------------------------ | ----------------------------------------------- | ------------------------------------------------------ |
|
|
661
|
+
| **Dead ends** | Screens with no forward navigation or back path | Users are stuck; must use browser back or close | Verify every screen has a clear exit path |
|
|
662
|
+
| **Deep nesting** | Navigation requiring 5+ levels to reach content | Content is hard to find and return to | Check max navigation depth; target 3 levels maximum |
|
|
663
|
+
| **Broken back button** | SPA or custom navigation that breaks browser/OS back | Users lose orientation; data loss | Test back button at every navigation point |
|
|
664
|
+
| **Overloaded tabs** | Too many tabs causing horizontal overflow without indication | Users do not realize more tabs exist | Check tab count; verify scroll indicators for overflow |
|
|
665
|
+
| **Invisible navigation** | Navigation hidden behind gestures or hover-only triggers | Discovery failure; mobile users stuck | Verify all navigation is visible or has clear toggle |
|
|
666
|
+
| **Ambiguous links** | "Click here", "Read more" without context | Accessibility failure; confusion | Check link text is descriptive out of context |
|
|
667
|
+
|
|
668
|
+
### 7.4 Feedback Anti-Patterns
|
|
669
|
+
|
|
670
|
+
| Anti-pattern | Description | Impact | Detection |
|
|
671
|
+
| ------------------------- | ---------------------------------------------------------- | ----------------------------------------------- | --------------------------------------------------------------- |
|
|
672
|
+
| **Silent failure** | Action fails without any user notification | Users assume success; data loss | Verify all error paths have visible feedback |
|
|
673
|
+
| **Modal abuse** | Using modals for every notification including non-critical | Interruption fatigue; dismissed without reading | Audit modal usage; toasts/inline for non-critical |
|
|
674
|
+
| **Auto-dismiss critical** | Critical errors in auto-dismissing toasts | Users miss important information | Verify critical messages persist until dismissed |
|
|
675
|
+
| **Confirmation fatigue** | Confirmation dialog for every action | Users click through without reading | Reserve confirmation for destructive/irreversible actions only |
|
|
676
|
+
| **Vague errors** | "An error occurred" with no specifics | Users cannot self-recover | Check all error messages include what went wrong and what to do |
|
|
677
|
+
| **Blocking spinners** | Full-screen spinner preventing all interaction | Users cannot cancel or navigate away | Verify loading states are scoped and cancellable |
|
|
678
|
+
|
|
679
|
+
### 7.5 Mobile-Specific Anti-Patterns
|
|
680
|
+
|
|
681
|
+
| Anti-pattern | Description | Impact | Detection |
|
|
682
|
+
| ------------------------------ | --------------------------------------------------------------- | -------------------------------------------------- | ---------------------------------------------------------------- |
|
|
683
|
+
| **Tiny targets** | Interactive elements smaller than 44x44pt/48x48dp | Misclicks; frustration; accessibility failure | Measure all interactive elements including padding |
|
|
684
|
+
| **Thumb-zone ignorance** | Important actions in hard-to-reach screen areas | Single-hand use is difficult | Map actions to thumb-zone heatmap; primary actions in easy reach |
|
|
685
|
+
| **Horizontal scroll surprise** | Content exceeding viewport width without indication | Users do not discover content; layout feels broken | Test at all supported widths; check for overflow |
|
|
686
|
+
| **Non-native patterns** | iOS patterns on Android or vice versa | Unfamiliar interactions; user confusion | Verify platform-appropriate patterns |
|
|
687
|
+
| **Splash screen abuse** | Long splash screens or interstitials before content | Abandonment; perception of slowness | Measure time-to-interactive; splash under 2 seconds |
|
|
688
|
+
| **Gesture-only actions** | Actions only achievable via gestures with no button alternative | Accessibility failure; discoverability failure | Verify all gestures have a visible alternative |
|
|
689
|
+
|
|
690
|
+
### 7.6 Performance Anti-Patterns
|
|
691
|
+
|
|
692
|
+
| Anti-pattern | Description | Impact | Detection |
|
|
693
|
+
| ------------------------------------ | -------------------------------------------- | ------------------------------------- | ------------------------------------------------------------ |
|
|
694
|
+
| **Layout shift (CLS)** | Content moves as additional resources load | Misclicks; disorientation | Measure CLS (Core Web Vital; target <0.1) |
|
|
695
|
+
| **Flash of unstyled content (FOUC)** | Content briefly appears without styles | Perceived jank; reduced trust | Test on throttled connection; verify critical CSS |
|
|
696
|
+
| **Render blocking** | Large JS/CSS bundles blocking initial render | Slow perceived load; user abandonment | Measure FCP, LCP; verify code splitting |
|
|
697
|
+
| **Unoptimized images** | Large image files causing slow load | Data waste; slow paint | Check image sizes, formats (WebP/AVIF), lazy loading |
|
|
698
|
+
| **Unnecessary re-renders** | UI updating more frequently than needed | Jank; battery drain on mobile | Profile render frequency; verify memoization |
|
|
699
|
+
| **Memory leaks** | Growing memory usage over session duration | Slowdown; crashes on long sessions | Monitor memory usage over time; check for detached DOM nodes |
|
|
700
|
+
|
|
701
|
+
### 7.7 Dark Patterns (Manipulative UI)
|
|
702
|
+
|
|
703
|
+
These are unethical design patterns that trick users. They should always be flagged as critical violations.
|
|
704
|
+
|
|
705
|
+
| Dark pattern | Description | Detection |
|
|
706
|
+
| --------------------- | ------------------------------------------------------------------------------ | ----------------------------------------------------------- |
|
|
707
|
+
| **Confirmshaming** | Opt-out option uses guilt-inducing language ("No, I don't want to save money") | Check opt-out language for neutrality |
|
|
708
|
+
| **Roach motel** | Easy to sign up, difficult to cancel or unsubscribe | Verify cancellation is as easy as registration |
|
|
709
|
+
| **Trick questions** | Confusing wording or double negatives to mislead | Review all checkbox/toggle labels for clarity |
|
|
710
|
+
| **Sneak into basket** | Items added to cart without user action | Verify cart only contains user-selected items |
|
|
711
|
+
| **Hidden costs** | Fees revealed only at checkout | Verify price transparency throughout flow |
|
|
712
|
+
| **Bait and switch** | Promised action does something different | Verify action outcomes match labels/descriptions |
|
|
713
|
+
| **Forced continuity** | Free trial auto-converts to paid without clear notice | Verify clear trial-end notification and easy cancellation |
|
|
714
|
+
| **Misdirection** | Drawing attention to one thing to distract from another | Verify primary action alignment with user intent |
|
|
715
|
+
| **Privacy zuckering** | Default settings that share maximum data | Verify privacy defaults are restrictive; opt-in not opt-out |
|
|
716
|
+
| **Obstruction** | Making unsubscribe/delete/cancel artificially difficult | Verify destructive-for-business actions are accessible |
|
|
717
|
+
| **Nagging** | Repeated interruptions to push a specific action | Count interruption frequency; verify dismissibility |
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
721
|
+
## 8. UI/UX Specification Formats
|
|
722
|
+
|
|
723
|
+
### 8.1 How to Document UI Specs Effectively
|
|
724
|
+
|
|
725
|
+
A UI specification should enable unambiguous implementation. Required elements:
|
|
726
|
+
|
|
727
|
+
1. **Screen inventory**: Enumerated list of all screens/views with unique identifiers (SCR-001, SCR-002).
|
|
728
|
+
2. **Screen flow diagram**: Mermaid or similar showing navigation between screens, including conditions and error paths.
|
|
729
|
+
3. **Per-screen specification**: For each screen:
|
|
730
|
+
- Screen ID and name
|
|
731
|
+
- Purpose / user goal
|
|
732
|
+
- Entry conditions (how does the user get here?)
|
|
733
|
+
- Layout description or wireframe reference
|
|
734
|
+
- Component inventory (what components appear?)
|
|
735
|
+
- Data requirements (what data is displayed/collected?)
|
|
736
|
+
- Interaction specifications (what happens on click/tap/hover?)
|
|
737
|
+
- State variations (empty, loading, error, success, partial)
|
|
738
|
+
- Exit paths (where can the user go from here?)
|
|
739
|
+
- Responsive behavior (how does layout change at breakpoints?)
|
|
740
|
+
- Accessibility requirements (focus order, aria labels, landmarks)
|
|
741
|
+
4. **Shared component specifications**: Reusable components specified once and referenced.
|
|
742
|
+
5. **Design token references**: Colors, typography, spacing linked to the design token system.
|
|
743
|
+
|
|
744
|
+
### 8.2 Design Token Systems
|
|
745
|
+
|
|
746
|
+
#### Structure
|
|
747
|
+
|
|
748
|
+
Design tokens are organized in three tiers:
|
|
749
|
+
|
|
750
|
+
1. **Global / Reference tokens**: Raw values (color-blue-500: #2196F3, spacing-4: 16px).
|
|
751
|
+
2. **Alias / Semantic tokens**: Purpose-mapped (color-primary: color-blue-500, spacing-md: spacing-4).
|
|
752
|
+
3. **Component tokens**: Component-specific (button-primary-bg: color-primary, button-padding-x: spacing-md).
|
|
753
|
+
|
|
754
|
+
#### Naming Conventions
|
|
755
|
+
|
|
756
|
+
```
|
|
757
|
+
[category]-[property]-[variant]-[state]
|
|
758
|
+
|
|
759
|
+
Examples:
|
|
760
|
+
color-text-primary
|
|
761
|
+
color-text-primary-disabled
|
|
762
|
+
color-bg-surface
|
|
763
|
+
color-bg-surface-elevated
|
|
764
|
+
spacing-inline-sm
|
|
765
|
+
spacing-stack-md
|
|
766
|
+
typography-body-md-font-size
|
|
767
|
+
typography-body-md-line-height
|
|
768
|
+
elevation-shadow-sm
|
|
769
|
+
border-radius-md
|
|
770
|
+
```
|
|
771
|
+
|
|
772
|
+
#### How to verify
|
|
773
|
+
|
|
774
|
+
- (a) Token names follow the defined convention.
|
|
775
|
+
- (b) No hard-coded values exist in component code (all reference tokens).
|
|
776
|
+
- (c) Semantic tokens exist for all use cases (text, background, border, interactive states).
|
|
777
|
+
- (d) Dark mode tokens map semantic names to alternate values.
|
|
778
|
+
- (e) Platform-specific token output exists (CSS custom properties, XML resources, Swift/Kotlin constants).
|
|
779
|
+
|
|
780
|
+
### 8.3 Component Specification Format
|
|
781
|
+
|
|
782
|
+
For each shared component, specify:
|
|
783
|
+
|
|
784
|
+
| Attribute | Content |
|
|
785
|
+
| ------------------- | ----------------------------------------------------------------- |
|
|
786
|
+
| Name | Unique name (e.g., PrimaryButton) |
|
|
787
|
+
| Description | Purpose and when to use |
|
|
788
|
+
| Visual reference | Link to design file or inline spec |
|
|
789
|
+
| Props / API | All configurable properties with types, defaults, and constraints |
|
|
790
|
+
| Variants | Visual/behavioral variants (size, color, state) |
|
|
791
|
+
| States | Default, hover, focus, active, disabled, loading, error |
|
|
792
|
+
| Tokens | Design tokens consumed |
|
|
793
|
+
| Responsive behavior | How component adapts across breakpoints |
|
|
794
|
+
| Accessibility | ARIA role, keyboard interaction, screen reader announcement |
|
|
795
|
+
| Do / Don't | Usage guidelines with examples |
|
|
796
|
+
|
|
797
|
+
### 8.4 Screen Flow Documentation Methods
|
|
798
|
+
|
|
799
|
+
1. **Mermaid flowcharts**: For inclusion in markdown-based specs.
|
|
800
|
+
```
|
|
801
|
+
flowchart TD
|
|
802
|
+
A[Login Screen] -->|Valid credentials| B[Dashboard]
|
|
803
|
+
A -->|Invalid credentials| C[Error State]
|
|
804
|
+
C -->|Retry| A
|
|
805
|
+
B -->|Logout| A
|
|
806
|
+
```
|
|
807
|
+
2. **State diagrams**: For complex stateful interactions.
|
|
808
|
+
3. **Sequence diagrams**: For multi-actor interactions (user, frontend, backend).
|
|
809
|
+
4. **User story maps**: Jeff Patton format -- horizontal axis is user activities, vertical axis is priority/iteration.
|
|
810
|
+
|
|
811
|
+
### 8.5 Handoff Formats Between Design and Development
|
|
812
|
+
|
|
813
|
+
- **Design file links**: Figma/Sketch frames with inspect mode access.
|
|
814
|
+
- **Redline specifications**: Annotated screenshots with exact measurements (often auto-generated).
|
|
815
|
+
- **Token mapping table**: Maps design values to code tokens.
|
|
816
|
+
- **Interaction specification**: Written descriptions or prototypes for all states and transitions.
|
|
817
|
+
- **Asset export**: Icons, illustrations, images in required formats and resolutions (1x, 2x, 3x for mobile; SVG preferred for web).
|
|
818
|
+
- **Acceptance criteria alignment**: Each screen should trace back to user stories and acceptance criteria (REQ/AC traceability).
|
|
819
|
+
|
|
820
|
+
---
|
|
821
|
+
|
|
822
|
+
## 9. Review and Audit Frameworks
|
|
823
|
+
|
|
824
|
+
### 9.1 Heuristic Evaluation Methodology
|
|
825
|
+
|
|
826
|
+
**Process**:
|
|
827
|
+
|
|
828
|
+
1. Define the scope (entire app, specific flow, single screen).
|
|
829
|
+
2. Select evaluators (3-5 for reliable coverage; ideally UX specialists).
|
|
830
|
+
3. Each evaluator independently reviews against a heuristic set (Nielsen's 10 or custom).
|
|
831
|
+
4. Each finding is rated by severity: 0 (not a problem) to 4 (usability catastrophe).
|
|
832
|
+
5. Findings are consolidated, deduplicated, and prioritized.
|
|
833
|
+
|
|
834
|
+
**Severity scale**:
|
|
835
|
+
| Rating | Description | Action |
|
|
836
|
+
| --- | --- | --- |
|
|
837
|
+
| 0 | Not a usability problem | None |
|
|
838
|
+
| 1 | Cosmetic problem | Fix if time allows |
|
|
839
|
+
| 2 | Minor usability problem | Low priority fix |
|
|
840
|
+
| 3 | Major usability problem | High priority fix |
|
|
841
|
+
| 4 | Usability catastrophe | Must fix before release |
|
|
842
|
+
|
|
843
|
+
**QFAI application**: Map each heuristic violation to a specific heuristic ID (H1-H10), severity rating, screen/component reference, and recommended fix.
|
|
844
|
+
|
|
845
|
+
### 9.2 Cognitive Walkthrough Process
|
|
846
|
+
|
|
847
|
+
**Process**:
|
|
848
|
+
|
|
849
|
+
1. Define user personas and their goals.
|
|
850
|
+
2. Define the task sequence (step-by-step actions required to complete the goal).
|
|
851
|
+
3. At each step, evaluate:
|
|
852
|
+
- Will the user try to achieve the right effect? (Goal formation)
|
|
853
|
+
- Will the user notice the correct action is available? (Visibility)
|
|
854
|
+
- Will the user associate the correct action with the desired effect? (Mapping)
|
|
855
|
+
- If the correct action is performed, will the user see that progress is being made? (Feedback)
|
|
856
|
+
4. Document failures at each step with severity and recommendation.
|
|
857
|
+
|
|
858
|
+
**QFAI application**: For each user story, define the cognitive walkthrough as part of the acceptance criteria. Verify that each step in the user flow passes all four questions.
|
|
859
|
+
|
|
860
|
+
### 9.3 Usability Testing Frameworks
|
|
861
|
+
|
|
862
|
+
| Method | When | Sample size | Duration |
|
|
863
|
+
| ------------------- | ----------------------------------- | ----------------- | --------------------- |
|
|
864
|
+
| Moderated in-person | Detailed qualitative insights | 5-8 per round | 60-90 min per session |
|
|
865
|
+
| Moderated remote | Geographic diversity | 5-8 per round | 45-60 min per session |
|
|
866
|
+
| Unmoderated remote | Quantitative + behavioral data | 20-50+ | 15-30 min per session |
|
|
867
|
+
| A/B testing | Comparing specific design choices | 1000+ per variant | Depends on traffic |
|
|
868
|
+
| Card sorting | Information architecture validation | 15-30 | 20-30 min |
|
|
869
|
+
| Tree testing | Navigation structure validation | 50+ | 10-15 min |
|
|
870
|
+
| First-click testing | Findability of specific targets | 30-50 | 5-10 min |
|
|
871
|
+
|
|
872
|
+
**Key metrics**: Task success rate, time on task, error rate, System Usability Scale (SUS) score, Net Promoter Score (NPS), task-level satisfaction.
|
|
873
|
+
|
|
874
|
+
### 9.4 Automated Accessibility Testing
|
|
875
|
+
|
|
876
|
+
#### What automated tools CAN catch (approximately 30-40% of WCAG issues)
|
|
877
|
+
|
|
878
|
+
- Missing alt text on images
|
|
879
|
+
- Insufficient color contrast
|
|
880
|
+
- Missing form labels
|
|
881
|
+
- Missing document language
|
|
882
|
+
- Empty links and buttons
|
|
883
|
+
- Duplicate IDs
|
|
884
|
+
- Missing ARIA required attributes
|
|
885
|
+
- Invalid ARIA attribute values
|
|
886
|
+
- Heading level order violations
|
|
887
|
+
- Missing page title
|
|
888
|
+
- Tables without headers
|
|
889
|
+
|
|
890
|
+
#### What automated tools CANNOT catch (approximately 60-70% of WCAG issues)
|
|
891
|
+
|
|
892
|
+
- Quality/accuracy of alt text
|
|
893
|
+
- Keyboard navigation flow and usability
|
|
894
|
+
- Screen reader announcement quality
|
|
895
|
+
- Focus management in dynamic content
|
|
896
|
+
- Correct use of ARIA patterns
|
|
897
|
+
- Reading order of content
|
|
898
|
+
- Meaningful content structure
|
|
899
|
+
- Error message quality and placement
|
|
900
|
+
- Touch target adequacy in context
|
|
901
|
+
- Cognitive accessibility
|
|
902
|
+
- Motion/animation accessibility
|
|
903
|
+
- Complex widget keyboard interaction
|
|
904
|
+
|
|
905
|
+
#### Recommended tool stack
|
|
906
|
+
|
|
907
|
+
| Tool | Type | Coverage |
|
|
908
|
+
| ------------------------ | -------------------------- | --------------------------- |
|
|
909
|
+
| axe-core | Library (integrable in CI) | Automated rules |
|
|
910
|
+
| Lighthouse | Browser tool / CI | Performance + accessibility |
|
|
911
|
+
| pa11y | CLI / CI | Automated rules |
|
|
912
|
+
| WAVE | Browser extension | Visual overlay of issues |
|
|
913
|
+
| VoiceOver | macOS/iOS screen reader | Manual testing |
|
|
914
|
+
| NVDA | Windows screen reader | Manual testing |
|
|
915
|
+
| TalkBack | Android screen reader | Manual testing |
|
|
916
|
+
| Colour Contrast Analyser | Desktop tool | Contrast checking |
|
|
917
|
+
|
|
918
|
+
### 9.5 Design System Audit Checklist
|
|
919
|
+
|
|
920
|
+
#### Token audit
|
|
921
|
+
|
|
922
|
+
- [ ] All color, typography, spacing, elevation, border tokens are defined
|
|
923
|
+
- [ ] Tokens follow naming convention
|
|
924
|
+
- [ ] No hard-coded values in component implementations
|
|
925
|
+
- [ ] Dark mode and high contrast tokens exist
|
|
926
|
+
- [ ] Platform-specific token outputs exist
|
|
927
|
+
|
|
928
|
+
#### Component audit
|
|
929
|
+
|
|
930
|
+
- [ ] All components are documented with specification format
|
|
931
|
+
- [ ] All states are defined (default, hover, focus, active, disabled, loading, error)
|
|
932
|
+
- [ ] Components meet accessibility requirements
|
|
933
|
+
- [ ] Components are responsive
|
|
934
|
+
- [ ] Components have consistent API patterns
|
|
935
|
+
|
|
936
|
+
#### Pattern audit
|
|
937
|
+
|
|
938
|
+
- [ ] Navigation patterns are consistent across the application
|
|
939
|
+
- [ ] Form patterns are consistent
|
|
940
|
+
- [ ] Feedback patterns are consistent (toast, modal, inline)
|
|
941
|
+
- [ ] Loading state patterns are consistent
|
|
942
|
+
- [ ] Error state patterns are consistent
|
|
943
|
+
- [ ] Empty state patterns are consistent
|
|
944
|
+
|
|
945
|
+
#### Accessibility audit
|
|
946
|
+
|
|
947
|
+
- [ ] All pages meet WCAG 2.2 AA contrast requirements
|
|
948
|
+
- [ ] Keyboard navigation works throughout
|
|
949
|
+
- [ ] Screen reader testing completed on primary flows
|
|
950
|
+
- [ ] Focus management verified for all dynamic content
|
|
951
|
+
- [ ] Touch targets meet minimum size requirements
|
|
952
|
+
- [ ] Reduced motion preferences respected
|
|
953
|
+
- [ ] High contrast mode supported (Windows)
|
|
954
|
+
|
|
955
|
+
---
|
|
956
|
+
|
|
957
|
+
## 10. Emerging Trends (2025-2026)
|
|
958
|
+
|
|
959
|
+
### 10.1 AI-Assisted Interfaces
|
|
960
|
+
|
|
961
|
+
- **Description**: AI integration into UI through conversational interfaces, predictive actions, content generation, and intelligent defaults.
|
|
962
|
+
- **Key principles**: (a) Transparency: always indicate when content is AI-generated. (b) User control: AI suggestions are suggestions, not actions. (c) Graceful fallback: AI features degrade gracefully when unavailable. (d) Correction mechanisms: users can easily correct AI outputs. (e) Confidence indication: show certainty levels when appropriate.
|
|
963
|
+
- **How to verify**: (a) AI-generated content is labeled. (b) Users can override AI suggestions. (c) AI features have non-AI alternatives. (d) Error rates for AI features are monitored. (e) Feedback mechanisms exist for AI quality improvement.
|
|
964
|
+
- **Common violations**: AI actions taken without user consent; AI-generated content not distinguishable from human content; no way to correct AI errors; AI features that block functionality when unavailable.
|
|
965
|
+
|
|
966
|
+
### 10.2 Voice and Multimodal UI
|
|
967
|
+
|
|
968
|
+
- **Description**: Interfaces that combine visual, voice, gesture, and other input modalities.
|
|
969
|
+
- **Key principles**: (a) Multimodal equivalence: all critical actions achievable via multiple modalities. (b) Context awareness: adapt modality to environment (voice in hands-free, touch in noisy). (c) Feedback modality matching: respond in the same modality as input when possible. (d) Progressive enhancement: voice/gesture enhances, not replaces, visual UI.
|
|
970
|
+
- **How to verify**: (a) Primary flows work with touch/pointer only. (b) Voice commands have visual equivalents. (c) Feedback is provided in appropriate modality. (d) Handoff between modalities is seamless.
|
|
971
|
+
- **Common violations**: Voice-only features with no visual alternative; visual-only features with no voice equivalent where expected; jarring modality transitions; voice UI without visual feedback.
|
|
972
|
+
|
|
973
|
+
### 10.3 Spatial Computing Considerations
|
|
974
|
+
|
|
975
|
+
- **Description**: UI design for AR, VR, and mixed reality environments (Apple Vision Pro, Meta Quest, etc.).
|
|
976
|
+
- **Key principles**: (a) Depth and spatial anchoring: UI elements exist in 3D space. (b) Ergonomics: content in comfortable viewing zones (arm's length, 15 degrees below eye level for primary content). (c) Input: eye tracking, hand gestures, voice. (d) Comfort: avoid UI that requires sustained arm raising or head turning. (e) Mixed reality: UI that coexists with the real world.
|
|
977
|
+
- **How to verify**: (a) Primary content is in the comfort zone. (b) Input methods are not fatiguing. (c) UI adapts to environment (lighting, space). (d) Text remains legible at viewing distance. (e) Motion does not cause discomfort.
|
|
978
|
+
- **Common violations**: UI too far away or too close; small text in spatial UI; UI requiring sustained physical effort; ignoring real-world occlusion; overwhelming spatial UI density.
|
|
979
|
+
|
|
980
|
+
### 10.4 Sustainability in UI Design
|
|
981
|
+
|
|
982
|
+
- **Description**: Designing digital products with awareness of environmental impact (energy consumption, data transfer, device longevity).
|
|
983
|
+
- **Key principles**: (a) Performance optimization reduces energy consumption. (b) Dark mode reduces energy on OLED screens. (c) Efficient media: appropriate image sizes, video compression, lazy loading. (d) Reduced data transfer: caching, efficient APIs, minimal asset sizes. (e) Supporting older devices: lighter resource requirements extend device lifespan.
|
|
984
|
+
- **How to verify**: (a) Page weight is minimized (target under 1MB for initial load). (b) Images are optimized (WebP/AVIF, responsive sizes). (c) Unnecessary animations/effects are avoidable. (d) Dark mode is available. (e) Application works on devices 3-4 years old.
|
|
985
|
+
- **Common violations**: Multi-megabyte pages; auto-playing video; uncompressed images; requiring latest hardware; animations with no reduced-motion respect; excessive network requests.
|
|
986
|
+
|
|
987
|
+
---
|
|
988
|
+
|
|
989
|
+
## Appendix A: Quick Reference -- Verification Checklist Summary
|
|
990
|
+
|
|
991
|
+
This checklist summarizes key verification points for QFAI review processes.
|
|
992
|
+
|
|
993
|
+
### Layout and Visual Design
|
|
994
|
+
|
|
995
|
+
- [ ] Grid system defined and consistently applied
|
|
996
|
+
- [ ] Typography scale uses defined ratios; no arbitrary sizes
|
|
997
|
+
- [ ] Spacing uses 4px/8px base grid
|
|
998
|
+
- [ ] Color contrast meets WCAG 2.2 AA minimum
|
|
999
|
+
- [ ] Color is not the sole means of conveying information
|
|
1000
|
+
- [ ] Dark mode meets all contrast requirements
|
|
1001
|
+
- [ ] No cumulative layout shift on content load
|
|
1002
|
+
|
|
1003
|
+
### Navigation
|
|
1004
|
+
|
|
1005
|
+
- [ ] Current location always identifiable
|
|
1006
|
+
- [ ] Maximum navigation depth is 3 levels
|
|
1007
|
+
- [ ] All screens have a clear exit path
|
|
1008
|
+
- [ ] Back button behavior is predictable
|
|
1009
|
+
- [ ] Primary action is clear on every screen
|
|
1010
|
+
|
|
1011
|
+
### Interaction
|
|
1012
|
+
|
|
1013
|
+
- [ ] All interactive elements have visible hover/focus states
|
|
1014
|
+
- [ ] Touch targets meet platform minimums (44pt iOS, 48dp Android, 24px WCAG AA)
|
|
1015
|
+
- [ ] Forms use single-column layout with visible labels
|
|
1016
|
+
- [ ] Validation is inline and triggered on blur
|
|
1017
|
+
- [ ] Destructive actions require confirmation
|
|
1018
|
+
- [ ] Error messages explain what happened and what to do
|
|
1019
|
+
|
|
1020
|
+
### Accessibility
|
|
1021
|
+
|
|
1022
|
+
- [ ] Keyboard-only navigation works for all functionality
|
|
1023
|
+
- [ ] Focus indicators are visible with 3:1 contrast
|
|
1024
|
+
- [ ] Screen reader can navigate all content
|
|
1025
|
+
- [ ] Heading hierarchy is correct (no skips)
|
|
1026
|
+
- [ ] ARIA landmarks define page structure
|
|
1027
|
+
- [ ] Dynamic content changes are announced
|
|
1028
|
+
- [ ] Reduced motion preference is respected
|
|
1029
|
+
|
|
1030
|
+
### States
|
|
1031
|
+
|
|
1032
|
+
- [ ] Empty states are defined with guidance and primary action
|
|
1033
|
+
- [ ] Loading states use skeleton screens or progress indicators
|
|
1034
|
+
- [ ] Error states provide recovery path
|
|
1035
|
+
- [ ] Success states provide confirmation
|
|
1036
|
+
|
|
1037
|
+
### Performance
|
|
1038
|
+
|
|
1039
|
+
- [ ] Initial load under 3 seconds (typical connection)
|
|
1040
|
+
- [ ] Interactive response under 100ms for direct manipulation
|
|
1041
|
+
- [ ] System response under 400ms for most operations
|
|
1042
|
+
- [ ] Progress indicator shown for operations over 1 second
|
|
1043
|
+
|
|
1044
|
+
### Platform Compliance
|
|
1045
|
+
|
|
1046
|
+
- [ ] Platform-specific navigation patterns followed
|
|
1047
|
+
- [ ] Platform typography recommendations applied
|
|
1048
|
+
- [ ] System theme (light/dark) respected
|
|
1049
|
+
- [ ] Platform-specific accessibility features supported
|
|
1050
|
+
|
|
1051
|
+
---
|
|
1052
|
+
|
|
1053
|
+
## Appendix B: Anti-Pattern Severity Classification for QFAI
|
|
1054
|
+
|
|
1055
|
+
| Severity | Category | Examples | Action |
|
|
1056
|
+
| ------------ | ------------------------------------- | --------------------------------------------------------------------- | ------------------------ |
|
|
1057
|
+
| **Critical** | Dark patterns, accessibility blockers | Confirmshaming, no keyboard access, seizure-inducing content | Block release |
|
|
1058
|
+
| **High** | Major usability failures | Dead ends, silent failures, mystery navigation, contrast failures | Fix before release |
|
|
1059
|
+
| **Medium** | Significant friction | Unnecessary form fields, inconsistent patterns, poor error messages | Fix in current iteration |
|
|
1060
|
+
| **Low** | Polish and optimization | Minor spacing inconsistency, cosmetic alignment, suboptimal animation | Fix when time allows |
|
|
1061
|
+
|
|
1062
|
+
---
|
|
1063
|
+
|
|
1064
|
+
_End of UI/UX Best Practices Reference._
|
|
1065
|
+
|
|
1066
|
+
_This document is the SSOT for UI/UX quality criteria within the QFAI discussion pack process. It should be updated as guidelines evolve and new platform versions are released._
|