{"id":"l-fig-4-2","courseId":"figma-ui-design","lang":"en","kind":"lesson","summary":"Check Steady’s screens for contrast, color-only meaning, target size, focus order and text resizing, and annotate what developers need so the accessible design survives the build.","html":"<p>Roughly one in twelve men has some form of color vision deficiency. Many people use phones with larger text, with a screen reader, with one shaky thumb on a bus, or in bright sunlight. None of them are edge cases; together they are a large share of Steady’s users, and most of what helps them makes the app better for everyone.</p>\n<p>Accessibility is cheapest at design time. A contrast failure costs a color change in Figma, and much more once it ships across a dozen screens. This lesson walks Steady through the checks Sofia runs before any handoff.</p>\n<h2 id=\"sec-1\" tabindex=\"-1\">Contrast, again, everywhere</h2>\n<p>You learned the numbers in Lesson 1.3 and re-checked them in dark mode in Lesson 3.4. Now apply them to the things that are easy to forget:</p>\n<ul>\n<li><strong>Control outlines</strong>: an unchecked check circle is only a ring. Against the row surface it needs 3:1, or people cannot find it.</li>\n<li><strong>Focus indicators</strong>: the focus ring needs 3:1 against what surrounds it.</li>\n<li><strong>Disabled states</strong>: WCAG exempts disabled controls from contrast, but a disabled button nobody can read leaves people unsure what they cannot do. Keep the label legible.</li>\n<li><strong>Text on images or illustrations</strong>: measure against the lightest part of the image under the text.</li>\n</ul>\n<p>Figma’s contrast checker in the color picker covers individual pairs as you work. On Organization and Enterprise plans, at the time of writing, Check designs can also flag contrast issues across a selection.</p>\n<h2 id=\"sec-2\" tabindex=\"-1\">Never color alone</h2>\n<p>Steady’s first design showed a missed habit with a red check circle and nothing else. To someone who cannot distinguish red from teal, every habit looks the same. WCAG’s Use of Color criterion requires that color is never the <em>only</em> way meaning is conveyed.</p>\n<p>The fix is a second cue: the Missed variant gets an x icon inside the circle and a “Missed yesterday” caption under the name; Done gets a check mark and the name in the secondary text color. Color still helps, but shape and words carry the meaning. Test it by viewing the screen in grayscale: if you can still tell the states apart, you have passed.</p>\n<h2 id=\"sec-3\" tabindex=\"-1\">Targets big enough for thumbs</h2>\n<p>WCAG 2.2 sets a minimum at level AA: interactive targets of at least <strong>24 × 24 CSS pixels</strong>, or enough spacing around smaller ones. Platform guidelines go further for comfort: Apple recommends <strong>44 × 44 points</strong>, and Material Design recommends <strong>48 × 48 dp</strong>. For a phone app, design to the platform guideline.</p>\n<p>The visible shape and the tappable area do not have to match. Steady’s check circle stays a 32 px circle visually, but the Check button component is a 44 × 44 frame with the circle centered in it. The frame’s bounds tell developers the real hit area.</p>\n<figure class=\"diagram\"><svg class=\"diagram-svg\" focusable=\"false\" viewBox=\"0 0 680 230\" role=\"img\" aria-labelledby=\"l-fig-4-2-t1\"><defs><marker id=\"arrow-l-fig-4-2-1\" viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0 L10 5 L0 10 z\" class=\"d-arrowhead\"/></marker></defs>\n  <title id=\"l-fig-4-2-t1\">A 32 pixel check circle centered inside a dashed 44 pixel square that marks the tap area. Beside it, two neighbouring targets with 8 pixels between their tap areas.</title>\n  <rect class=\"d-box d-dashed\" x=\"60\" y=\"40\" width=\"150\" height=\"150\" rx=\"8\"/>\n  <circle class=\"d-box-primary\" cx=\"135\" cy=\"115\" r=\"54\"/>\n  <text class=\"d-label-strong\" x=\"135\" y=\"120\" text-anchor=\"middle\">32 px</text>\n  <text class=\"d-label-muted\" x=\"135\" y=\"214\" text-anchor=\"middle\">44 × 44 tap area</text>\n  <rect class=\"d-box d-dashed\" x=\"330\" y=\"70\" width=\"100\" height=\"100\" rx=\"6\"/>\n  <circle class=\"d-box-accent\" cx=\"380\" cy=\"120\" r=\"36\"/>\n  <rect class=\"d-box d-dashed\" x=\"458\" y=\"70\" width=\"100\" height=\"100\" rx=\"6\"/>\n  <circle class=\"d-box-accent\" cx=\"508\" cy=\"120\" r=\"36\"/>\n  <path class=\"d-line\" d=\"M430 190 L458 190\"/>\n  <text class=\"d-label-muted\" x=\"444\" y=\"214\" text-anchor=\"middle\">8 px apart</text>\n  <text class=\"d-label-muted\" x=\"444\" y=\"50\" text-anchor=\"middle\">tap areas must not overlap</text>\n</svg><figcaption>The visible check circle sits inside a larger tappable area</figcaption></figure>\n<aside class=\"callout callout-mistake\" role=\"note\"><p class=\"callout-title\"><svg class=\"icon \" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg><span><span class=\"callout-kind\">Common mistake</span><span class=\"callout-sep\" aria-hidden=\"true\"> · </span>Tiny icon buttons in the header</span></p>\n<p>A 20 px pencil icon for “Edit habit”, 4 px from a 20 px share icon, looks neat and is hard to hit. Wrap each icon in a 44 px frame and let the frames sit next to each other. The icons look the same; the mis-taps stop.</p>\n</aside>\n<h2 id=\"sec-4\" tabindex=\"-1\">Focus order and focus states</h2>\n<p>People using a keyboard, switch control or a screen reader move through a screen one element at a time. Two design decisions affect them directly.</p>\n<p><strong>Focus states.</strong> Every interactive component needs a visible focus style, usually a 2 px ring in a color that meets 3:1. Add <code dir=\"ltr\">Focused</code> to the State property of Button, Chip, Text field and Check button, so it exists in the kit, not as an afterthought.</p>\n<p><strong>Focus order.</strong> The order should follow the visual reading order: on the New habit sheet, that is close, name field, icon picker, frequency chips, reminder toggle, Save habit. Usually developers get this right by default if the layout is logical; when your layout is unusual, annotate the order with numbered markers. Figma’s annotations include an <strong>Accessibility</strong> category at the time of writing, which keeps these notes separate from spacing specs (Lesson 4.3).</p>\n<h2 id=\"sec-5\" tabindex=\"-1\">Names, labels and text size</h2>\n<p>Screen readers announce elements by name. An icon-only add button would be read as “button” unless someone gives it a name, so annotate it: <em>accessible name: “Add habit”</em>. The text field needs a visible label, “Habit name”, not just hint text that vanishes when typing starts.</p>\n<p>Finally, remember the 30% larger text test from Lesson 2.4. iOS and Android both let people enlarge text system-wide. Rows built with Hug height and Auto height text grow gracefully; anything with a fixed height clips. Respecting reduced-motion settings belongs here too: annotate a simpler fade as the alternative to your streak celebration.</p>\n<aside class=\"callout callout-tip\" role=\"note\"><p class=\"callout-title\"><svg class=\"icon \" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\"/><path d=\"M9 18h6\"/><path d=\"M10 22h4\"/></svg><span><span class=\"callout-kind\">Tip</span><span class=\"callout-sep\" aria-hidden=\"true\"> · </span>Design the accessible state first</span></p>\n<p>When you design a component, design its focus state and its largest text size in the same sitting as the default. Adding them later means revisiting every component, and it rarely happens before a deadline.</p>\n</aside>\n<p>With the screens checked and annotated, they are nearly ready for developers. Next you hand them off in Dev Mode.</p>\n","toc":[{"id":"sec-1","text":"Contrast, again, everywhere","level":2},{"id":"sec-2","text":"Never color alone","level":2},{"id":"sec-3","text":"Targets big enough for thumbs","level":2},{"id":"sec-4","text":"Focus order and focus states","level":2},{"id":"sec-5","text":"Names, labels and text size","level":2}],"takeaways":["Meaning must never rely on color alone; pair color with an icon, text or shape change.","WCAG 2.2 AA asks for touch targets of at least 24 by 24 CSS pixels, while Apple and Google recommend 44 points and 48 dp, so design to the platform guideline.","A target’s tappable area can be larger than its visible shape, which lets a 32 px check circle sit inside a 44 px hit area.","Every interactive element needs a visible focus state, and the focus order should follow the reading order you annotate.","Icon-only buttons need an accessible name and inputs need visible labels, and both belong in your handoff annotations."],"further":[{"title":"Understanding SC 1.4.1 Use of Color","url":"https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html"},{"title":"Understanding SC 2.5.8 Target Size (Minimum)","url":"https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html"},{"title":"Accessibility (Apple Human Interface Guidelines)","url":"https://developer.apple.com/design/human-interface-guidelines/accessibility"},{"title":"Accessibility designing (Material Design 3)","url":"https://m3.material.io/foundations/designing/structure"}],"quiz":[{"q":"<p>Steady marks a missed habit by turning the row’s check circle red. Nothing else changes. What does WCAG’s Use of Color criterion ask you to add?</p>","options":[{"text":"A brighter red so it stands out more.","why":"Any red, however bright, is still color alone. People with color vision deficiencies may not tell it from teal or gray."},{"text":"A tooltip that appears on hover.","why":"Phones have no hover, and the meaning should be visible without extra steps."},{"text":"A second cue that does not depend on color, such as an x icon in the circle and the word “Missed” under the name.","why":"Correct. Color can support the meaning, but a shape or text must carry it too."},{"text":"Nothing, because red is universally understood as a warning.","why":"The meaning of red is cultural, and many people cannot reliably see it. The criterion asks for a non-color cue."}],"answer":2},{"q":"<p>The check circle is drawn at 32 × 32 px. How do you meet Apple’s 44 pt recommendation without making it look bigger?</p>","options":[{"text":"Make the Check button component a 44 × 44 frame with the 32 px circle centered inside it.","why":"Correct. The component’s bounds become the tappable area, and developers implement the larger hit area from it."},{"text":"Scale the circle up to 44 px.","why":"That meets the size but changes the visual design. You can have both with a larger invisible frame."},{"text":"Leave it, because 32 px already passes WCAG’s 24 px minimum.","why":"It passes the AA minimum, but the platform guideline for comfortable tapping is larger, and Steady is a phone app."},{"text":"Add a note asking developers to make it easier to tap.","why":"A vague note leaves the size to guesswork. Building the hit area into the component makes it exact."}],"answer":0},{"q":"<p>A keyboard or switch-control user moves through the New habit sheet. Which design deliverable helps developers get the order right?</p>","options":[{"text":"A larger font size for the sheet title.","why":"Size affects visual hierarchy, not the order focus moves in."},{"text":"A dark-mode version of the sheet.","why":"Modes change colors, not navigation order."},{"text":"A smart animate transition between fields.","why":"Animation does not tell anyone which element receives focus next."},{"text":"Numbered focus-order annotations on the sheet, plus a designed focus state for each control.","why":"Correct. Developers see the intended order and know exactly what focus looks like."}],"answer":3},{"q":"<p>Why should the New habit text field have a visible label above it, not only hint text inside it?</p>","options":[{"text":"Hint text is not allowed in Figma text fields.","why":"Figma lets you design hint text freely. The issue is how people use the field."},{"text":"Hint text disappears as soon as someone types, so the field loses its instructions, and light hint colors often fail contrast.","why":"Correct. A persistent label keeps the purpose visible and gives screen readers a reliable name."},{"text":"Labels make the field taller, which improves the layout.","why":"Height is a side effect, not the reason. The reason is that hints vanish and are often too faint."}],"answer":1}],"exercise":{"kind":"fill","language":"text","template":"Steady accessibility checklist, New habit sheet\n\nTargets\n  WCAG 2.2 AA minimum target size        {{0}} CSS px (each side)\n  Apple recommendation (iOS build)       {{1}} pt (each side)\n  Material recommendation (Android)      {{2}} dp (each side)\n\nContrast\n  \"Habit name\" label, 15 px              {{3}}:1\n  Focus ring against the sheet           {{4}}:1\n\nMeaning\n  Missed state = red circle + x icon + the word \"Missed\"\n  (never {{5}} alone)","blanks":[{"answers":["24"]},{"answers":["44"]},{"answers":["48"]},{"answers":["4.5"]},{"answers":["3","3.0"]},{"answers":["color","colour"]}],"title":"Complete the accessibility checklist","prompt":"<p>Before handing off the New habit sheet, Sofia fills in this checklist. Complete it with the numbers from WCAG 2.2 and the platform guidelines, and the one word that finishes the last rule. Numbers only for the numeric blanks.</p>\n","hints":["WCAG’s AA target minimum is smaller than either platform’s recommendation.","A 15 px label is normal text. A focus ring is a non-text visual indicator.","Targets: 24, 44, 48. Contrast: 4.5 and 3. The rule is about color."],"explanation":"<p>WCAG 2.2 SC 2.5.8 sets the AA minimum at <strong>24 × 24</strong> CSS px (or enough spacing around smaller targets). Apple recommends <strong>44 × 44</strong> pt and Material recommends <strong>48 × 48</strong> dp; for a phone app, design to the platform number. A 15 px label is normal text, so it needs <strong>4.5:1</strong>. A focus ring is a non-text indicator and needs <strong>3:1</strong> against its surroundings. And SC 1.4.1 says meaning is never conveyed by <strong>color</strong> alone, which is why the Missed state also has an icon and a word.</p>\n","checkLabels":{}},"words":828,"readMinutes":4}