{"course":{"slug":"design-foundations","title":"Design, before Any Software","url":"https://addaly.com/learn/design-foundations","level":"beginner","track":"create"},"lesson":{"slug":"states-are-part-of-the-component","title":"Every state you did not draw still ships","url":"https://addaly.com/learn/design-foundations/states-are-part-of-the-component","position":69,"of":74,"minutes":9,"answer":"A component ships in every state whether or not it was designed, hover and focus serve different audiences and never substitute for each other.","keyIdea":"A component ships in every state whether or not it was designed, hover and focus serve different audiences and never substitute for each other, and a disabled control that cannot be read or explained should usually be an enabled control that explains what is missing on activation."},"body":{"format":"markdown","text":"## The list\n\nA component exists in more conditions than the one in the mockup. For anything interactive:\n\n```\ndefault        resting\nhover          pointer over it (does not exist on touch)\nfocus-visible  keyboard focus (does not exist for mouse users)\nactive         being pressed\ndisabled       not available\nloading        working\nselected       currently chosen, in a set\nerror          in an invalid condition\nread-only      shown but not editable\nvisited        for links\n```\n\nEvery one of these ships whether or not somebody designed it. Undesigned, they ship as the browser's defaults, which are inconsistent across platforms, or as nothing at all, which means the interface does not respond to being used.\n\n## Hover and focus are different audiences\n\nA point that gets conflated constantly. **Hover does not exist on touch devices.** Any information revealed only on hover is invisible to most of your users, which is why tooltips as the only explanation of an icon is a failure and why hover-only menus are a recurring accessibility complaint.\n\n**Focus does not appear for mouse users**, and should not: a focus ring after every click was the original reason people removed focus styles. `:focus-visible` gives the ring to keyboard users and not to mouse clicks, which resolves the conflict entirely and is the correct selector to use.\n\nSo the two states serve different people, need different treatments, and neither substitutes for the other.\n\n## Disabled is the one that goes wrong\n\nDisabled controls are conventionally shown at low contrast to signal unavailability, and WCAG explicitly exempts disabled controls from the contrast requirements. That exemption is real, it is also widely criticised, and it produces a genuine problem: a disabled button that nobody can read is a control whose label cannot be checked, by anybody, including people with perfect vision in bright light.\n\nThe deeper problem is that disabled controls communicate nothing about **why**. A Submit button that is greyed out tells the user they cannot proceed and not what to fix. They then hunt.\n\nThree better patterns, in order of how often they apply:\n\n1. **Keep the control enabled and explain on activation.** The user presses Submit, and the form shows what is missing and moves focus there. This is the strongest pattern for forms and it is now common.\n2. **Say why next to the control.** If it must be disabled, put the reason in text beside it, not in a tooltip that touch users cannot reach.\n3. **Hide it entirely**, where the action is not merely unavailable but irrelevant in this context.\n\nIf you do keep a disabled state, make it legible anyway. The exemption permits low contrast; nothing requires it.\n\n## Loading, and the width problem\n\nA button that replaces its label with a spinner changes width, which shifts everything beside it. The user's finger is already moving.\n\nFix it by reserving the width: keep the label in place at reduced opacity and overlay the spinner, or set an explicit minimum width so the shortest state and the longest state are the same size. This is the layout-shift point from the previous block, at component scale.\n\nAlso decide what the button does while loading. The correct answer is almost always that it stops accepting presses, because the common failure is a user tapping three times and submitting three orders.\n\n## Error is a component state, not a screen\n\nAn invalid field needs: a changed border, an icon, a message, and (from the colour block) none of those carrying the meaning alone. The message goes next to the field, not at the top of the form, because a message at the top makes the user hunt for which field it refers to.\n\nThe field should also keep what the user typed. Clearing an invalid field is the single most disliked behaviour in form design, and it is still common.\n\n## Specify them together\n\nThe practical method is a small table of decisions per component, drawn once:\n\n```\nButton, primary\n  default   surface: --colour-action        label: --colour-on-action\n  hover     surface: --colour-action-hover\n  active    surface: --colour-action-active, translate-y 1px\n  focus     ring: 2px --colour-focus, offset 2px\n  disabled  surface: --colour-action-muted, cursor default\n  loading   label at 0% opacity, spinner centred, width locked\n```\n\nSix rows. It takes ten minutes, it removes a week of small inconsistencies later, and every value in it is a token from the earlier lesson rather than a number."},"check":{"question":"A signup form disables Submit until every field is valid. Users report getting stuck without knowing why. The team proposes adding a tooltip on the disabled button explaining what is missing. What is the flaw?","options":[{"text":"Disabled controls are exempt from contrast requirements, so the tooltip's text would not be required to meet 4.5:1 and would be unreadable for the same users who are already stuck.","correct":false,"tempting":"Extends the exemption from the control to an associated tooltip, and treats contrast as the obstacle rather than reachability."},{"text":"A tooltip requires hover, so touch users (most of them) cannot reach the explanation at all.","correct":true},{"text":"The explanation belongs at the top of the form rather than on the button, so the user sees every outstanding problem in one place before acting.","correct":false,"tempting":"Moves the message somewhere that forces the user to hunt for which field each item refers to."},{"text":"Disabled buttons should never be used in forms under any circumstances, so the tooltip is treating a symptom of a pattern that has to be removed entirely.","correct":false,"tempting":"Hardens a useful default into an absolute, when the real objection is that the chosen explanation is unreachable."}]},"prev":{"slug":"components-and-variants","title":"Variant, or a new thing","url":"https://addaly.com/learn/design-foundations/components-and-variants"},"next":{"slug":"icons-as-a-system","title":"Icons are a set, not a collection","url":"https://addaly.com/learn/design-foundations/icons-as-a-system"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Every state you did not draw still ships', in Design, before Any Software. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/design-foundations/states-are-part-of-the-component (Accessed: 21 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Every state you did not draw still ships","courseTitle":"Design, before Any Software","module":{"index":7,"slug":"making-decisions-once","title":"Making the decision once"},"answer":null,"keyIdea":"A component ships in every state whether or not it was designed, hover and focus serve different audiences and never substitute for each other, and a disabled control that cannot be read or explained should usually be an enabled control that explains what is missing on activation.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"the-list","runs":[{"text":"The list"}]},{"t":"p","runs":[{"text":"A component exists in more conditions than the one in the mockup. For anything interactive:"}]},{"t":"code","lang":"","label":"Text","text":"default        resting\nhover          pointer over it (does not exist on touch)\nfocus-visible  keyboard focus (does not exist for mouse users)\nactive         being pressed\ndisabled       not available\nloading        working\nselected       currently chosen, in a set\nerror          in an invalid condition\nread-only      shown but not editable\nvisited        for links"},{"t":"p","runs":[{"text":"Every one of these ships whether or not somebody designed it. Undesigned, they ship as the browser’s defaults, which are inconsistent across platforms, or as nothing at all, which means the interface does not respond to being used."}]},{"t":"h2","id":"hover-and-focus-are-different-audiences","runs":[{"text":"Hover and focus are different audiences"}]},{"t":"p","runs":[{"text":"A point that gets conflated constantly. "},{"text":"Hover does not exist on touch devices.","b":true},{"text":" Any information revealed only on hover is invisible to most of your users, which is why tooltips as the only explanation of an icon is a failure and why hover-only menus are a recurring accessibility complaint."}]},{"t":"p","runs":[{"text":"Focus does not appear for mouse users","b":true},{"text":", and should not: a focus ring after every click was the original reason people removed focus styles. "},{"text":":focus-visible","code":true},{"text":" gives the ring to keyboard users and not to mouse clicks, which resolves the conflict entirely and is the correct selector to use."}]},{"t":"p","runs":[{"text":"So the two states serve different people, need different treatments, and neither substitutes for the other."}]},{"t":"h2","id":"disabled-is-the-one-that-goes-wrong","runs":[{"text":"Disabled is the one that goes wrong"}]},{"t":"p","runs":[{"text":"Disabled controls are conventionally shown at low contrast to signal unavailability, and WCAG explicitly exempts disabled controls from the contrast requirements. That exemption is real, it is also widely criticised, and it produces a genuine problem: a disabled button that nobody can read is a control whose label cannot be checked, by anybody, including people with perfect vision in bright light."}]},{"t":"p","runs":[{"text":"The deeper problem is that disabled controls communicate nothing about "},{"text":"why","b":true},{"text":". A Submit button that is greyed out tells the user they cannot proceed and not what to fix. They then hunt."}]},{"t":"p","runs":[{"text":"Three better patterns, in order of how often they apply:"}]},{"t":"ol","start":1,"items":[[{"text":"Keep the control enabled and explain on activation.","b":true},{"text":" The user presses Submit, and the form shows what is missing and moves focus there. This is the strongest pattern for forms and it is now common."}],[{"text":"Say why next to the control.","b":true},{"text":" If it must be disabled, put the reason in text beside it, not in a tooltip that touch users cannot reach."}],[{"text":"Hide it entirely","b":true},{"text":", where the action is not merely unavailable but irrelevant in this context."}]]},{"t":"p","runs":[{"text":"If you do keep a disabled state, make it legible anyway. The exemption permits low contrast; nothing requires it."}]},{"t":"h2","id":"loading-and-the-width-problem","runs":[{"text":"Loading, and the width problem"}]},{"t":"p","runs":[{"text":"A button that replaces its label with a spinner changes width, which shifts everything beside it. The user’s finger is already moving."}]},{"t":"p","runs":[{"text":"Fix it by reserving the width: keep the label in place at reduced opacity and overlay the spinner, or set an explicit minimum width so the shortest state and the longest state are the same size. This is the layout-shift point from the previous block, at component scale."}]},{"t":"p","runs":[{"text":"Also decide what the button does while loading. The correct answer is almost always that it stops accepting presses, because the common failure is a user tapping three times and submitting three orders."}]},{"t":"h2","id":"error-is-a-component-state-not-a-screen","runs":[{"text":"Error is a component state, not a screen"}]},{"t":"p","runs":[{"text":"An invalid field needs: a changed border, an icon, a message, and (from the colour block) none of those carrying the meaning alone. The message goes next to the field, not at the top of the form, because a message at the top makes the user hunt for which field it refers to."}]},{"t":"p","runs":[{"text":"The field should also keep what the user typed. Clearing an invalid field is the single most disliked behaviour in form design, and it is still common."}]},{"t":"h2","id":"specify-them-together","runs":[{"text":"Specify them together"}]},{"t":"p","runs":[{"text":"The practical method is a small table of decisions per component, drawn once:"}]},{"t":"code","lang":"","label":"Text","text":"Button, primary\n  default   surface: --colour-action        label: --colour-on-action\n  hover     surface: --colour-action-hover\n  active    surface: --colour-action-active, translate-y 1px\n  focus     ring: 2px --colour-focus, offset 2px\n  disabled  surface: --colour-action-muted, cursor default\n  loading   label at 0% opacity, spinner centred, width locked"},{"t":"p","runs":[{"text":"Six rows. It takes ten minutes, it removes a week of small inconsistencies later, and every value in it is a token from the earlier lesson rather than a number."}]}],"check":{"question":[{"text":"A signup form disables Submit until every field is valid. Users report getting stuck without knowing why. The team proposes adding a tooltip on the disabled button explaining what is missing. What is the flaw?"}],"options":[{"text":[{"text":"Disabled controls are exempt from contrast requirements, so the tooltip’s text would not be required to meet 4.5:1 and would be unreadable for the same users who are already stuck."}],"correct":false,"tempting":[{"text":"Extends the exemption from the control to an associated tooltip, and treats contrast as the obstacle rather than reachability."}]},{"text":[{"text":"A tooltip requires hover, so touch users (most of them) cannot reach the explanation at all."}],"correct":true,"tempting":null},{"text":[{"text":"The explanation belongs at the top of the form rather than on the button, so the user sees every outstanding problem in one place before acting."}],"correct":false,"tempting":[{"text":"Moves the message somewhere that forces the user to hunt for which field each item refers to."}]},{"text":[{"text":"Disabled buttons should never be used in forms under any circumstances, so the tooltip is treating a symptom of a pattern that has to be removed entirely."}],"correct":false,"tempting":[{"text":"Hardens a useful default into an absolute, when the real objection is that the chosen explanation is unreachable."}]}],"order":[3,1,0,2],"why":null},"prev":{"slug":"components-and-variants","title":"Variant, or a new thing","minutes":9},"next":{"slug":"icons-as-a-system","title":"Icons are a set, not a collection","minutes":8}}}