{"id":"section-aria-and-screen-reader-usability-6","title":"ARIA and Screen Reader Usability","text":"# ARIA and Screen Reader Usability\n\n> “HTML is screen reader UX.” \n> — Ian Pouncey\n\nThe meaning and structure encoded in HTML shape what people can find, understand and do with a screen reader. Headings, lists, landmarks, labels, reading order, control behaviour and content relationships are part of the interface. ARIA contributes to this experience when native HTML cannot express the necessary semantics. It does not replace accessible structure or interaction.\n\n## Contents\n\n- [Scope](#scope)\n- [Design the visual and screen reader experiences together](#design-the-visual-and-screen-reader-experiences-together)\n- [What ARIA provides](#what-aria-provides)\n- [Repair the cause before adding ARIA](#repair-the-cause-before-adding-aria)\n- [Use ARIA with care](#use-aria-with-care)\n- [Design and development handover](#design-and-development-handover)\n- [Review the implemented experience](#review-the-implemented-experience)\n- [Sources](#sources)\n\n## Scope\n\nUse this guide when planning a web interface, documenting a component, reviewing markup or deciding whether ARIA is needed. It covers cross-cutting design decisions. For decisions about content hidden visually, from assistive technology, or from both, see [Visually Hidden Content](Visually%20Hidden%20Content.md). Use the owning Cosmos pattern guide for the behaviour of a particular component, such as [Tabs](Tabs.md), [Disclosure](Disclosure.md), [Modal Dialogs](Modal%20Dialogs.md) or [Dynamic Content](Dynamic%20Content.md).\n\nARIA is a W3C specification for adding or refining semantics that browsers expose through accessibility APIs. It is commonly used by assistive technologies, including screen readers. A browser and assistive technology interpret and present those semantics together; ARIA does not dictate one exact spoken phrase. Support and output can vary by browser, assistive technology, platform, settings and interaction mode.\n\n## Design the visual and screen reader experiences together\n\nA screen reader experience is not a separate, hidden version of a visual interface. It is another way to perceive and navigate the same product. Design both experiences together:\n\n- Use semantic structure to convey the hierarchy and relationships that the visual design shows. Headings, lists, tables, landmarks, form groups and source order help people understand and move through content.\n- Keep visual and programmatic states aligned. If a control looks expanded, selected, checked, unavailable or invalid, its native state or accessibility state must reflect that condition.\n- Give controls names that identify their visible purpose. People may navigate by control lists or use speech input, and many screen reader users can also see some of the interface. Do not replace visible wording with a different or conflicting accessible name.\n- Keep task context available when a person reaches a control out of reading order, such as from a list of links, buttons or form fields. Follow [Labels](Labels.md) and [Designing the Screen Reader Journey](Designing%20the%20Screen%20Reader%20Journey.md).\n- Keep announcements useful and concise. A screen reader user may be scanning headings, landmarks, links or controls, listening to content, using speech input, or reading braille. Avoid extra instructions, repeated labels, unnecessary landmarks and duplicate announcements that make the experience harder to navigate.\n\n## What ARIA provides\n\nARIA roles identify the kind of interface object or region exposed to assistive technology. States and properties expose information such as whether a custom control is expanded, selected, required or invalid, or how content relates to another element. Accessible name and description attributes can supply text or reference existing text.\n\nARIA does not create visual styling, keyboard operation, focus management, event handling or content structure. A `role=\"button\"` on a `div` does not make that element look, focus or behave like a native button. The implementation still needs the right interaction, focus behaviour, visible affordance and state changes.\n\nLikewise, adding `aria-live` does not make every update helpful, and adding `aria-controls` does not show, hide or move focus to the referenced content. Use a relationship only where the selected pattern needs it, and implement the behaviour separately.\n\n## Repair the cause before adding ARIA\n\nStart with the element, content or interaction that caused the barrier. If the underlying code can be corrected, fix it rather than masking the problem with ARIA. ARIA may be a temporary mitigation when an immediate repair is not possible, but it must not be presented as the completed fix. Record the remaining barrier, owner, scope and condition for removing the workaround.\n\nUse this decision order:\n\n1. **Identify the user need and observed barrier.** State what the person needs to find, understand or do, and what currently prevents it.\n2. **Check for a suitable native HTML element or attribute.** Use it when its built-in meaning and behaviour fit the task. A native link, button, label, heading, list, form control or `details` disclosure usually provides more than a role alone.\n3. **Repair the structure or behaviour where it is wrong.** Correct an element used for the wrong purpose, a missing visible label, a broken reading order, an inaccessible focus path, or a state that does not match what is shown.\n4. **Add only the ARIA needed to express a remaining semantic gap.** Check that the role and attributes are permitted for the element in [ARIA in HTML](https://www.w3.org/TR/html-aria/), and that the intended pattern is defined in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/).\n5. **Implement and test the complete interaction.** A role is a promise about what the control is and how it can be used. Provide the expected keyboard interaction, focus handling, visible state, accessible state and recovery behaviour.\n6. **Check the outcome with the supported browser and assistive technology combinations.** Do not infer success from the presence of ARIA attributes or from a validator alone.\n\n| Barrier or tempting shortcut | Better starting point |\n| --- | --- |\n| A `span` or `div` styled as a link and activated with a click handler | Use an `a` element with a working `href` for navigation. |\n| A generic element styled as a button | Use a native `button` for an action. If a custom widget is genuinely required, implement its complete keyboard and focus behaviour as well as its semantics. |\n| A custom disclosure built from a button when native disclosure fits | Prefer `details` and `summary`. For a custom disclosure, keep the button’s `aria-expanded` value synchronised with the panel’s actual visibility. |\n| A form control with no usable label | Add a visible, programmatically associated `label`. Use ARIA only where a native label cannot meet the real design requirement; do not use it to conceal a missing label. |\n| A visible section that is hard to find in the code or reading order | Repair headings, source order or page structure. Do not add a landmark role merely to make the section appear in more navigation lists. |\n\n## Use ARIA with care\n\n### Preserve native semantics\n\nDo not add a role that repeats an element’s native role. Do not change native semantics unless a documented interaction requires it and the complete replacement pattern is implemented. For example, changing a button’s role to `tab` changes what assistive technology understands about it; it does not create a tab interface. A tab pattern also needs the associated tab list and panels, selected state, focus model and expected keyboard operation. See [Tabs](Tabs.md).\n\nUse the specific role and pattern that match the interaction. A site navigation list is not a menu widget just because it contains links. An alert is not a general way to make text noticeable. A screen reader announcement is not a substitute for leaving important content available to read again.\n\n### Name and describe controls without contradiction\n\nPrefer visible text and native naming mechanisms. For a form field, use an associated `label`; for a named region, refer to its visible heading where appropriate. Use `aria-label` only when a suitable visible name is not available and the element supports naming. An ARIA name can replace visible text in the accessibility tree, so check that it does not remove useful descendant content or conflict with the label a person sees.\n\nKeep the visible label within the accessible name, with its wording first where additional context is needed. This supports speech input and helps avoid a mismatch between what someone sees and what they can say. Use `aria-describedby` for short, relevant supplementary information, not to attach a long block of unrelated content to every control. Refer to [Labels](Labels.md) and [Anchors and Links](Anchors%20and%20Links.md).\n\n### Keep states true and synchronised\n\nUse native state when it exists. For a custom control, define a single source of truth for the visible and programmatic state, then update them together. For example, when a custom disclosure opens, reveal its panel and change `aria-expanded` to `true`; when it closes, hide the panel and set the state to `false`. Do not use ARIA state to claim that an action succeeded before the interface has actually changed.\n\nKeep ID references such as `aria-labelledby` and `aria-describedby` unique and valid. A broken reference can leave a control without the intended name or description. Use `aria-controls` only when it serves the chosen pattern; it expresses a relationship but does not implement the controlled behaviour.\n\n### Avoid unnecessary output and conflicting information\n\nScreen reader output is shaped by markup, content, browser and user preferences. Do not try to prescribe a fixed spoken script or add words to every control “just in case”. Repeated announcements, long descriptions, overly named regions, and live updates for changes that are already obvious can make navigation noisy and tiring. The 2026 WebAIM Million found that sampled home pages with ARIA had more detected errors on average than pages without ARIA. WebAIM also notes that these pages were more complex and that the correlation does not establish ARIA as the cause. Treat this as a reason to review complexity and implementation quality, not as evidence that ARIA itself causes barriers.\n\nBefore adding a role, name, state, description or live announcement, ask:\n\n- What meaningful information is currently missing for the person?\n- Is that information already conveyed by native HTML, visible text, position or an existing announcement?\n- Will this addition remain concise, accurate and useful in the context where it is encountered?\n- Can the person review important information after an announcement has finished?\n\nDo not apply `aria-hidden=\"true\"` to a focusable element or to a container that contains visible interactive controls. It hides content from assistive technology without necessarily removing it from keyboard focus, which can leave a person focusing on something they cannot perceive through their assistive technology. If content should be hidden from everyone, use an appropriate visual and interaction technique as well as managing its focus and state.\n\n## Design and development handover\n\nDocument the intended user experience, not a guaranteed phrase that every screen reader must speak. For each component or journey state, specify:\n\n| Record | What to describe |\n| --- | --- |\n| Purpose and structure | The user task, the suitable native elements, the content hierarchy and how the visual grouping is represented in the DOM and reading order. |\n| Names and relationships | The visible label, accessible name source, relevant description, and any ID-based relationships. State which text is essential and where it appears. |\n| Role and state | The intended role, current state, state changes and how they stay aligned with the visible interface. Use native semantics where they fit. |\n| Input and focus | Pointer, touch, keyboard and speech input where applicable; activation keys; focus entry, movement, return and visibility. |\n| Reading and announcements | What a person can find through headings, landmarks, links, controls and normal reading; which changes need an announcement, why, and how the information remains available. |\n| Variants and fallback | Differences by platform or implementation, the supported browser and assistive technology combinations, and what remains usable if scripting or an enhancement is unavailable. |\n\nUse the owning Cosmos component guide to define its detailed interaction. For task-level reading sequence, focus and recovery, see [Designing the Screen Reader Journey](Designing%20the%20Screen%20Reader%20Journey.md).\n\n## Review the implemented experience\n\nReview both the visual interface and what the browser exposes to assistive technology. Use an accessibility tree or browser inspection to check roles, names, states and relationships, then use the actual supported assistive technology combinations to observe how people can navigate and operate the interface.\n\n- Check that the accessibility tree expresses the same content, grouping, labels and state that the visual interface communicates.\n- Navigate by headings, landmarks, links, form controls and reading order. Confirm that important parts of the task are findable and make sense out of context.\n- Operate each interactive pattern with a keyboard and other supported input methods. Check that focus remains visible and that no control is hidden from assistive technology while still focusable.\n- Trigger opening, closing, selection, validation and dynamic updates. Confirm that state changes are communicated once, accurately, and without unexpected focus movement.\n- Compare results across the product’s supported browser and assistive technology combinations. Record the environment and observed output; do not fail a test solely because a screen reader uses a different phrase or order than an illustrative example.\n- Use automated checks to find detectable markup problems, but review meaning, usability and task completion with people and assistive technologies. An ARIA validator or automated scan cannot establish that the screen reader experience is coherent.\n\nFor patterns with complex keyboard interaction, follow the corresponding guide and the relevant APG pattern rather than relying on this cross-cutting checklist.\n\n## Sources\n\n- [WAI-ARIA 1.2 specification](https://www.w3.org/TR/wai-aria-1.2/)\n- [ARIA in HTML](https://www.w3.org/TR/html-aria/)\n- [Using ARIA](https://www.w3.org/TR/using-aria/)\n- [ARIA Authoring Practices Guide: names and descriptions](https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/)\n- [ARIA Authoring Practices Guide: design patterns](https://www.w3.org/WAI/ARIA/apg/patterns/)\n- [WebAIM: Introduction to ARIA](https://webaim.org/techniques/aria/)\\n- [WebAIM: The 2026 Million report](https://webaim.org/projects/million/)\n- [TetraLogical: Foundations — introduction to WAI-ARIA](https://tetralogical.com/blog/2023/02/10/foundations-wai-aria/)\n- [TetraLogical: Foundations — HTML semantics](https://tetralogical.com/blog/2022/10/05/foundations-html-semantics/)\n- [TetraLogical: Browsing with a desktop screen reader](https://tetralogical.com/blog/2021/09/29/browsing-with-a-desktop-screen-reader/)\n- [TetraLogical: Common misconceptions about screen readers](https://tetralogical.com/blog/2025/10/14/common-misconceptions-about-screen-readers/)\n- [BBC Accessibility, Your Team and You: How to document the screen reader user experience](https://bbc.github.io/accessibility-news-and-you/guides/screen-reader-ux.html)\n- [BBC Accessibility, Your Team and You: Accessibility swarm checklist](https://bbc.github.io/accessibility-news-and-you/checklist/accessibility-swarm.html)\n- [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":6,"source_end_line":144,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"e7275a2f66f4d0b275e748fb9b83df0a4febe3533a13ff691f7daa65db24f908","heading_path":["ARIA and Screen Reader Usability"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-13","title":"Contents","text":"## Contents\n\n- [Scope](#scope)\n- [Design the visual and screen reader experiences together](#design-the-visual-and-screen-reader-experiences-together)\n- [What ARIA provides](#what-aria-provides)\n- [Repair the cause before adding ARIA](#repair-the-cause-before-adding-aria)\n- [Use ARIA with care](#use-aria-with-care)\n- [Design and development handover](#design-and-development-handover)\n- [Review the implemented experience](#review-the-implemented-experience)\n- [Sources](#sources)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":13,"source_end_line":22,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"4c617ea81853126ec9a117f89313ca3ef729dedfe47697ccd458efcf0c9adde9","heading_path":["ARIA and Screen Reader Usability","Contents"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-24","title":"Scope","text":"## Scope\n\nUse this guide when planning a web interface, documenting a component, reviewing markup or deciding whether ARIA is needed. It covers cross-cutting design decisions. For decisions about content hidden visually, from assistive technology, or from both, see [Visually Hidden Content](Visually%20Hidden%20Content.md). Use the owning Cosmos pattern guide for the behaviour of a particular component, such as [Tabs](Tabs.md), [Disclosure](Disclosure.md), [Modal Dialogs](Modal%20Dialogs.md) or [Dynamic Content](Dynamic%20Content.md).\n\nARIA is a W3C specification for adding or refining semantics that browsers expose through accessibility APIs. It is commonly used by assistive technologies, including screen readers. A browser and assistive technology interpret and present those semantics together; ARIA does not dictate one exact spoken phrase. Support and output can vary by browser, assistive technology, platform, settings and interaction mode.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":24,"source_end_line":28,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"3d134a7c1ae89b2854c6ec50680f923d7dd8818db98a93577ff1cb0ef83c6e6e","heading_path":["ARIA and Screen Reader Usability","Scope"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-30","title":"Design the visual and screen reader experiences together","text":"## Design the visual and screen reader experiences together\n\nA screen reader experience is not a separate, hidden version of a visual interface. It is another way to perceive and navigate the same product. Design both experiences together:\n\n- Use semantic structure to convey the hierarchy and relationships that the visual design shows. Headings, lists, tables, landmarks, form groups and source order help people understand and move through content.\n- Keep visual and programmatic states aligned. If a control looks expanded, selected, checked, unavailable or invalid, its native state or accessibility state must reflect that condition.\n- Give controls names that identify their visible purpose. People may navigate by control lists or use speech input, and many screen reader users can also see some of the interface. Do not replace visible wording with a different or conflicting accessible name.\n- Keep task context available when a person reaches a control out of reading order, such as from a list of links, buttons or form fields. Follow [Labels](Labels.md) and [Designing the Screen Reader Journey](Designing%20the%20Screen%20Reader%20Journey.md).\n- Keep announcements useful and concise. A screen reader user may be scanning headings, landmarks, links or controls, listening to content, using speech input, or reading braille. Avoid extra instructions, repeated labels, unnecessary landmarks and duplicate announcements that make the experience harder to navigate.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":30,"source_end_line":38,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"4e55071b1c6192271e1b34fc6048e87c7ae1cb81eddf86804ba9811d287443cc","heading_path":["ARIA and Screen Reader Usability","Design the visual and screen reader experiences together"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-40","title":"What ARIA provides","text":"## What ARIA provides\n\nARIA roles identify the kind of interface object or region exposed to assistive technology. States and properties expose information such as whether a custom control is expanded, selected, required or invalid, or how content relates to another element. Accessible name and description attributes can supply text or reference existing text.\n\nARIA does not create visual styling, keyboard operation, focus management, event handling or content structure. A `role=\"button\"` on a `div` does not make that element look, focus or behave like a native button. The implementation still needs the right interaction, focus behaviour, visible affordance and state changes.\n\nLikewise, adding `aria-live` does not make every update helpful, and adding `aria-controls` does not show, hide or move focus to the referenced content. Use a relationship only where the selected pattern needs it, and implement the behaviour separately.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":40,"source_end_line":46,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"80fed855629135f7ca634fb50e4e073eeee821ccb97eafed5c6ba2e01ab6e340","heading_path":["ARIA and Screen Reader Usability","What ARIA provides"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-48","title":"Repair the cause before adding ARIA","text":"## Repair the cause before adding ARIA\n\nStart with the element, content or interaction that caused the barrier. If the underlying code can be corrected, fix it rather than masking the problem with ARIA. ARIA may be a temporary mitigation when an immediate repair is not possible, but it must not be presented as the completed fix. Record the remaining barrier, owner, scope and condition for removing the workaround.\n\nUse this decision order:\n\n1. **Identify the user need and observed barrier.** State what the person needs to find, understand or do, and what currently prevents it.\n2. **Check for a suitable native HTML element or attribute.** Use it when its built-in meaning and behaviour fit the task. A native link, button, label, heading, list, form control or `details` disclosure usually provides more than a role alone.\n3. **Repair the structure or behaviour where it is wrong.** Correct an element used for the wrong purpose, a missing visible label, a broken reading order, an inaccessible focus path, or a state that does not match what is shown.\n4. **Add only the ARIA needed to express a remaining semantic gap.** Check that the role and attributes are permitted for the element in [ARIA in HTML](https://www.w3.org/TR/html-aria/), and that the intended pattern is defined in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/).\n5. **Implement and test the complete interaction.** A role is a promise about what the control is and how it can be used. Provide the expected keyboard interaction, focus handling, visible state, accessible state and recovery behaviour.\n6. **Check the outcome with the supported browser and assistive technology combinations.** Do not infer success from the presence of ARIA attributes or from a validator alone.\n\n| Barrier or tempting shortcut | Better starting point |\n| --- | --- |\n| A `span` or `div` styled as a link and activated with a click handler | Use an `a` element with a working `href` for navigation. |\n| A generic element styled as a button | Use a native `button` for an action. If a custom widget is genuinely required, implement its complete keyboard and focus behaviour as well as its semantics. |\n| A custom disclosure built from a button when native disclosure fits | Prefer `details` and `summary`. For a custom disclosure, keep the button’s `aria-expanded` value synchronised with the panel’s actual visibility. |\n| A form control with no usable label | Add a visible, programmatically associated `label`. Use ARIA only where a native label cannot meet the real design requirement; do not use it to conceal a missing label. |\n| A visible section that is hard to find in the code or reading order | Repair headings, source order or page structure. Do not add a landmark role merely to make the section appear in more navigation lists. |","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":48,"source_end_line":67,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"e356b6b731cbd15baec20008a65b4efc8d66093d76863a268680f2cbbd35e7db","heading_path":["ARIA and Screen Reader Usability","Repair the cause before adding ARIA"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-69","title":"Use ARIA with care","text":"## Use ARIA with care\n\n### Preserve native semantics\n\nDo not add a role that repeats an element’s native role. Do not change native semantics unless a documented interaction requires it and the complete replacement pattern is implemented. For example, changing a button’s role to `tab` changes what assistive technology understands about it; it does not create a tab interface. A tab pattern also needs the associated tab list and panels, selected state, focus model and expected keyboard operation. See [Tabs](Tabs.md).\n\nUse the specific role and pattern that match the interaction. A site navigation list is not a menu widget just because it contains links. An alert is not a general way to make text noticeable. A screen reader announcement is not a substitute for leaving important content available to read again.\n\n### Name and describe controls without contradiction\n\nPrefer visible text and native naming mechanisms. For a form field, use an associated `label`; for a named region, refer to its visible heading where appropriate. Use `aria-label` only when a suitable visible name is not available and the element supports naming. An ARIA name can replace visible text in the accessibility tree, so check that it does not remove useful descendant content or conflict with the label a person sees.\n\nKeep the visible label within the accessible name, with its wording first where additional context is needed. This supports speech input and helps avoid a mismatch between what someone sees and what they can say. Use `aria-describedby` for short, relevant supplementary information, not to attach a long block of unrelated content to every control. Refer to [Labels](Labels.md) and [Anchors and Links](Anchors%20and%20Links.md).\n\n### Keep states true and synchronised\n\nUse native state when it exists. For a custom control, define a single source of truth for the visible and programmatic state, then update them together. For example, when a custom disclosure opens, reveal its panel and change `aria-expanded` to `true`; when it closes, hide the panel and set the state to `false`. Do not use ARIA state to claim that an action succeeded before the interface has actually changed.\n\nKeep ID references such as `aria-labelledby` and `aria-describedby` unique and valid. A broken reference can leave a control without the intended name or description. Use `aria-controls` only when it serves the chosen pattern; it expresses a relationship but does not implement the controlled behaviour.\n\n### Avoid unnecessary output and conflicting information\n\nScreen reader output is shaped by markup, content, browser and user preferences. Do not try to prescribe a fixed spoken script or add words to every control “just in case”. Repeated announcements, long descriptions, overly named regions, and live updates for changes that are already obvious can make navigation noisy and tiring. The 2026 WebAIM Million found that sampled home pages with ARIA had more detected errors on average than pages without ARIA. WebAIM also notes that these pages were more complex and that the correlation does not establish ARIA as the cause. Treat this as a reason to review complexity and implementation quality, not as evidence that ARIA itself causes barriers.\n\nBefore adding a role, name, state, description or live announcement, ask:\n\n- What meaningful information is currently missing for the person?\n- Is that information already conveyed by native HTML, visible text, position or an existing announcement?\n- Will this addition remain concise, accurate and useful in the context where it is encountered?\n- Can the person review important information after an announcement has finished?\n\nDo not apply `aria-hidden=\"true\"` to a focusable element or to a container that contains visible interactive controls. It hides content from assistive technology without necessarily removing it from keyboard focus, which can leave a person focusing on something they cannot perceive through their assistive technology. If content should be hidden from everyone, use an appropriate visual and interaction technique as well as managing its focus and state.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":69,"source_end_line":100,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"9d1df29c271519ced38e16bda9d0f726a174bea00c0d1e05ae6babd1cfe8371e","heading_path":["ARIA and Screen Reader Usability","Use ARIA with care"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-71","title":"Preserve native semantics","text":"### Preserve native semantics\n\nDo not add a role that repeats an element’s native role. Do not change native semantics unless a documented interaction requires it and the complete replacement pattern is implemented. For example, changing a button’s role to `tab` changes what assistive technology understands about it; it does not create a tab interface. A tab pattern also needs the associated tab list and panels, selected state, focus model and expected keyboard operation. See [Tabs](Tabs.md).\n\nUse the specific role and pattern that match the interaction. A site navigation list is not a menu widget just because it contains links. An alert is not a general way to make text noticeable. A screen reader announcement is not a substitute for leaving important content available to read again.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":71,"source_end_line":75,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"d36586b1f505ba2a8dc96f9d7c1551fc3f6bff406561b9e86159ea24335b80e0","heading_path":["ARIA and Screen Reader Usability","Use ARIA with care","Preserve native semantics"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-77","title":"Name and describe controls without contradiction","text":"### Name and describe controls without contradiction\n\nPrefer visible text and native naming mechanisms. For a form field, use an associated `label`; for a named region, refer to its visible heading where appropriate. Use `aria-label` only when a suitable visible name is not available and the element supports naming. An ARIA name can replace visible text in the accessibility tree, so check that it does not remove useful descendant content or conflict with the label a person sees.\n\nKeep the visible label within the accessible name, with its wording first where additional context is needed. This supports speech input and helps avoid a mismatch between what someone sees and what they can say. Use `aria-describedby` for short, relevant supplementary information, not to attach a long block of unrelated content to every control. Refer to [Labels](Labels.md) and [Anchors and Links](Anchors%20and%20Links.md).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":77,"source_end_line":81,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"e61f6015c54165879edf2f055bfd1c2bf27fa31d4abc2af57137e7323017b4f7","heading_path":["ARIA and Screen Reader Usability","Use ARIA with care","Name and describe controls without contradiction"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-83","title":"Keep states true and synchronised","text":"### Keep states true and synchronised\n\nUse native state when it exists. For a custom control, define a single source of truth for the visible and programmatic state, then update them together. For example, when a custom disclosure opens, reveal its panel and change `aria-expanded` to `true`; when it closes, hide the panel and set the state to `false`. Do not use ARIA state to claim that an action succeeded before the interface has actually changed.\n\nKeep ID references such as `aria-labelledby` and `aria-describedby` unique and valid. A broken reference can leave a control without the intended name or description. Use `aria-controls` only when it serves the chosen pattern; it expresses a relationship but does not implement the controlled behaviour.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":83,"source_end_line":87,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"41a586100ab079c7036dc9625e37a9c1cf1d7d2276e71211094865805d597bdc","heading_path":["ARIA and Screen Reader Usability","Use ARIA with care","Keep states true and synchronised"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-89","title":"Avoid unnecessary output and conflicting information","text":"### Avoid unnecessary output and conflicting information\n\nScreen reader output is shaped by markup, content, browser and user preferences. Do not try to prescribe a fixed spoken script or add words to every control “just in case”. Repeated announcements, long descriptions, overly named regions, and live updates for changes that are already obvious can make navigation noisy and tiring. The 2026 WebAIM Million found that sampled home pages with ARIA had more detected errors on average than pages without ARIA. WebAIM also notes that these pages were more complex and that the correlation does not establish ARIA as the cause. Treat this as a reason to review complexity and implementation quality, not as evidence that ARIA itself causes barriers.\n\nBefore adding a role, name, state, description or live announcement, ask:\n\n- What meaningful information is currently missing for the person?\n- Is that information already conveyed by native HTML, visible text, position or an existing announcement?\n- Will this addition remain concise, accurate and useful in the context where it is encountered?\n- Can the person review important information after an announcement has finished?\n\nDo not apply `aria-hidden=\"true\"` to a focusable element or to a container that contains visible interactive controls. It hides content from assistive technology without necessarily removing it from keyboard focus, which can leave a person focusing on something they cannot perceive through their assistive technology. If content should be hidden from everyone, use an appropriate visual and interaction technique as well as managing its focus and state.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":89,"source_end_line":100,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"08277f6d035c3f3da88f7dcbc393d7948faf705f5f74c4f9ae64e7e7041fb952","heading_path":["ARIA and Screen Reader Usability","Use ARIA with care","Avoid unnecessary output and conflicting information"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-102","title":"Design and development handover","text":"## Design and development handover\n\nDocument the intended user experience, not a guaranteed phrase that every screen reader must speak. For each component or journey state, specify:\n\n| Record | What to describe |\n| --- | --- |\n| Purpose and structure | The user task, the suitable native elements, the content hierarchy and how the visual grouping is represented in the DOM and reading order. |\n| Names and relationships | The visible label, accessible name source, relevant description, and any ID-based relationships. State which text is essential and where it appears. |\n| Role and state | The intended role, current state, state changes and how they stay aligned with the visible interface. Use native semantics where they fit. |\n| Input and focus | Pointer, touch, keyboard and speech input where applicable; activation keys; focus entry, movement, return and visibility. |\n| Reading and announcements | What a person can find through headings, landmarks, links, controls and normal reading; which changes need an announcement, why, and how the information remains available. |\n| Variants and fallback | Differences by platform or implementation, the supported browser and assistive technology combinations, and what remains usable if scripting or an enhancement is unavailable. |\n\nUse the owning Cosmos component guide to define its detailed interaction. For task-level reading sequence, focus and recovery, see [Designing the Screen Reader Journey](Designing%20the%20Screen%20Reader%20Journey.md).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":102,"source_end_line":115,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"8af75326b950d3b6aef412b0129b54867a8a91fa9396a0d86b302d9128ba750a","heading_path":["ARIA and Screen Reader Usability","Design and development handover"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-117","title":"Review the implemented experience","text":"## Review the implemented experience\n\nReview both the visual interface and what the browser exposes to assistive technology. Use an accessibility tree or browser inspection to check roles, names, states and relationships, then use the actual supported assistive technology combinations to observe how people can navigate and operate the interface.\n\n- Check that the accessibility tree expresses the same content, grouping, labels and state that the visual interface communicates.\n- Navigate by headings, landmarks, links, form controls and reading order. Confirm that important parts of the task are findable and make sense out of context.\n- Operate each interactive pattern with a keyboard and other supported input methods. Check that focus remains visible and that no control is hidden from assistive technology while still focusable.\n- Trigger opening, closing, selection, validation and dynamic updates. Confirm that state changes are communicated once, accurately, and without unexpected focus movement.\n- Compare results across the product’s supported browser and assistive technology combinations. Record the environment and observed output; do not fail a test solely because a screen reader uses a different phrase or order than an illustrative example.\n- Use automated checks to find detectable markup problems, but review meaning, usability and task completion with people and assistive technologies. An ARIA validator or automated scan cannot establish that the screen reader experience is coherent.\n\nFor patterns with complex keyboard interaction, follow the corresponding guide and the relevant APG pattern rather than relying on this cross-cutting checklist.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":117,"source_end_line":128,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"db39e37bb015cf08fa60021b3dab818880cb0342331cef48a2c40c6d8c93e05e","heading_path":["ARIA and Screen Reader Usability","Review the implemented experience"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-aria-and-screen-reader-usability-130","title":"Sources","text":"## Sources\n\n- [WAI-ARIA 1.2 specification](https://www.w3.org/TR/wai-aria-1.2/)\n- [ARIA in HTML](https://www.w3.org/TR/html-aria/)\n- [Using ARIA](https://www.w3.org/TR/using-aria/)\n- [ARIA Authoring Practices Guide: names and descriptions](https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/)\n- [ARIA Authoring Practices Guide: design patterns](https://www.w3.org/WAI/ARIA/apg/patterns/)\n- [WebAIM: Introduction to ARIA](https://webaim.org/techniques/aria/)\\n- [WebAIM: The 2026 Million report](https://webaim.org/projects/million/)\n- [TetraLogical: Foundations — introduction to WAI-ARIA](https://tetralogical.com/blog/2023/02/10/foundations-wai-aria/)\n- [TetraLogical: Foundations — HTML semantics](https://tetralogical.com/blog/2022/10/05/foundations-html-semantics/)\n- [TetraLogical: Browsing with a desktop screen reader](https://tetralogical.com/blog/2021/09/29/browsing-with-a-desktop-screen-reader/)\n- [TetraLogical: Common misconceptions about screen readers](https://tetralogical.com/blog/2025/10/14/common-misconceptions-about-screen-readers/)\n- [BBC Accessibility, Your Team and You: How to document the screen reader user experience](https://bbc.github.io/accessibility-news-and-you/guides/screen-reader-ux.html)\n- [BBC Accessibility, Your Team and You: Accessibility swarm checklist](https://bbc.github.io/accessibility-news-and-you/checklist/accessibility-swarm.html)\n- [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"ARIA and Screen Reader Usability.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/ARIA%20and%20Screen%20Reader%20Usability.md","source_start_line":130,"source_end_line":144,"source_document_sha256":"3042eb25e1d41333692c4a8f7013fbc17e97840efb753a0e9512d9e3d3c4cdaa","text_sha256":"4e144c959be171cc09a286a5756f334eea044bd49051954507c7223939530cad","heading_path":["ARIA and Screen Reader Usability","Sources"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-6","title":"Accordion","text":"# Accordion\n\n## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)\n\n## Introduction\n\nUse an accordion to help people scan two or more related sections and open the ones they need. Collapsing sections can reduce scrolling, but it can also hide information people need to finish a task. Keep essential instructions visible. Use a single [Disclosure](Disclosure.md) for one section. For cross-cutting guidance on hidden states, focus and accessibility-tree exposure, see [Visually Hidden Content](Visually%20Hidden%20Content.md) and [ARIA and Screen Reader Usability](ARIA%20and%20Screen%20Reader%20Usability.md).\n\n## Recommended markup\n\nUse native `details` and `summary`, or a named button in a heading with an associated panel.\n\n## Recommended layout\n\n\n\nGive each control a visible label that describes the panel it opens, such as ‘Ingredients’ or ‘Contact information’. Keep the control visible and recognisable as interactive in both states. Show the state with a native marker or a visible change in shape, such as a plus changing to a minus. Keep the associated panel immediately after its control or enclosing heading in source order.\n\nUse a visible heading to introduce the group. Where a named landmark helps people find the group, use a `section` labelled by that heading with `aria-labelledby`. Use heading levels that fit the page for substantial sections. A list can express the relationship between short items, such as questions with brief answers.\n\nLet long labels wrap without overlapping or squeezing out the indicator. Check that the control boundary, state and keyboard focus remain visible in forced colours. If the design places one control per row at narrow widths, preserve the accordion interaction. A [tab interface](Tabs.md) needs its own keyboard and focus behaviour even when it looks like a stack of accordion controls.\n\n## Recommended behaviour\n\n\n\nTab moves between controls and any interactive content in open panels in document order. Enter and Space operate the focused control. Keep keyboard focus on the control the person activates. Opening a panel makes it available visually, to assistive technology and to keyboard users. Closing it removes it from all three.\n\n### Grouped panels\n\nPrefer independent panels when people may compare information across sections. In a single-open group, opening another panel closes the previous one. Decide separately whether people may close the last open panel.\n\nFor an independent group with many items, consider offering ‘Expand all’ and ‘Collapse all’. Update the same panel visibility and control states as when people operate individual controls. Keep focus on the bulk action when someone activates it.\n\n### Links to a section\n\nIf a URL fragment targets content within a collapsed panel, reveal the containing panel on direct entry and when the fragment changes. For an enhanced accordion that manages fragment navigation, let people continue reading at the target. When moving focus to a non-interactive target is needed, use `tabindex=\"-1\"` so it stays out of the ordinary tab order. Preserve the normal tab stop of a target that is already interactive.\n\n## Reference implementation\n\n\n\n### Native HTML\n\nBuild on the [native disclosure example](Disclosure.md#native-html) when the browser behaviour meets the need. Use an ungrouped `details` element for each independent panel. A shared `name` makes the panels mutually exclusive in supporting browsers. Use this variant when people may close the last open panel. If the browser lacks support for grouping, people can still read and operate the individual disclosures.\n\nThis HTML example starts with both panels closed and needs no script or stylesheet. Remove the shared `name` attributes for independent panels.\n\n```html\n
\n

Ordering and delivery

\n
\n When will my order arrive?\n

Standard delivery takes three to five working days.

\n
\n
\n Can I change my delivery address?\n

You can change your address before submitting the order.

\n
\n
\n```\n\n### Custom HTML\n\nBuild on the [custom disclosure example](Disclosure.md#custom-html) when the pattern needs custom behaviour. Start with readable content and introduce working controls before hiding panels. For a section with a heading, put a native `button type=\"button\"` inside the heading to keep both semantics. Give each button an `aria-controls` value matching its panel’s unique ID. Set `aria-expanded=\"true\"` only while that panel is visible and use `hidden` on collapsed panels. A panel can be a named region when a landmark helps people navigate its contents. In that case, use `role=\"region\"` and label it with `aria-labelledby` pointing to its button.\n\nFor a single-open group, update both the newly opened panel and the one that closes. If one panel must always stay open, put `aria-disabled=\"true\"` on the open panel’s button and have the script ignore attempts to close that panel through its button. Keep the button in the tab order. Remove `aria-disabled` from the previously open panel’s button when another opens. If all panels can close, leave the open panel’s button operable. See the [ARIA Authoring Practices accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/).\n\n## Testing Approach and ACT Scripts\n\nThe ACT-style checks in this section are pattern-specific checks maintained in this guide. The proposed W3C rules are listed separately.\n\n\n\n### ACT-style checks\n\nRule identifier: `gel-foundations-accordions`\n\nRun these checks on a group of two or more items. Include a link or other interactive element in a test panel so you can check its tab order. For the custom-button variant, inspect the explicit ARIA attributes. For the native variant, check the browser’s exposed state. Use the project’s supported browsers, input devices and assistive technologies. Record the environment, result and any reason a check did not apply or was not run.\n\n| Method and action | Expected result |\n| --- | --- |\n| Inspect the document structure. Find each control and its panel. | The group has at least two control–panel pairs. Each panel follows its control or enclosing heading in source order. |\n| Tab to each header. Press Enter to open a closed panel and Space to close an open panel where closing is allowed. Repeat the allowed transitions with a mouse and touch. | Each input opens or closes the correct panel. During keyboard activation, focus stays on the header. |\n| Inspect each header when open and closed, including in forced colours. Read the label and listen to its accessible name and state with a screen reader. | The control stays visible, looks interactive and has a label that identifies its panel. A visible marker communicates the state. The screen reader exposes the control, its name and state. |\n| Inspect each custom button and panel before and after activation. | The button references the correct panel. `aria-expanded` is `true` when open and `false` when closed. Every affected button updates when the visible panel changes. |\n| Start with a collapsed panel. Read past the control with a screen reader and Tab past it. Return to the control, open the panel and repeat. Close it again where allowed. | The closed content is invisible, absent from screen reader navigation and skipped by Tab. Once open, it follows its control in reading order and its interactive elements are reachable. After closing, the content leaves reading and focus order again. |\n\n### Variant and fallback checks\n\n1. Open two panels in sequence. In an independent group, both stay open. In a single-open group, the first closes. If the last panel may close, activate its header again and check that the group can have no open panels.\n2. If one panel must stay open, Tab to its button and listen for the expanded and disabled states. Activate it and confirm that the panel stays open. Open another panel and verify that the disabled state moves to its button while both controls remain reachable.\n3. If bulk controls are provided, activate Expand all and then Collapse all. Check every panel and control state after each action. Focus stays on the bulk control used.\n4. Where the guide supports links into panels, open a direct URL targeting a collapsed panel, then follow an in-page link to a different collapsed panel. Check that the target becomes visible and that reading and keyboard navigation can continue from it.\n5. Block JavaScript and reload. Check that native panels can be opened and that custom panels remain readable as baseline content. In a separate run, disable CSS with scripts enabled. Check that the labels and content remain readable, the controls still operate and collapsed panels stay hidden.\n6. Increase text size and check that labels wrap and remain legible. In a separate check, narrow the viewport and confirm the labels, indicators and controls fit without overlap and the panel still follows its own control.\n\n### Supplied QA scripts\n\n- [Accordions](qa/supplied/accordion.md) — Apply the explicit aria-expanded checks to custom controls. For native details/summary, check the state exposed by the browser. Use the guide’s variant checks for exclusive accordions.\n\nRead the [applicability and review notes](qa/Review.md) before using these scripts for release decisions.\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Summary element has non-empty accessible name (2t702h)](qa/w3c-act/2t702h.md)\n- [Element with aria-hidden has no content in sequential focus navigation (6cfa84)](qa/w3c-act/6cfa84.md)\n\n## Sources\n\n- [ARIA Authoring Practices accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/)\n- [Tabs in ARIA Authoring Practices 1.1](https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel)\n- [Second rule of ARIA use](https://www.w3.org/TR/using-aria/#second)\n- [MDN documentation for CSS `@supports`](https://developer.mozilla.org/en-US/docs/Web/CSS/@supports)\n- [ARIA 1.0 definition of `aria-expanded`](https://www.w3.org/TR/wai-aria-1.0/states_and_properties#aria-expanded)\n- [Discussion of `aria-controls` support](http://www.heydonworks.com/article/aria-controls-is-poop)\n- [Inclusive Design Principles on giving users control](https://inclusivedesignprinciples.org/#give-control)\n- [Use high contrast mode in Windows](https://support.microsoft.com/en-gb/help/13862/windows-use-high-contrast-mode)\n- [Button has non-empty accessible name (97a4e1)](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/proposed/)\n- [Summary element has non-empty accessible name (2t702h)](https://www.w3.org/WAI/standards-guidelines/act/rules/2t702h/proposed/)\n- [Element with aria-hidden has no content in sequential focus navigation (6cfa84)](https://www.w3.org/WAI/standards-guidelines/act/rules/6cfa84/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":6,"source_end_line":137,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"1b834500140474cfb16e1a6072f32956c6a27b558a6bd71f07a50bbcbce3eae9","heading_path":["Accordion"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-8","title":"Contents","text":"## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":8,"source_end_line":16,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"0e32893a2aa0532f0cfa50475629f11d30b9085627067fff4af1fced42f4da6f","heading_path":["Accordion","Contents"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-18","title":"Introduction","text":"## Introduction\n\nUse an accordion to help people scan two or more related sections and open the ones they need. Collapsing sections can reduce scrolling, but it can also hide information people need to finish a task. Keep essential instructions visible. Use a single [Disclosure](Disclosure.md) for one section. For cross-cutting guidance on hidden states, focus and accessibility-tree exposure, see [Visually Hidden Content](Visually%20Hidden%20Content.md) and [ARIA and Screen Reader Usability](ARIA%20and%20Screen%20Reader%20Usability.md).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":18,"source_end_line":20,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"c89239954118aefe22988d99a9d04f8b6559df1e563e8e53d17351ca38db623e","heading_path":["Accordion","Introduction"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-22","title":"Recommended markup","text":"## Recommended markup\n\nUse native `details` and `summary`, or a named button in a heading with an associated panel.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":22,"source_end_line":24,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"d4ad620589514ad8e98defa52f9cb4c18e33442d7b17d5ca7fbb7ffc5f94f638","heading_path":["Accordion","Recommended markup"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-26","title":"Recommended layout","text":"## Recommended layout\n\n\n\nGive each control a visible label that describes the panel it opens, such as ‘Ingredients’ or ‘Contact information’. Keep the control visible and recognisable as interactive in both states. Show the state with a native marker or a visible change in shape, such as a plus changing to a minus. Keep the associated panel immediately after its control or enclosing heading in source order.\n\nUse a visible heading to introduce the group. Where a named landmark helps people find the group, use a `section` labelled by that heading with `aria-labelledby`. Use heading levels that fit the page for substantial sections. A list can express the relationship between short items, such as questions with brief answers.\n\nLet long labels wrap without overlapping or squeezing out the indicator. Check that the control boundary, state and keyboard focus remain visible in forced colours. If the design places one control per row at narrow widths, preserve the accordion interaction. A [tab interface](Tabs.md) needs its own keyboard and focus behaviour even when it looks like a stack of accordion controls.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":26,"source_end_line":34,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"6751f4a4b1861570679a071f899161f6f647b668f0a172e656e07092907b6b9c","heading_path":["Accordion","Recommended layout"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-36","title":"Recommended behaviour","text":"## Recommended behaviour\n\n\n\nTab moves between controls and any interactive content in open panels in document order. Enter and Space operate the focused control. Keep keyboard focus on the control the person activates. Opening a panel makes it available visually, to assistive technology and to keyboard users. Closing it removes it from all three.\n\n### Grouped panels\n\nPrefer independent panels when people may compare information across sections. In a single-open group, opening another panel closes the previous one. Decide separately whether people may close the last open panel.\n\nFor an independent group with many items, consider offering ‘Expand all’ and ‘Collapse all’. Update the same panel visibility and control states as when people operate individual controls. Keep focus on the bulk action when someone activates it.\n\n### Links to a section\n\nIf a URL fragment targets content within a collapsed panel, reveal the containing panel on direct entry and when the fragment changes. For an enhanced accordion that manages fragment navigation, let people continue reading at the target. When moving focus to a non-interactive target is needed, use `tabindex=\"-1\"` so it stays out of the ordinary tab order. Preserve the normal tab stop of a target that is already interactive.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":36,"source_end_line":50,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"052b51c88f006c46c00ed4b065c6cc0df26256c23f55fb41ba8b3a69b3c03673","heading_path":["Accordion","Recommended behaviour"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-42","title":"Grouped panels","text":"### Grouped panels\n\nPrefer independent panels when people may compare information across sections. In a single-open group, opening another panel closes the previous one. Decide separately whether people may close the last open panel.\n\nFor an independent group with many items, consider offering ‘Expand all’ and ‘Collapse all’. Update the same panel visibility and control states as when people operate individual controls. Keep focus on the bulk action when someone activates it.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":42,"source_end_line":46,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"85cf724e8b6eb0d6d6d6b662d891d4b694b822a16a310ecd6ed0d3a07a435413","heading_path":["Accordion","Recommended behaviour","Grouped panels"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-48","title":"Links to a section","text":"### Links to a section\n\nIf a URL fragment targets content within a collapsed panel, reveal the containing panel on direct entry and when the fragment changes. For an enhanced accordion that manages fragment navigation, let people continue reading at the target. When moving focus to a non-interactive target is needed, use `tabindex=\"-1\"` so it stays out of the ordinary tab order. Preserve the normal tab stop of a target that is already interactive.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":48,"source_end_line":50,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"40e0624a48b15b4e234324e052ced605e8c342eb292ea294190781934c782f49","heading_path":["Accordion","Recommended behaviour","Links to a section"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-52","title":"Reference implementation","text":"## Reference implementation\n\n\n\n### Native HTML\n\nBuild on the [native disclosure example](Disclosure.md#native-html) when the browser behaviour meets the need. Use an ungrouped `details` element for each independent panel. A shared `name` makes the panels mutually exclusive in supporting browsers. Use this variant when people may close the last open panel. If the browser lacks support for grouping, people can still read and operate the individual disclosures.\n\nThis HTML example starts with both panels closed and needs no script or stylesheet. Remove the shared `name` attributes for independent panels.\n\n```html\n
\n

Ordering and delivery

\n
\n When will my order arrive?\n

Standard delivery takes three to five working days.

\n
\n
\n Can I change my delivery address?\n

You can change your address before submitting the order.

\n
\n
\n```\n\n### Custom HTML\n\nBuild on the [custom disclosure example](Disclosure.md#custom-html) when the pattern needs custom behaviour. Start with readable content and introduce working controls before hiding panels. For a section with a heading, put a native `button type=\"button\"` inside the heading to keep both semantics. Give each button an `aria-controls` value matching its panel’s unique ID. Set `aria-expanded=\"true\"` only while that panel is visible and use `hidden` on collapsed panels. A panel can be a named region when a landmark helps people navigate its contents. In that case, use `role=\"region\"` and label it with `aria-labelledby` pointing to its button.\n\nFor a single-open group, update both the newly opened panel and the one that closes. If one panel must always stay open, put `aria-disabled=\"true\"` on the open panel’s button and have the script ignore attempts to close that panel through its button. Keep the button in the tab order. Remove `aria-disabled` from the previously open panel’s button when another opens. If all panels can close, leave the open panel’s button operable. See the [ARIA Authoring Practices accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":52,"source_end_line":80,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"7ef1d3a6532f6ff7a14af94b0aa73e9482f21f4e2333ae032bc67f0c544f13bb","heading_path":["Accordion","Reference implementation"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-56","title":"Native HTML","text":"### Native HTML\n\nBuild on the [native disclosure example](Disclosure.md#native-html) when the browser behaviour meets the need. Use an ungrouped `details` element for each independent panel. A shared `name` makes the panels mutually exclusive in supporting browsers. Use this variant when people may close the last open panel. If the browser lacks support for grouping, people can still read and operate the individual disclosures.\n\nThis HTML example starts with both panels closed and needs no script or stylesheet. Remove the shared `name` attributes for independent panels.\n\n```html\n
\n

Ordering and delivery

\n
\n When will my order arrive?\n

Standard delivery takes three to five working days.

\n
\n
\n Can I change my delivery address?\n

You can change your address before submitting the order.

\n
\n
\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":56,"source_end_line":74,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"016fbc77e5f37cbec28d34902ab897dcdc5ae808a1ddaf008d3b2173875c7959","heading_path":["Accordion","Reference implementation","Native HTML"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-76","title":"Custom HTML","text":"### Custom HTML\n\nBuild on the [custom disclosure example](Disclosure.md#custom-html) when the pattern needs custom behaviour. Start with readable content and introduce working controls before hiding panels. For a section with a heading, put a native `button type=\"button\"` inside the heading to keep both semantics. Give each button an `aria-controls` value matching its panel’s unique ID. Set `aria-expanded=\"true\"` only while that panel is visible and use `hidden` on collapsed panels. A panel can be a named region when a landmark helps people navigate its contents. In that case, use `role=\"region\"` and label it with `aria-labelledby` pointing to its button.\n\nFor a single-open group, update both the newly opened panel and the one that closes. If one panel must always stay open, put `aria-disabled=\"true\"` on the open panel’s button and have the script ignore attempts to close that panel through its button. Keep the button in the tab order. Remove `aria-disabled` from the previously open panel’s button when another opens. If all panels can close, leave the open panel’s button operable. See the [ARIA Authoring Practices accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":76,"source_end_line":80,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"f7c8add409a137452e04a5b0cf85176e3ed5c20925f4c1d87c84bfdb80ca4c78","heading_path":["Accordion","Reference implementation","Custom HTML"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-82","title":"Testing Approach and ACT Scripts","text":"## Testing Approach and ACT Scripts\n\nThe ACT-style checks in this section are pattern-specific checks maintained in this guide. The proposed W3C rules are listed separately.\n\n\n\n### ACT-style checks\n\nRule identifier: `gel-foundations-accordions`\n\nRun these checks on a group of two or more items. Include a link or other interactive element in a test panel so you can check its tab order. For the custom-button variant, inspect the explicit ARIA attributes. For the native variant, check the browser’s exposed state. Use the project’s supported browsers, input devices and assistive technologies. Record the environment, result and any reason a check did not apply or was not run.\n\n| Method and action | Expected result |\n| --- | --- |\n| Inspect the document structure. Find each control and its panel. | The group has at least two control–panel pairs. Each panel follows its control or enclosing heading in source order. |\n| Tab to each header. Press Enter to open a closed panel and Space to close an open panel where closing is allowed. Repeat the allowed transitions with a mouse and touch. | Each input opens or closes the correct panel. During keyboard activation, focus stays on the header. |\n| Inspect each header when open and closed, including in forced colours. Read the label and listen to its accessible name and state with a screen reader. | The control stays visible, looks interactive and has a label that identifies its panel. A visible marker communicates the state. The screen reader exposes the control, its name and state. |\n| Inspect each custom button and panel before and after activation. | The button references the correct panel. `aria-expanded` is `true` when open and `false` when closed. Every affected button updates when the visible panel changes. |\n| Start with a collapsed panel. Read past the control with a screen reader and Tab past it. Return to the control, open the panel and repeat. Close it again where allowed. | The closed content is invisible, absent from screen reader navigation and skipped by Tab. Once open, it follows its control in reading order and its interactive elements are reachable. After closing, the content leaves reading and focus order again. |\n\n### Variant and fallback checks\n\n1. Open two panels in sequence. In an independent group, both stay open. In a single-open group, the first closes. If the last panel may close, activate its header again and check that the group can have no open panels.\n2. If one panel must stay open, Tab to its button and listen for the expanded and disabled states. Activate it and confirm that the panel stays open. Open another panel and verify that the disabled state moves to its button while both controls remain reachable.\n3. If bulk controls are provided, activate Expand all and then Collapse all. Check every panel and control state after each action. Focus stays on the bulk control used.\n4. Where the guide supports links into panels, open a direct URL targeting a collapsed panel, then follow an in-page link to a different collapsed panel. Check that the target becomes visible and that reading and keyboard navigation can continue from it.\n5. Block JavaScript and reload. Check that native panels can be opened and that custom panels remain readable as baseline content. In a separate run, disable CSS with scripts enabled. Check that the labels and content remain readable, the controls still operate and collapsed panels stay hidden.\n6. Increase text size and check that labels wrap and remain legible. In a separate check, narrow the viewport and confirm the labels, indicators and controls fit without overlap and the panel still follows its own control.\n\n### Supplied QA scripts\n\n- [Accordions](qa/supplied/accordion.md) — Apply the explicit aria-expanded checks to custom controls. For native details/summary, check the state exposed by the browser. Use the guide’s variant checks for exclusive accordions.\n\nRead the [applicability and review notes](qa/Review.md) before using these scripts for release decisions.\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Summary element has non-empty accessible name (2t702h)](qa/w3c-act/2t702h.md)\n- [Element with aria-hidden has no content in sequential focus navigation (6cfa84)](qa/w3c-act/6cfa84.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":82,"source_end_line":123,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"8906b02698966d7361e7c8994d7dd7dfd358e518c57c39fecf3eb7555160ce1c","heading_path":["Accordion","Testing Approach and ACT Scripts"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-88","title":"ACT-style checks","text":"### ACT-style checks\n\nRule identifier: `gel-foundations-accordions`\n\nRun these checks on a group of two or more items. Include a link or other interactive element in a test panel so you can check its tab order. For the custom-button variant, inspect the explicit ARIA attributes. For the native variant, check the browser’s exposed state. Use the project’s supported browsers, input devices and assistive technologies. Record the environment, result and any reason a check did not apply or was not run.\n\n| Method and action | Expected result |\n| --- | --- |\n| Inspect the document structure. Find each control and its panel. | The group has at least two control–panel pairs. Each panel follows its control or enclosing heading in source order. |\n| Tab to each header. Press Enter to open a closed panel and Space to close an open panel where closing is allowed. Repeat the allowed transitions with a mouse and touch. | Each input opens or closes the correct panel. During keyboard activation, focus stays on the header. |\n| Inspect each header when open and closed, including in forced colours. Read the label and listen to its accessible name and state with a screen reader. | The control stays visible, looks interactive and has a label that identifies its panel. A visible marker communicates the state. The screen reader exposes the control, its name and state. |\n| Inspect each custom button and panel before and after activation. | The button references the correct panel. `aria-expanded` is `true` when open and `false` when closed. Every affected button updates when the visible panel changes. |\n| Start with a collapsed panel. Read past the control with a screen reader and Tab past it. Return to the control, open the panel and repeat. Close it again where allowed. | The closed content is invisible, absent from screen reader navigation and skipped by Tab. Once open, it follows its control in reading order and its interactive elements are reachable. After closing, the content leaves reading and focus order again. |","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":88,"source_end_line":100,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"4b46be392a385cc965f51be710a03d879c6302e137713968a5366190535bccb8","heading_path":["Accordion","Testing Approach and ACT Scripts","ACT-style checks"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-102","title":"Variant and fallback checks","text":"### Variant and fallback checks\n\n1. Open two panels in sequence. In an independent group, both stay open. In a single-open group, the first closes. If the last panel may close, activate its header again and check that the group can have no open panels.\n2. If one panel must stay open, Tab to its button and listen for the expanded and disabled states. Activate it and confirm that the panel stays open. Open another panel and verify that the disabled state moves to its button while both controls remain reachable.\n3. If bulk controls are provided, activate Expand all and then Collapse all. Check every panel and control state after each action. Focus stays on the bulk control used.\n4. Where the guide supports links into panels, open a direct URL targeting a collapsed panel, then follow an in-page link to a different collapsed panel. Check that the target becomes visible and that reading and keyboard navigation can continue from it.\n5. Block JavaScript and reload. Check that native panels can be opened and that custom panels remain readable as baseline content. In a separate run, disable CSS with scripts enabled. Check that the labels and content remain readable, the controls still operate and collapsed panels stay hidden.\n6. Increase text size and check that labels wrap and remain legible. In a separate check, narrow the viewport and confirm the labels, indicators and controls fit without overlap and the panel still follows its own control.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":102,"source_end_line":109,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"66f481804b7dd7bf78316e5542c037aebe299f6dedeae31cfd52cf7ed5d374e6","heading_path":["Accordion","Testing Approach and ACT Scripts","Variant and fallback checks"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-111","title":"Supplied QA scripts","text":"### Supplied QA scripts\n\n- [Accordions](qa/supplied/accordion.md) — Apply the explicit aria-expanded checks to custom controls. For native details/summary, check the state exposed by the browser. Use the guide’s variant checks for exclusive accordions.\n\nRead the [applicability and review notes](qa/Review.md) before using these scripts for release decisions.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":111,"source_end_line":115,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"32d36df3a8b2faa3bf01a6a9c5220c0183a48e95d4104c2c85cbbee57d709fb0","heading_path":["Accordion","Testing Approach and ACT Scripts","Supplied QA scripts"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-117","title":"Related W3C ACT rules","text":"### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Summary element has non-empty accessible name (2t702h)](qa/w3c-act/2t702h.md)\n- [Element with aria-hidden has no content in sequential focus navigation (6cfa84)](qa/w3c-act/6cfa84.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":117,"source_end_line":123,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"a9b40dcd109d7cbebca6d61b708dd9e4fb701e12ec835ce8a9a12ee57da78943","heading_path":["Accordion","Testing Approach and ACT Scripts","Related W3C ACT rules"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-accordion-125","title":"Sources","text":"## Sources\n\n- [ARIA Authoring Practices accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/)\n- [Tabs in ARIA Authoring Practices 1.1](https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel)\n- [Second rule of ARIA use](https://www.w3.org/TR/using-aria/#second)\n- [MDN documentation for CSS `@supports`](https://developer.mozilla.org/en-US/docs/Web/CSS/@supports)\n- [ARIA 1.0 definition of `aria-expanded`](https://www.w3.org/TR/wai-aria-1.0/states_and_properties#aria-expanded)\n- [Discussion of `aria-controls` support](http://www.heydonworks.com/article/aria-controls-is-poop)\n- [Inclusive Design Principles on giving users control](https://inclusivedesignprinciples.org/#give-control)\n- [Use high contrast mode in Windows](https://support.microsoft.com/en-gb/help/13862/windows-use-high-contrast-mode)\n- [Button has non-empty accessible name (97a4e1)](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/proposed/)\n- [Summary element has non-empty accessible name (2t702h)](https://www.w3.org/WAI/standards-guidelines/act/rules/2t702h/proposed/)\n- [Element with aria-hidden has no content in sequential focus navigation (6cfa84)](https://www.w3.org/WAI/standards-guidelines/act/rules/6cfa84/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Accordion.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Accordion.md","source_start_line":125,"source_end_line":137,"source_document_sha256":"816bb442a0cd3d302a9f7b5c783b3f224362f4f76260704aa1ff856b8ee06ac0","text_sha256":"b43f9ca1c2b45913fc8a046204b6c5fc006d31f1dfb174c1c363447d7582cc69","heading_path":["Accordion","Sources"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-6","title":"Affordances, Signifiers and Design Conventions","text":"# Affordances, Signifiers and Design Conventions\n\nHelp people tell what they can do, how to do it and what will happen. A control may be easy to notice but still lead to an unexpected result if its label, appearance and behaviour suggest different actions. Use the same meaning in the visible interface and in the names, roles and states available to assistive technology.\n\n| Term | Design decision |\n| --- | --- |\n| **Affordance** | What the interface lets someone do, such as reveal delivery details or open a delivery help page. |\n| **Signifier** | A cue that helps someone recognise the action or state. The visible label, disclosure marker and expanded state can each convey part of that meaning. |\n| **Design convention** | A learned expectation about how something works. A link leads to a destination, while a disclosure opens and closes content in place. Familiar behaviour lets people reuse what they have learned. |\n\n## Recommended markup\n\n- Start with the action. Use an anchor with an `href` for a destination, a native button for an action and a native disclosure for simple content that opens in place. Follow [Anchors and Links](Anchors%20and%20Links.md#link-content), [Call to Action](Call%20to%20Action.md#make-links-and-buttons-recognisable) and [Disclosure](Disclosure.md).\n- Use visible text that says what the person can do or where they will go. Keep that wording in the accessible name so people can identify and operate the control through speech input. Give repeated actions enough context to make sense in a list of links or controls. See [Labels](Labels.md).\n- Expose the state that matters, such as expanded, selected or unavailable. Keep it consistent with the visible cue and actual behaviour. Prefer native semantics and keep decorative icons out of the accessible name when the text already conveys their meaning. See [Icons](Icons.md#icons-and-accessible-names).\n\n## Recommended layout\n\nPut the cue with the thing it describes. Place an expand marker beside the label and its content next in reading order. Place conditions such as cost or eligibility close to the action that uses them. Add visible wording when colour, shape, position or an unfamiliar icon would otherwise carry the meaning alone.\n\nGive equivalent controls a consistent treatment throughout the service. Distinguish actions, destinations and status text where their functions differ. Keep the focus indicator distinct from hover, selection and the current item. Check the cues at narrow widths, with text enlarged and in forced colours. See [Focus](Focus.md#focus-indication).\n\n## Recommended behaviour\n\n### Match the result to the cue\n\nKeep keyboard, touch and pointer behaviour consistent with the control people encounter. Give gesture-only actions a visible control and a keyboard route. On activation, make the outcome clear through the new content, state or destination. Use established focus behaviour and keep the result available to revisit. Follow [Designing the Screen Reader Journey](Designing%20the%20Screen%20Reader%20Journey.md) to check what happens across views.\n\nExplain a material consequence before someone commits. For example, distinguish ‘Review order’ from ‘Place order and pay £28’ and put the amount and significant conditions near the final action. See [Informed Choice and Preferences](Informed%20Choice%20and%20Preferences.md#show-what-the-choice-means).\n\n### Preserve useful conventions when things change\n\nRecord the existing label, location, appearance and result of important controls before redesigning them. Keep useful conventions where the action stays the same. If its consequence changes, update the wording and presentation at the point of action. Give returning users a chance to review the change and recover from a mistaken action where possible.\n\n## Reference implementation\n\n### Reveal details beside a separate help destination\n\nUse this HTML fragment where someone can read a short delivery explanation in place and visit a fuller help page. Replace the example help route with the working destination. The native disclosure exposes its state and works without JavaScript. Keep its marker visible or supply an equivalent cue that you can test.\n\n```html\n
\n

Delivery

\n
\n Delivery times for this order\n

Standard delivery takes three to five working days.

\n
\n

View delivery and collection options

\n
\n```\n\nBefore activation, one control identifies the information it reveals and the other names its destination. After activation, the disclosure keeps the person on the current page and exposes the details in place. The link opens the delivery help page through ordinary browser navigation.\n\n## Testing notes\n\nUse a realistic task and record the starting state, method and observed result. Include first-time and returning users when a redesign changes an important action.\n\n| Method and action | Expected result |\n| --- | --- |\n| Before activation, ask what each control will do and, where relevant, what it will commit the person to. Use the actual decision screen. | People can distinguish opening content, going to another location and committing to an action. Relevant consequences can be found before acting. |\n| Find and operate each control using keyboard, touch and supported speech input. With a screen reader, check names, roles and states from the reading order and available control lists. | The cues describe the same action. Names identify the controls and match their visible wording. Operation follows the control’s convention and focus stays usable. |\n| Open and close the disclosure, then follow the help link. Repeat at a narrow width and in forced colours. | The disclosure’s visible and programmatic states agree and focus remains distinguishable. The link reaches the named destination. |\n| Give a returning user the redesigned task without explaining what changed. Observe activation, verification and recovery. | Record whether the person recognises the new outcome, can verify it and can recover if their earlier expectation leads to a mistake. |\n\nInspecting markup can confirm a name, role or state. Observe realistic task use to find out whether people understand the action and its consequence.\n\n## Sources\n\n- [Cognitive Design Principles: Standard Elements](https://github.com/Double-FW/Cognitive-UX-Design/blob/523df2fe9e47f8dd75d30b7920a9179d57a89bba/Cognitive%20Design%20Principles.md#1-standard-elements)\n- [Cognitive Design Principles: Affordances and Signifiers](https://github.com/Double-FW/Cognitive-UX-Design/blob/523df2fe9e47f8dd75d30b7920a9179d57a89bba/Cognitive%20Design%20Principles.md#2-affordances-and-signifiers)\n- [Learning, redesign and returning users](https://github.com/Double-FW/Cognitive-UX-Design/blob/523df2fe9e47f8dd75d30b7920a9179d57a89bba/Learning_Redesign_and_Returning_Users.md)\n- [Familiarity, comprehension and confidence](https://github.com/Double-FW/Cognitive-UX-Design/blob/523df2fe9e47f8dd75d30b7920a9179d57a89bba/Familiarity_Comprehension_and_Confidence.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":6,"source_end_line":77,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"381264b7a3db9bc458bde63194b2593cef105651c00931fc9d4d57364aa3da69","heading_path":["Affordances, Signifiers and Design Conventions"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-16","title":"Recommended markup","text":"## Recommended markup\n\n- Start with the action. Use an anchor with an `href` for a destination, a native button for an action and a native disclosure for simple content that opens in place. Follow [Anchors and Links](Anchors%20and%20Links.md#link-content), [Call to Action](Call%20to%20Action.md#make-links-and-buttons-recognisable) and [Disclosure](Disclosure.md).\n- Use visible text that says what the person can do or where they will go. Keep that wording in the accessible name so people can identify and operate the control through speech input. Give repeated actions enough context to make sense in a list of links or controls. See [Labels](Labels.md).\n- Expose the state that matters, such as expanded, selected or unavailable. Keep it consistent with the visible cue and actual behaviour. Prefer native semantics and keep decorative icons out of the accessible name when the text already conveys their meaning. See [Icons](Icons.md#icons-and-accessible-names).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":16,"source_end_line":20,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"3668977ab33ef149ca74a94b406c17ad807e6e672d8b9908b0546be80a25df68","heading_path":["Affordances, Signifiers and Design Conventions","Recommended markup"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-22","title":"Recommended layout","text":"## Recommended layout\n\nPut the cue with the thing it describes. Place an expand marker beside the label and its content next in reading order. Place conditions such as cost or eligibility close to the action that uses them. Add visible wording when colour, shape, position or an unfamiliar icon would otherwise carry the meaning alone.\n\nGive equivalent controls a consistent treatment throughout the service. Distinguish actions, destinations and status text where their functions differ. Keep the focus indicator distinct from hover, selection and the current item. Check the cues at narrow widths, with text enlarged and in forced colours. See [Focus](Focus.md#focus-indication).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":22,"source_end_line":26,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"2628cd3796a958d5c54b967a08f11ab19ad337aaa2febd71735d020850a6e078","heading_path":["Affordances, Signifiers and Design Conventions","Recommended layout"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-28","title":"Recommended behaviour","text":"## Recommended behaviour\n\n### Match the result to the cue\n\nKeep keyboard, touch and pointer behaviour consistent with the control people encounter. Give gesture-only actions a visible control and a keyboard route. On activation, make the outcome clear through the new content, state or destination. Use established focus behaviour and keep the result available to revisit. Follow [Designing the Screen Reader Journey](Designing%20the%20Screen%20Reader%20Journey.md) to check what happens across views.\n\nExplain a material consequence before someone commits. For example, distinguish ‘Review order’ from ‘Place order and pay £28’ and put the amount and significant conditions near the final action. See [Informed Choice and Preferences](Informed%20Choice%20and%20Preferences.md#show-what-the-choice-means).\n\n### Preserve useful conventions when things change\n\nRecord the existing label, location, appearance and result of important controls before redesigning them. Keep useful conventions where the action stays the same. If its consequence changes, update the wording and presentation at the point of action. Give returning users a chance to review the change and recover from a mistaken action where possible.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":28,"source_end_line":38,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"bb7f34b10cfbca0bc6e1b3bfe139a780257c0f8d4fbdfaf5a95aaea23bf1479f","heading_path":["Affordances, Signifiers and Design Conventions","Recommended behaviour"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-30","title":"Match the result to the cue","text":"### Match the result to the cue\n\nKeep keyboard, touch and pointer behaviour consistent with the control people encounter. Give gesture-only actions a visible control and a keyboard route. On activation, make the outcome clear through the new content, state or destination. Use established focus behaviour and keep the result available to revisit. Follow [Designing the Screen Reader Journey](Designing%20the%20Screen%20Reader%20Journey.md) to check what happens across views.\n\nExplain a material consequence before someone commits. For example, distinguish ‘Review order’ from ‘Place order and pay £28’ and put the amount and significant conditions near the final action. See [Informed Choice and Preferences](Informed%20Choice%20and%20Preferences.md#show-what-the-choice-means).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":30,"source_end_line":34,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"55a3bb2734f109d9093b37f53cf142bc716f923db04facbaf6786ff692bf383e","heading_path":["Affordances, Signifiers and Design Conventions","Recommended behaviour","Match the result to the cue"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-36","title":"Preserve useful conventions when things change","text":"### Preserve useful conventions when things change\n\nRecord the existing label, location, appearance and result of important controls before redesigning them. Keep useful conventions where the action stays the same. If its consequence changes, update the wording and presentation at the point of action. Give returning users a chance to review the change and recover from a mistaken action where possible.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":36,"source_end_line":38,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"2c66a3f53fac12667a0064d7d2fe9337add12625bc31f4b874d78e857dabd3a7","heading_path":["Affordances, Signifiers and Design Conventions","Recommended behaviour","Preserve useful conventions when things change"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-40","title":"Reference implementation","text":"## Reference implementation\n\n### Reveal details beside a separate help destination\n\nUse this HTML fragment where someone can read a short delivery explanation in place and visit a fuller help page. Replace the example help route with the working destination. The native disclosure exposes its state and works without JavaScript. Keep its marker visible or supply an equivalent cue that you can test.\n\n```html\n
\n

Delivery

\n
\n Delivery times for this order\n

Standard delivery takes three to five working days.

\n
\n

View delivery and collection options

\n
\n```\n\nBefore activation, one control identifies the information it reveals and the other names its destination. After activation, the disclosure keeps the person on the current page and exposes the details in place. The link opens the delivery help page through ordinary browser navigation.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":40,"source_end_line":57,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"c513e2d318841b7111d00717756f16440e0f0bc72c738fa6bbe0d773bbd509e7","heading_path":["Affordances, Signifiers and Design Conventions","Reference implementation"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-42","title":"Reveal details beside a separate help destination","text":"### Reveal details beside a separate help destination\n\nUse this HTML fragment where someone can read a short delivery explanation in place and visit a fuller help page. Replace the example help route with the working destination. The native disclosure exposes its state and works without JavaScript. Keep its marker visible or supply an equivalent cue that you can test.\n\n```html\n
\n

Delivery

\n
\n Delivery times for this order\n

Standard delivery takes three to five working days.

\n
\n

View delivery and collection options

\n
\n```\n\nBefore activation, one control identifies the information it reveals and the other names its destination. After activation, the disclosure keeps the person on the current page and exposes the details in place. The link opens the delivery help page through ordinary browser navigation.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":42,"source_end_line":57,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"9bb3b0f60120a8dc51ce37bd16f013ac79841780a44f876089bac134ea575a14","heading_path":["Affordances, Signifiers and Design Conventions","Reference implementation","Reveal details beside a separate help destination"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-59","title":"Testing notes","text":"## Testing notes\n\nUse a realistic task and record the starting state, method and observed result. Include first-time and returning users when a redesign changes an important action.\n\n| Method and action | Expected result |\n| --- | --- |\n| Before activation, ask what each control will do and, where relevant, what it will commit the person to. Use the actual decision screen. | People can distinguish opening content, going to another location and committing to an action. Relevant consequences can be found before acting. |\n| Find and operate each control using keyboard, touch and supported speech input. With a screen reader, check names, roles and states from the reading order and available control lists. | The cues describe the same action. Names identify the controls and match their visible wording. Operation follows the control’s convention and focus stays usable. |\n| Open and close the disclosure, then follow the help link. Repeat at a narrow width and in forced colours. | The disclosure’s visible and programmatic states agree and focus remains distinguishable. The link reaches the named destination. |\n| Give a returning user the redesigned task without explaining what changed. Observe activation, verification and recovery. | Record whether the person recognises the new outcome, can verify it and can recover if their earlier expectation leads to a mistake. |\n\nInspecting markup can confirm a name, role or state. Observe realistic task use to find out whether people understand the action and its consequence.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":59,"source_end_line":70,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"c285d75e055d0d39920b11256f3c0da9f4a6ef315edf5be91f1a416f8da46860","heading_path":["Affordances, Signifiers and Design Conventions","Testing notes"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-affordances-signifiers-and-design-conventions-72","title":"Sources","text":"## Sources\n\n- [Cognitive Design Principles: Standard Elements](https://github.com/Double-FW/Cognitive-UX-Design/blob/523df2fe9e47f8dd75d30b7920a9179d57a89bba/Cognitive%20Design%20Principles.md#1-standard-elements)\n- [Cognitive Design Principles: Affordances and Signifiers](https://github.com/Double-FW/Cognitive-UX-Design/blob/523df2fe9e47f8dd75d30b7920a9179d57a89bba/Cognitive%20Design%20Principles.md#2-affordances-and-signifiers)\n- [Learning, redesign and returning users](https://github.com/Double-FW/Cognitive-UX-Design/blob/523df2fe9e47f8dd75d30b7920a9179d57a89bba/Learning_Redesign_and_Returning_Users.md)\n- [Familiarity, comprehension and confidence](https://github.com/Double-FW/Cognitive-UX-Design/blob/523df2fe9e47f8dd75d30b7920a9179d57a89bba/Familiarity_Comprehension_and_Confidence.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Affordances, Signifiers and Design Conventions.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Affordances,%20Signifiers%20and%20Design%20Conventions.md","source_start_line":72,"source_end_line":77,"source_document_sha256":"a882e7507ec56aa40d770ddcdb4c46a427940e600139e32122416e60d853b4d0","text_sha256":"82bdb8b3138e04449dca8193eb476a34c913c61a551ac79d04ec7264bd7b2023","heading_path":["Affordances, Signifiers and Design Conventions","Sources"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-alternatives-to-deceptive-patterns-6","title":"Alternatives to Deceptive Patterns","text":"# Alternatives to Deceptive Patterns\n\nUse this map to find a design alternative and test whether people can make and carry out their own choices. Start with the decision or task at risk. Follow the relevant journey guide, then use the component guidance to check the controls involved.\n\nThe map follows the 11 areas named in the [Double-FW catalogue brief](https://github.com/Double-FW/Deceptive_Patterns_and-Inclusive_Experience_Evaluation/blob/main/Deceptive_Patterns_Repository_Development_Prompt.md#5-build-the-pattern-and-practice-catalogue). Use the observed journey and its effect to assess a finding. A pattern name alone establishes neither intent nor a standards failure.\n\n| Risk | Alternative and check | Cosmos guidance |\n| --- | --- | --- |\n| Concealed costs or conditions | Show the total, significant conditions and recurring charges before commitment. Check that all charges are explained and the confirmation matches. | [Informed Choice and Preferences](Informed%20Choice%20and%20Preferences.md#show-what-the-choice-means) |\n| Misleading hierarchy or wording | Label each choice by its consequence. Check that each option can be found and understood visually and with assistive technology. | [Informed Choice and Preferences](Informed%20Choice%20and%20Preferences.md#make-choices-comparable), [Call to Action](Call%20to%20Action.md) |\n| Obstructed refusal or cancellation | Provide a direct route to decline or cancel and confirm the outcome. | [Refusal, Cancellation and Exit](Refusal%2C%20Cancellation%20and%20Exit.md) |\n| Unequal effort between choices | Compare the complete routes. Check for avoidable steps, sign-ins, waits and channel changes. | [Compare the effort](Refusal%2C%20Cancellation%20and%20Exit.md#compare-the-effort) |\n| Forced disclosure or registration | Ask for information needed for the task. Offer a route without an account where the task can be delivered that way. | [Ask only for what the task needs](Informed%20Choice%20and%20Preferences.md#ask-only-for-what-the-task-needs) |\n| Repeated pressure | Honour a refusal. Check that returning later does not trigger the same invitation again while that decision still applies. | [Respect a refusal](Refusal%2C%20Cancellation%20and%20Exit.md#respect-a-refusal), [Notifications and Status Messages](Notifications%20and%20Status%20Messages.md) |\n| False urgency or scarcity | State the real deadline or availability. Check that the message and countdown, if present, agree with the service’s information across visits. | [Show what the choice means](Informed%20Choice%20and%20Preferences.md#show-what-the-choice-means), [Call to Action](Call%20to%20Action.md) |\n| Unwanted defaults | Keep optional extras off initially and make the starting state clear. Check that a saved preference stays in effect. | [Defaults and preferences](Informed%20Choice%20and%20Preferences.md#defaults-and-preferences) |\n| Consent interference | Make acceptance, refusal and later changes easy to find and operate. Verify that the service applies the same choice it shows. | [Defaults and preferences](Informed%20Choice%20and%20Preferences.md#defaults-and-preferences) |\n| Inaccessible support | Offer a usable way to get help and escalate. Test a route that does not require the input or channel the person cannot use. | [Support, Escalation and Handoffs](Support%2C%20Escalation%20and%20Handoffs.md#make-support-findable-and-usable) |\n| Abandonment across handoffs | Name who owns the next step and provide a recovery route. Test what happens when the receiving team or system cannot pick up the request. | [Carry the task across a handoff](Support%2C%20Escalation%20and%20Handoffs.md#carry-the-task-across-a-handoff) |\n\nRecord the route, starting state, choices offered, steps taken and outcome. Include any difference in effort or access and the evidence needed to distinguish necessary safeguards from avoidable barriers.\n\n## Sources\n\n- [Double-FW catalogue brief](https://github.com/Double-FW/Deceptive_Patterns_and-Inclusive_Experience_Evaluation/blob/main/Deceptive_Patterns_Repository_Development_Prompt.md#5-build-the-pattern-and-practice-catalogue)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Alternatives to Deceptive Patterns.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Alternatives%20to%20Deceptive%20Patterns.md","source_start_line":6,"source_end_line":30,"source_document_sha256":"9dd9832abd25a543d74031607236577b4781d9cd9e6fd9d69371e0bfbedbec1e","text_sha256":"2505df158f21f4a608b2ed2a06de67389d09f3fc5c74889ff8a69c711904ca61","heading_path":["Alternatives to Deceptive Patterns"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-alternatives-to-deceptive-patterns-28","title":"Sources","text":"## Sources\n\n- [Double-FW catalogue brief](https://github.com/Double-FW/Deceptive_Patterns_and-Inclusive_Experience_Evaluation/blob/main/Deceptive_Patterns_Repository_Development_Prompt.md#5-build-the-pattern-and-practice-catalogue)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Alternatives to Deceptive Patterns.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Alternatives%20to%20Deceptive%20Patterns.md","source_start_line":28,"source_end_line":30,"source_document_sha256":"9dd9832abd25a543d74031607236577b4781d9cd9e6fd9d69371e0bfbedbec1e","text_sha256":"714f135d91f2ff1c6cf4f6a85f9cd248011834409d0309e8c81ae94728ea08dd","heading_path":["Alternatives to Deceptive Patterns","Sources"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-6","title":"Anchors and Links","text":"# Anchors and Links\n\n## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)\n\n## Introduction\n\nHelp people identify destinations and open them using the browser or assistive technology. Give each link enough context to make sense on its own. For links to section headings, use [Headings](Headings.md) to check heading structure and wording. Use [Call to Action](Call%20to%20Action.md) when deciding whether a control should navigate or perform an action, and [Affordances, Signifiers and Design Conventions](Affordances%2C%20Signifiers%20and%20Design%20Conventions.md) for visual cues and expected behaviour.\n\nThe image or media filenames in these examples stand for assets supplied by the implementing project. For guidance on supplementary link text hidden visually, and its effect on speech input, see [Visually Hidden Content](Visually%20Hidden%20Content.md#use-visually-hidden-text-carefully).\n\n## Recommended markup\n\n### Link content\n\nWhen writing text content for a link, use concise but complete text describing the linked resource. This is particularly important for those who use a screen reader to scan the entire webpage and read out a list of only the links, where each link will have no context and must be understood on its own. For example, a series of article summaries, each containing a link with the text \"Read more,\" will be presented as a list of many \"Read more\" snippets to the screen reader user, with no indication of what following any link will allow the user to read more about.\n\nA list of links presented by a screen reader. The text from each link is read without any context from where it appears on the webpage.\n\nAdding the missing context to the link text will remove barriers for screen reader users and will likely help sighted users keep track of what they are linking to. In exceptional cases, where it would be redundant or distracting for sighted users to read the full details in the link content, this can be managed by adding the context as visually hidden text available only to screen reader users.\n\n```html\n\n Read more about our values\n\n

Our values

\n\n\n```\n\n> Screen reader example: \"link, Read more about our values\"\n\nAlthough the link text visually appears as only \"Read more\" in the context of the article entitled \"Our Values,\" it will appear as \"Read more about our values...\" when a screen reader user opens the list of all links from the webpage.\n\nAs a rule, you should keep the content intended for screen reader users the same as content intended for other users. Not all screen reader users are blind, and screen reader users that can see the text may be confused by hearing and seeing different content. In addition, having parallel but different content for different groups of users allows the possibility of differences in maintenance and quality to creep in: one version being localized while the other is not, or one lacking the same level of proofreading, for example.\n\n### Icons in links\n\nWhile having descriptive, visible text is the most accessible way to label a link, there are use cases where a well-understood icon would be more natural. In these cases, alternative text must be supplied for screen reader users who cannot see the icon.\n\nA simple HTML `img` element will display the icon. Screen readers will announce that an \"image\" is present and read out any text in the element's `alt` attribute. Choose an alternative text that summarizes the _meaning_ of the image; there's no need to explain that it is an \"image,\" \"icon,\" or \"picture\" in the alternative text.\n\n```html\nFollow Us\n
\n \n \"Mastodon\"\n \n
\n```\n\n> Screen reader: \"Follow Us\"\n> Screen reader: \"link, image, Mastodon\"\n\n### Groups of external destinations\n\nFor a list of external links, use a descriptive heading and ordinary list markup. Explain a shared destination convention once where users will encounter it. If one link behaves differently, explain that behaviour on the link. Keep decorative icons out of the accessible name when adjacent text already explains them.\n\n## Recommended layout\n\nGive links a visual cue that people can recognise without relying on colour alone. Keep keyboard focus visible.\n\n## Recommended behaviour\n\n### Translation services\n\nNot every string of text on a webpage will be available to translation services, like Google Translate. When choosing a technique for adding alternative text to a webpage, it's essential to ensure that this text, which screen reader users will rely on, will also be translated. Test any translation tools or services your website plans to support to ensure that alternative text is supported.\n\nOriginally in English, the service has translated the page into French. We can see that the text in the image element's `alt` attribute has also been translated into French.\n\n### External links\n\nWhen linking to external websites, it is a good idea from a security and accountability perspective to inform the user that they are about to visit content you are not responsible for. This can be a concern if the user is logged into your site or has some other session that would be interrupted or dropped once they leave your site.\n\n### New tabs\n\nOpening links in new tabs or windows can make some users' experience more confusing and less accessible, so it should be used rarely. One exception may be links to external websites. \n\nIn the following examples, notice the `noreferrer` and `noopener` values in the link's `rel` attribute. This follows good security practices when opening a new browser tab by preventing information about, or access to, the current tab from inadvertently being made available to the new tab. While not normally a problem, if the website you are linking to were hacked, such information or access could be useful to anyone wanting to trick the user. \n\n### Using an icon to signal new tabs\n\n```html\n

\n Read about our suppliers’\n \n Sustainable practices (opens in a new tab) ↗\n .\n

\n```\n\nThe route is illustrative. When the destination is an external site, identify it in the link text if that information helps users decide whether to follow the link. Keep the new-tab notice available as text.\n\n### Links to phone numbers\n\nUsing the most appropriate URI scheme in the `href` attribute for web links can make your contact information more usable, especially for users with disabilities. Some examples are shown below.\n\n```css\n[itemprop=\"telephone\"]:before {\n content: \"\\260e\";\n content: \"\\260e\" / \"telephone\";\n margin-right: 1em;\n}\n```\n\nNotice that in the example HTML below, we use the \"LocalBusiness\" micro-data scheme to encourage search engines to display the business contact data in the most usable format. This can make searching for and dialing a business phone number a much easier task, especially for users of assistive technologies. \n\n```html\n
\n Get in touch:\n \n +44 1-2345-67890\n \n
\n```\n\n> Screen reader: \"Get in touch: telephone\"\n> Screen reader: \"link, +44 1-2345-67890\"\n\nWhile a web link that automatically opens a telephone application would mainly be helpful on mobile phone devices, don't try to disable the default telephone link functionality on desktop devices. Most modern desktop operating systems allow you to call via a telephone link. Desktop VoIP apps, like FaceTime, Microsoft Teams Voice, or Skype, can be configured to handle the `tel:` scheme in web links. MacOS, for example, supports making phone calls from the desktop using an iPhone. This feature type can be beneficial for individuals with disabilities.\n\n## Reference implementation\n\n### Adding anchors to headings\n\nFor longer articles, encourage users to copy and share links to specific parts of the web page by adding visible clues that the heading has an anchor link.\n\n```html\n
\n

\n A Fresh Idea\n

\n

\n Try a new twist on a favorite drink for summer. It's cool, refreshing, and filled with delicious fruit flavors.\n

\n
\n```\n\n> Screen reader: \"heading level 3, link, A Fresh Idea\"\n\nThe icon that appears on hover (or focus) is implemented as a background image to keep it out of the way of screen readers: the link symbol is a visible but only decorative way of indicating the presence of the anchor link.\n\nReplace the example route with the working destination.\n\n```html\nDelivery and collection help\n```\n\n## Testing Approach and ACT Scripts\n\nTest the supported variants. Record the method, browser and assistive technology where relevant, and compare the observed result with the expected behaviour.\n\n### Checkpoints for the Tester\n\n1. Ensure each link contains visible text or a well-understood, conventional icon.\n2. For links containing only an icon, ensure that equivalent text is assigned to the graphic so that a screen reader can speak.\n3. Ensure that all links are consistently and visually distinct from the surrounding text so the user can identify them. Do not use color alone to identify links; this is inaccessible to users with low color perception.\n4. Ensure that when navigating the web page using the keyboard, it is visually apparent when a link has keyboard focus.\n5. Ensure that when the links are presented as a list, separate from their surrounding context, they have text or alternative text that is concise but distinctly describes the resource being linked to. (Link text such as \"click here,\" for example, is inadequate.)\n6. Prefer that when a link contains text along with an icon, where the icon is decorative-only, the screen reader ignores the icon.\n7. Ensure that examples of multiple links to the same resource are not adjacent or wrapping each other; combine these into a single link instead.\n8. Ensure that any cases of hidden or alternative text available only to screen readers are not different than the visible text or different from the icon's apparent meaning.\n\n## Groups of external destinations\n\nDistinguish leaving the site from opening a new tab. For an inline link, name the external service when that helps readers anticipate the destination. If an icon communicates that the link leaves the site, provide the same information in the link text, visibly or as accessible text. Keep a decorative SVG out of the focus order. Announce a new tab separately when the link opens one.\n\nFor a list of external links, use a descriptive heading and ordinary list markup. Explain a shared destination convention once where users will encounter it. If one link behaves differently, explain that behaviour on the link. Keep decorative icons out of the accessible name when adjacent text already explains them.\n\n### Checkpoints for the tester\n\n1. Review an inline link on its own and the external-link list in context.\n2. Check that the destination and any new-window behaviour are understandable with a keyboard, a screen reader and forced colours.\n\n### Supplied QA scripts\n\n- [Links and Anchors Test Criteria](qa/supplied/links-and-anchors.md).\n\nRead the [applicability and review notes](qa/Review.md) before using these scripts for release decisions.\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)\n- [Visible label is part of accessible name (2ee8b8)](qa/w3c-act/2ee8b8.md)\n\n\n\n## Sources\n\n- [Use high contrast mode in Windows](https://support.microsoft.com/en-gb/help/13862/windows-use-high-contrast-mode)\n- [Visually hidden text example](https://gist.github.com/Heydon/c8d46c0dd18ce96b5833b3b564e9f472)\n- [Removing SVG Keyboard Focus in IE](https://websemantics.uk/articles/removing-svg-keyboard-focus-in-internet-explorer/)\n- [VoiceOver and list-style-type: none](https://unfetteredthoughts.net/2017/09/26/voiceover-and-list-style-type-none/)\n- _G200: Opening new windows and tabs from a link only when necessary_ [Techniques for WCAG 2.0](https://www.w3.org/TR/WCAG20-TECHS/G200.html)\n- \"Tabnabbing is a computer exploit and phishing attack, which persuades users to submit their login details and passwords to popular websites by impersonating those sites and convincing the user that the site is genuine.\" [_Tabnabbing_, Wikipedia](https://en.wikipedia.org/wiki/Tabnabbing)\n- \"FaceTime in macOS 10.10 and later can also use the tel URL scheme to launch the Phone app on an iOS device using Handoff. This scenario works when FaceTime is configured to dial phone numbers (the default configuration) and the iOS device is connected to the same iCloud account as the Mac.\" [_Apple URL Scheme Reference_](https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html)\n- \"Standardized URI schemes have been defined for some common device functions, e.g. making phone calls, sending an SMS, and managing address books. These URI schemes, if supported, can enable users to easily use these functions from Web applications.\" [_Make Telephone Numbers \"Click-to-Call\"_, W3C Mobile Web Application Best Practices](https://www.w3.org/TR/mwabp/#bp-interaction-uri-schemes)\n- [telephone, A Schema.org Property](https://schema.org/telephone)\n- [Link has non-empty accessible name (c487ae)](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/proposed/)\n- [Visible label is part of accessible name (2ee8b8)](https://www.w3.org/WAI/standards-guidelines/act/rules/2ee8b8/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":6,"source_end_line":223,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"6794e7f13eb43f8fb914766732753707050b539e32596d3db5bbafc9046f416f","heading_path":["Anchors and Links"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-8","title":"Contents","text":"## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":8,"source_end_line":16,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"0e32893a2aa0532f0cfa50475629f11d30b9085627067fff4af1fced42f4da6f","heading_path":["Anchors and Links","Contents"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-18","title":"Introduction","text":"## Introduction\n\nHelp people identify destinations and open them using the browser or assistive technology. Give each link enough context to make sense on its own. For links to section headings, use [Headings](Headings.md) to check heading structure and wording. Use [Call to Action](Call%20to%20Action.md) when deciding whether a control should navigate or perform an action, and [Affordances, Signifiers and Design Conventions](Affordances%2C%20Signifiers%20and%20Design%20Conventions.md) for visual cues and expected behaviour.\n\nThe image or media filenames in these examples stand for assets supplied by the implementing project. For guidance on supplementary link text hidden visually, and its effect on speech input, see [Visually Hidden Content](Visually%20Hidden%20Content.md#use-visually-hidden-text-carefully).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":18,"source_end_line":22,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"a73bb4d5c000c399da413bb64a683ad1207e208eb8731a5d5a8f8528752ca56b","heading_path":["Anchors and Links","Introduction"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-24","title":"Recommended markup","text":"## Recommended markup\n\n### Link content\n\nWhen writing text content for a link, use concise but complete text describing the linked resource. This is particularly important for those who use a screen reader to scan the entire webpage and read out a list of only the links, where each link will have no context and must be understood on its own. For example, a series of article summaries, each containing a link with the text \"Read more,\" will be presented as a list of many \"Read more\" snippets to the screen reader user, with no indication of what following any link will allow the user to read more about.\n\nA list of links presented by a screen reader. The text from each link is read without any context from where it appears on the webpage.\n\nAdding the missing context to the link text will remove barriers for screen reader users and will likely help sighted users keep track of what they are linking to. In exceptional cases, where it would be redundant or distracting for sighted users to read the full details in the link content, this can be managed by adding the context as visually hidden text available only to screen reader users.\n\n```html\n\n Read more about our values\n\n

Our values

\n\n\n```\n\n> Screen reader example: \"link, Read more about our values\"\n\nAlthough the link text visually appears as only \"Read more\" in the context of the article entitled \"Our Values,\" it will appear as \"Read more about our values...\" when a screen reader user opens the list of all links from the webpage.\n\nAs a rule, you should keep the content intended for screen reader users the same as content intended for other users. Not all screen reader users are blind, and screen reader users that can see the text may be confused by hearing and seeing different content. In addition, having parallel but different content for different groups of users allows the possibility of differences in maintenance and quality to creep in: one version being localized while the other is not, or one lacking the same level of proofreading, for example.\n\n### Icons in links\n\nWhile having descriptive, visible text is the most accessible way to label a link, there are use cases where a well-understood icon would be more natural. In these cases, alternative text must be supplied for screen reader users who cannot see the icon.\n\nA simple HTML `img` element will display the icon. Screen readers will announce that an \"image\" is present and read out any text in the element's `alt` attribute. Choose an alternative text that summarizes the _meaning_ of the image; there's no need to explain that it is an \"image,\" \"icon,\" or \"picture\" in the alternative text.\n\n```html\nFollow Us\n
\n \n \"Mastodon\"\n \n
\n```\n\n> Screen reader: \"Follow Us\"\n> Screen reader: \"link, image, Mastodon\"\n\n### Groups of external destinations\n\nFor a list of external links, use a descriptive heading and ordinary list markup. Explain a shared destination convention once where users will encounter it. If one link behaves differently, explain that behaviour on the link. Keep decorative icons out of the accessible name when adjacent text already explains them.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":24,"source_end_line":78,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"6ada27da7bd49c948dd2c1ccbceaa7074663297cd9111834b99121426fc5cd2e","heading_path":["Anchors and Links","Recommended markup"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-26","title":"Link content","text":"### Link content\n\nWhen writing text content for a link, use concise but complete text describing the linked resource. This is particularly important for those who use a screen reader to scan the entire webpage and read out a list of only the links, where each link will have no context and must be understood on its own. For example, a series of article summaries, each containing a link with the text \"Read more,\" will be presented as a list of many \"Read more\" snippets to the screen reader user, with no indication of what following any link will allow the user to read more about.\n\nA list of links presented by a screen reader. The text from each link is read without any context from where it appears on the webpage.\n\nAdding the missing context to the link text will remove barriers for screen reader users and will likely help sighted users keep track of what they are linking to. In exceptional cases, where it would be redundant or distracting for sighted users to read the full details in the link content, this can be managed by adding the context as visually hidden text available only to screen reader users.\n\n```html\n\n Read more about our values\n\n

Our values

\n\n\n```\n\n> Screen reader example: \"link, Read more about our values\"\n\nAlthough the link text visually appears as only \"Read more\" in the context of the article entitled \"Our Values,\" it will appear as \"Read more about our values...\" when a screen reader user opens the list of all links from the webpage.\n\nAs a rule, you should keep the content intended for screen reader users the same as content intended for other users. Not all screen reader users are blind, and screen reader users that can see the text may be confused by hearing and seeing different content. In addition, having parallel but different content for different groups of users allows the possibility of differences in maintenance and quality to creep in: one version being localized while the other is not, or one lacking the same level of proofreading, for example.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":26,"source_end_line":56,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"aeb0da811295f88896e200076509956b20331b8f2aafac8d5a8a1f614944e8b8","heading_path":["Anchors and Links","Recommended markup","Link content"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-58","title":"Icons in links","text":"### Icons in links\n\nWhile having descriptive, visible text is the most accessible way to label a link, there are use cases where a well-understood icon would be more natural. In these cases, alternative text must be supplied for screen reader users who cannot see the icon.\n\nA simple HTML `img` element will display the icon. Screen readers will announce that an \"image\" is present and read out any text in the element's `alt` attribute. Choose an alternative text that summarizes the _meaning_ of the image; there's no need to explain that it is an \"image,\" \"icon,\" or \"picture\" in the alternative text.\n\n```html\nFollow Us\n
\n \n \"Mastodon\"\n \n
\n```\n\n> Screen reader: \"Follow Us\"\n> Screen reader: \"link, image, Mastodon\"","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":58,"source_end_line":74,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"3532eb5a5540444d766f3afc6c50fb4c6ff1a4811d0c045ca7fee32cb1832e98","heading_path":["Anchors and Links","Recommended markup","Icons in links"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-76","title":"Groups of external destinations","text":"### Groups of external destinations\n\nFor a list of external links, use a descriptive heading and ordinary list markup. Explain a shared destination convention once where users will encounter it. If one link behaves differently, explain that behaviour on the link. Keep decorative icons out of the accessible name when adjacent text already explains them.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":76,"source_end_line":78,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"1580040224be0154be23e29c76322936058f0752f7122e243523afa2fce4b57e","heading_path":["Anchors and Links","Recommended markup","Groups of external destinations"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-80","title":"Recommended layout","text":"## Recommended layout\n\nGive links a visual cue that people can recognise without relying on colour alone. Keep keyboard focus visible.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":80,"source_end_line":82,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"e1a40261035370fc2414755594464a8066f26a165e3cb8218470a696f0b7a10a","heading_path":["Anchors and Links","Recommended layout"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-84","title":"Recommended behaviour","text":"## Recommended behaviour\n\n### Translation services\n\nNot every string of text on a webpage will be available to translation services, like Google Translate. When choosing a technique for adding alternative text to a webpage, it's essential to ensure that this text, which screen reader users will rely on, will also be translated. Test any translation tools or services your website plans to support to ensure that alternative text is supported.\n\nOriginally in English, the service has translated the page into French. We can see that the text in the image element's `alt` attribute has also been translated into French.\n\n### External links\n\nWhen linking to external websites, it is a good idea from a security and accountability perspective to inform the user that they are about to visit content you are not responsible for. This can be a concern if the user is logged into your site or has some other session that would be interrupted or dropped once they leave your site.\n\n### New tabs\n\nOpening links in new tabs or windows can make some users' experience more confusing and less accessible, so it should be used rarely. One exception may be links to external websites. \n\nIn the following examples, notice the `noreferrer` and `noopener` values in the link's `rel` attribute. This follows good security practices when opening a new browser tab by preventing information about, or access to, the current tab from inadvertently being made available to the new tab. While not normally a problem, if the website you are linking to were hacked, such information or access could be useful to anyone wanting to trick the user. \n\n### Using an icon to signal new tabs\n\n```html\n

\n Read about our suppliers’\n \n Sustainable practices (opens in a new tab) ↗\n .\n

\n```\n\nThe route is illustrative. When the destination is an external site, identify it in the link text if that information helps users decide whether to follow the link. Keep the new-tab notice available as text.\n\n### Links to phone numbers\n\nUsing the most appropriate URI scheme in the `href` attribute for web links can make your contact information more usable, especially for users with disabilities. Some examples are shown below.\n\n```css\n[itemprop=\"telephone\"]:before {\n content: \"\\260e\";\n content: \"\\260e\" / \"telephone\";\n margin-right: 1em;\n}\n```\n\nNotice that in the example HTML below, we use the \"LocalBusiness\" micro-data scheme to encourage search engines to display the business contact data in the most usable format. This can make searching for and dialing a business phone number a much easier task, especially for users of assistive technologies. \n\n```html\n
\n Get in touch:\n \n +44 1-2345-67890\n \n
\n```\n\n> Screen reader: \"Get in touch: telephone\"\n> Screen reader: \"link, +44 1-2345-67890\"\n\nWhile a web link that automatically opens a telephone application would mainly be helpful on mobile phone devices, don't try to disable the default telephone link functionality on desktop devices. Most modern desktop operating systems allow you to call via a telephone link. Desktop VoIP apps, like FaceTime, Microsoft Teams Voice, or Skype, can be configured to handle the `tel:` scheme in web links. MacOS, for example, supports making phone calls from the desktop using an iPhone. This feature type can be beneficial for individuals with disabilities.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":84,"source_end_line":141,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"3bc9d9608891fbcc97e535c91f5e04f3003774791959eca58fdb7505337095d4","heading_path":["Anchors and Links","Recommended behaviour"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-86","title":"Translation services","text":"### Translation services\n\nNot every string of text on a webpage will be available to translation services, like Google Translate. When choosing a technique for adding alternative text to a webpage, it's essential to ensure that this text, which screen reader users will rely on, will also be translated. Test any translation tools or services your website plans to support to ensure that alternative text is supported.\n\nOriginally in English, the service has translated the page into French. We can see that the text in the image element's `alt` attribute has also been translated into French.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":86,"source_end_line":90,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"02f4b9b2bfdcfe1abefdca75e05fca856844abff3ac1fb84110dc19ffbb00511","heading_path":["Anchors and Links","Recommended behaviour","Translation services"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-92","title":"External links","text":"### External links\n\nWhen linking to external websites, it is a good idea from a security and accountability perspective to inform the user that they are about to visit content you are not responsible for. This can be a concern if the user is logged into your site or has some other session that would be interrupted or dropped once they leave your site.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":92,"source_end_line":94,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"a926987c016ab1494059c04dbd06c168b41f30ad11917e10481c5140ec750254","heading_path":["Anchors and Links","Recommended behaviour","External links"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-96","title":"New tabs","text":"### New tabs\n\nOpening links in new tabs or windows can make some users' experience more confusing and less accessible, so it should be used rarely. One exception may be links to external websites. \n\nIn the following examples, notice the `noreferrer` and `noopener` values in the link's `rel` attribute. This follows good security practices when opening a new browser tab by preventing information about, or access to, the current tab from inadvertently being made available to the new tab. While not normally a problem, if the website you are linking to were hacked, such information or access could be useful to anyone wanting to trick the user. ","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":96,"source_end_line":100,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"a64a3399c33d98be5d0a07a6ec14dd26c4ae3a804742fb7623dd9c09b215862b","heading_path":["Anchors and Links","Recommended behaviour","New tabs"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-102","title":"Using an icon to signal new tabs","text":"### Using an icon to signal new tabs\n\n```html\n

\n Read about our suppliers’\n \n Sustainable practices (opens in a new tab) ↗\n .\n

\n```\n\nThe route is illustrative. When the destination is an external site, identify it in the link text if that information helps users decide whether to follow the link. Keep the new-tab notice available as text.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":102,"source_end_line":113,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"f17ad94e315baffe45aa20f8bac77c0219b5e6c567ccd9bb3e6e40a6c67748d0","heading_path":["Anchors and Links","Recommended behaviour","Using an icon to signal new tabs"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-115","title":"Links to phone numbers","text":"### Links to phone numbers\n\nUsing the most appropriate URI scheme in the `href` attribute for web links can make your contact information more usable, especially for users with disabilities. Some examples are shown below.\n\n```css\n[itemprop=\"telephone\"]:before {\n content: \"\\260e\";\n content: \"\\260e\" / \"telephone\";\n margin-right: 1em;\n}\n```\n\nNotice that in the example HTML below, we use the \"LocalBusiness\" micro-data scheme to encourage search engines to display the business contact data in the most usable format. This can make searching for and dialing a business phone number a much easier task, especially for users of assistive technologies. \n\n```html\n
\n Get in touch:\n \n +44 1-2345-67890\n \n
\n```\n\n> Screen reader: \"Get in touch: telephone\"\n> Screen reader: \"link, +44 1-2345-67890\"\n\nWhile a web link that automatically opens a telephone application would mainly be helpful on mobile phone devices, don't try to disable the default telephone link functionality on desktop devices. Most modern desktop operating systems allow you to call via a telephone link. Desktop VoIP apps, like FaceTime, Microsoft Teams Voice, or Skype, can be configured to handle the `tel:` scheme in web links. MacOS, for example, supports making phone calls from the desktop using an iPhone. This feature type can be beneficial for individuals with disabilities.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":115,"source_end_line":141,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"b28249dde6c7247d710e9e537a57c3cecdfb29b8505423356d89ef4f6773c8e3","heading_path":["Anchors and Links","Recommended behaviour","Links to phone numbers"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-143","title":"Reference implementation","text":"## Reference implementation\n\n### Adding anchors to headings\n\nFor longer articles, encourage users to copy and share links to specific parts of the web page by adding visible clues that the heading has an anchor link.\n\n```html\n
\n

\n A Fresh Idea\n

\n

\n Try a new twist on a favorite drink for summer. It's cool, refreshing, and filled with delicious fruit flavors.\n

\n
\n```\n\n> Screen reader: \"heading level 3, link, A Fresh Idea\"\n\nThe icon that appears on hover (or focus) is implemented as a background image to keep it out of the way of screen readers: the link symbol is a visible but only decorative way of indicating the presence of the anchor link.\n\nReplace the example route with the working destination.\n\n```html\nDelivery and collection help\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":143,"source_end_line":168,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"8b730cf5aa8290f270749c2475220147c2c53a8d8956ef028088e56b450dad45","heading_path":["Anchors and Links","Reference implementation"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-145","title":"Adding anchors to headings","text":"### Adding anchors to headings\n\nFor longer articles, encourage users to copy and share links to specific parts of the web page by adding visible clues that the heading has an anchor link.\n\n```html\n
\n

\n A Fresh Idea\n

\n

\n Try a new twist on a favorite drink for summer. It's cool, refreshing, and filled with delicious fruit flavors.\n

\n
\n```\n\n> Screen reader: \"heading level 3, link, A Fresh Idea\"\n\nThe icon that appears on hover (or focus) is implemented as a background image to keep it out of the way of screen readers: the link symbol is a visible but only decorative way of indicating the presence of the anchor link.\n\nReplace the example route with the working destination.\n\n```html\nDelivery and collection help\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":145,"source_end_line":168,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"21857984533e805954ca3f36cd08ebf361e5504ff014de05d68c8911e982ff1b","heading_path":["Anchors and Links","Reference implementation","Adding anchors to headings"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-170","title":"Testing Approach and ACT Scripts","text":"## Testing Approach and ACT Scripts\n\nTest the supported variants. Record the method, browser and assistive technology where relevant, and compare the observed result with the expected behaviour.\n\n### Checkpoints for the Tester\n\n1. Ensure each link contains visible text or a well-understood, conventional icon.\n2. For links containing only an icon, ensure that equivalent text is assigned to the graphic so that a screen reader can speak.\n3. Ensure that all links are consistently and visually distinct from the surrounding text so the user can identify them. Do not use color alone to identify links; this is inaccessible to users with low color perception.\n4. Ensure that when navigating the web page using the keyboard, it is visually apparent when a link has keyboard focus.\n5. Ensure that when the links are presented as a list, separate from their surrounding context, they have text or alternative text that is concise but distinctly describes the resource being linked to. (Link text such as \"click here,\" for example, is inadequate.)\n6. Prefer that when a link contains text along with an icon, where the icon is decorative-only, the screen reader ignores the icon.\n7. Ensure that examples of multiple links to the same resource are not adjacent or wrapping each other; combine these into a single link instead.\n8. Ensure that any cases of hidden or alternative text available only to screen readers are not different than the visible text or different from the icon's apparent meaning.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":170,"source_end_line":183,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"dafc73512201eb85c71b83b68b7bc382d87c7e2a84b3889dca1f40d62d8171c5","heading_path":["Anchors and Links","Testing Approach and ACT Scripts"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-174","title":"Checkpoints for the Tester","text":"### Checkpoints for the Tester\n\n1. Ensure each link contains visible text or a well-understood, conventional icon.\n2. For links containing only an icon, ensure that equivalent text is assigned to the graphic so that a screen reader can speak.\n3. Ensure that all links are consistently and visually distinct from the surrounding text so the user can identify them. Do not use color alone to identify links; this is inaccessible to users with low color perception.\n4. Ensure that when navigating the web page using the keyboard, it is visually apparent when a link has keyboard focus.\n5. Ensure that when the links are presented as a list, separate from their surrounding context, they have text or alternative text that is concise but distinctly describes the resource being linked to. (Link text such as \"click here,\" for example, is inadequate.)\n6. Prefer that when a link contains text along with an icon, where the icon is decorative-only, the screen reader ignores the icon.\n7. Ensure that examples of multiple links to the same resource are not adjacent or wrapping each other; combine these into a single link instead.\n8. Ensure that any cases of hidden or alternative text available only to screen readers are not different than the visible text or different from the icon's apparent meaning.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":174,"source_end_line":183,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"a393ebb29eeae2420bcf4bf93db938fcb678b1f84cee8b122d84432f37b2d65e","heading_path":["Anchors and Links","Testing Approach and ACT Scripts","Checkpoints for the Tester"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-185","title":"Groups of external destinations","text":"## Groups of external destinations\n\nDistinguish leaving the site from opening a new tab. For an inline link, name the external service when that helps readers anticipate the destination. If an icon communicates that the link leaves the site, provide the same information in the link text, visibly or as accessible text. Keep a decorative SVG out of the focus order. Announce a new tab separately when the link opens one.\n\nFor a list of external links, use a descriptive heading and ordinary list markup. Explain a shared destination convention once where users will encounter it. If one link behaves differently, explain that behaviour on the link. Keep decorative icons out of the accessible name when adjacent text already explains them.\n\n### Checkpoints for the tester\n\n1. Review an inline link on its own and the external-link list in context.\n2. Check that the destination and any new-window behaviour are understandable with a keyboard, a screen reader and forced colours.\n\n### Supplied QA scripts\n\n- [Links and Anchors Test Criteria](qa/supplied/links-and-anchors.md).\n\nRead the [applicability and review notes](qa/Review.md) before using these scripts for release decisions.\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)\n- [Visible label is part of accessible name (2ee8b8)](qa/w3c-act/2ee8b8.md)\n\n","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":185,"source_end_line":209,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"c6d8675b711ed288c05750c116b843e6f8ca131c804f5713e9581dbda8e6ec65","heading_path":["Anchors and Links","Groups of external destinations"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-191","title":"Checkpoints for the tester","text":"### Checkpoints for the tester\n\n1. Review an inline link on its own and the external-link list in context.\n2. Check that the destination and any new-window behaviour are understandable with a keyboard, a screen reader and forced colours.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":191,"source_end_line":194,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"84031a21c6448402d8daf0ab21b8262f3501f29480606ff44d9a5b6e9fcf8069","heading_path":["Anchors and Links","Groups of external destinations","Checkpoints for the tester"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-196","title":"Supplied QA scripts","text":"### Supplied QA scripts\n\n- [Links and Anchors Test Criteria](qa/supplied/links-and-anchors.md).\n\nRead the [applicability and review notes](qa/Review.md) before using these scripts for release decisions.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":196,"source_end_line":200,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"687992234ef387828a2304307199bd8285238b8c8a53d06f17e1ef256f5b23d1","heading_path":["Anchors and Links","Groups of external destinations","Supplied QA scripts"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-202","title":"Related W3C ACT rules","text":"### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)\n- [Visible label is part of accessible name (2ee8b8)](qa/w3c-act/2ee8b8.md)\n\n","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":202,"source_end_line":209,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"4d2a8db76c716954cd0571ba7691c62943eb1db9f0a137f0b2f232c1278deb7f","heading_path":["Anchors and Links","Groups of external destinations","Related W3C ACT rules"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-anchors-and-links-211","title":"Sources","text":"## Sources\n\n- [Use high contrast mode in Windows](https://support.microsoft.com/en-gb/help/13862/windows-use-high-contrast-mode)\n- [Visually hidden text example](https://gist.github.com/Heydon/c8d46c0dd18ce96b5833b3b564e9f472)\n- [Removing SVG Keyboard Focus in IE](https://websemantics.uk/articles/removing-svg-keyboard-focus-in-internet-explorer/)\n- [VoiceOver and list-style-type: none](https://unfetteredthoughts.net/2017/09/26/voiceover-and-list-style-type-none/)\n- _G200: Opening new windows and tabs from a link only when necessary_ [Techniques for WCAG 2.0](https://www.w3.org/TR/WCAG20-TECHS/G200.html)\n- \"Tabnabbing is a computer exploit and phishing attack, which persuades users to submit their login details and passwords to popular websites by impersonating those sites and convincing the user that the site is genuine.\" [_Tabnabbing_, Wikipedia](https://en.wikipedia.org/wiki/Tabnabbing)\n- \"FaceTime in macOS 10.10 and later can also use the tel URL scheme to launch the Phone app on an iOS device using Handoff. This scenario works when FaceTime is configured to dial phone numbers (the default configuration) and the iOS device is connected to the same iCloud account as the Mac.\" [_Apple URL Scheme Reference_](https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html)\n- \"Standardized URI schemes have been defined for some common device functions, e.g. making phone calls, sending an SMS, and managing address books. These URI schemes, if supported, can enable users to easily use these functions from Web applications.\" [_Make Telephone Numbers \"Click-to-Call\"_, W3C Mobile Web Application Best Practices](https://www.w3.org/TR/mwabp/#bp-interaction-uri-schemes)\n- [telephone, A Schema.org Property](https://schema.org/telephone)\n- [Link has non-empty accessible name (c487ae)](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/proposed/)\n- [Visible label is part of accessible name (2ee8b8)](https://www.w3.org/WAI/standards-guidelines/act/rules/2ee8b8/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Anchors and Links.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Anchors%20and%20Links.md","source_start_line":211,"source_end_line":223,"source_document_sha256":"f6090d10cdcb3426c1037ac8b7431ce54108a4f11ea8469d0e66a9644da1adde","text_sha256":"dc92723e2f5fe12ca8fe7f96a7eb52371f054c271b34e728c463b7231d19cf63","heading_path":["Anchors and Links","Sources"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-6","title":"Authentication","text":"# Authentication\n\nProve access, recover when a method fails and return to the authorised task. Agree enrolment, sign-in, additional verification, session expiry, recovery and sign-out with the identity owner. Confirm approved methods, assurance, devices, third-party returns, retained work, supported password managers and no-script route. Use fictitious accounts in tests.\n\n## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Build this pattern](#build-this-pattern)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)\n\n## Introduction\n\nHelp people prove they can access an account and return to the task they came to do. Design enrolment, sign-in, additional verification, recovery and sign-out as one journey. Someone may lose a device, be unable to use a particular method or need to switch devices midway. Choose methods that meet the service's security needs and give people an accessible route at each step.\n\nWCAG 2.2 [3.3.8 Accessible Authentication (Minimum)](https://www.w3.org/TR/WCAG22/#accessible-authentication-minimum) (Level AA) covers every step of the authentication process. If a step requires a cognitive function test such as recalling a password or solving a puzzle, it must provide a method that avoids the test, a mechanism that helps the person complete it, or meet the criterion's object-recognition or user-provided non-text content exception. Password-manager support and copy and paste can provide assistance. Prefer a usable route that avoids puzzles and forced transcription.\n\n## Recommended markup\n\n- Use a native form with visible labels and an explicit submit button. Use `autocomplete=\"username\"` for the sign-in identifier, `current-password` for the existing password and `new-password` for a new one. Allow password managers, autofill and paste. See [HTML Form Elements](HTML%20Form%20Elements.md#input-purpose-and-autofill).\n- Mask passwords initially. If you offer visibility, use a native button labelled ‘Show password’ or ‘Hide password’ for its next action. Keep focus on the button and preserve the entered value.\n- Use one labelled text input for a one-time code. Allow the whole code to be pasted and use `autocomplete=\"one-time-code\"`. Add `inputmode=\"numeric\"` only for digits-only codes. A code can begin with zero, so keep it as text. Make the destination, expiry and resend options clear.\n- Use the [Forms](Forms.md#error-messages) pattern for missing fields and errors. Distinguish a field the person can correct from a sign-in failure that affects the whole form.\n\n## Recommended layout\n\nPut the method, instructions and primary action in reading order. Keep recovery and ‘Try another way’ routes near the step where someone might need them. Explain what will happen before asking someone to switch to another device, open an app or follow a third-party sign-in route. On return, show the current step and what remains to do.\n\nKeep inputs, verification controls, errors and visible focus usable at high zoom and on small screens. Let controls wrap with enlarged text. Keep warnings available long enough to read and act on. See [Notifications and Status Messages](Notifications%20and%20Status%20Messages.md#persistent-inline-feedback).\n\n## Recommended behaviour\n\n### Choose accessible methods that meet the security need\n\nOffer passkeys where supported and suitable for the service. Explain the device prompt in plain language and test enrolment, sign-in and recovery with the supported platform. Include a usable route when a device or authenticator is unavailable. For additional verification, offer approved alternatives where feasible and explain what each requires. Consider people who cannot use a smartphone, receive a call, scan a QR code or complete a biometric prompt.\n\nChoose verification and recovery methods according to their actual security properties. For example, a code entered manually is susceptible to phishing. Use [NIST authentication guidance](https://pages.nist.gov/800-63-4/sp800-63b.html) to decide which authenticators and recovery methods suit the service's assurance needs. Carry out credential verification, rate limiting and session management on the server or through the approved identity provider. Protect transport and keep passwords, codes and recovery secrets out of logs and analytics.\n\n### Explain failures and support recovery\n\nFor failed sign-in, give a useful next step without disclosing whether an account exists or is locked. For reset requests, use a consistent response such as ‘If these details match an account, we’ll send reset instructions’. Apply that consistency across the actual service response as well as the wording. For a code sent within a verification step, explain if the service knows it has expired and provide a way to request another. Describe when the next attempt is available where the service can safely do so. See [OWASP Authentication guidance](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html).\n\nKeep the approved recovery route accessible if a customer loses their usual authenticator. Avoid asking people to remember security-question answers as their only route. Explain what support can do and what proof is needed, without asking people to share a password or verification code with support. See [Support, Escalation and Handoffs](Support%2C%20Escalation%20and%20Handoffs.md).\n\n### Return to the task\n\nIf sign-in expires, explain what happened and what work is still available. Where permitted, return the person to the intended task after verifying access and preserve eligible progress. Keep credentials and one-time codes out of saved drafts. Apply the same checks to any identity provider or payment verification step. See [Saving and Resuming a Task](Saving%20and%20Resuming%20a%20Task.md#return-and-reauthenticate) and [Baskets and Checkout](Baskets%20and%20Checkout.md).\n\n\n\n\n\n\n## Build this pattern\n\n[Build Authentication](build-patterns/Authentication.md) using the prompt, retrieval pack and verification plan. [Original examples at the pilot baseline](https://github.com/Double-FW/Cosmos-UX-Design/blob/4925821776bbea3a5d837fac212581442a8c99e6/Authentication.md#reference-implementation).\n\n## Testing Approach and ACT Scripts\n\nTest the supported variants. Record the method, browser and assistive technology where relevant, and compare the observed result with the expected behaviour.\n\n\n\nUse test accounts and supported browsers, devices and assistive technologies. Cover the whole journey, including third-party steps, with fictitious credentials.\n\n| Method and action | Expected result |\n| --- | --- |\n| Use a keyboard and supported screen reader to sign in. Try autofill, a password manager and paste. Toggle password visibility with Enter and Space. | Labels are clear. Assisted entry works. The visible and accessible button names match the action, masking follows the control and focus stays usable. |\n| Paste a complete code starting with zero. Then try an expired code and request another. | The input retains the whole code. Feedback explains what to do next, and resend is reachable without re-entering unrelated details. |\n| Use a passkey if offered. Cancel the device prompt, then repeat without the usual device or method. | The person can return to sign-in and reach an approved accessible alternative or recovery route. |\n| Simulate an unsuccessful sign-in, a reset request and a failed identity-provider return. | Feedback offers a next step without exposing account state. Recovery can be completed with supported input and assistive technology. |\n| Expire the session during a task and sign in again. | The person understands what was retained and can return to an authorised task with eligible progress intact. |\n| Enlarge text, test narrow width and forced colours, then block scripts in a separate run. | Fields, errors and focus remain usable. The baseline works or an accessible sign-in route remains available. |\n\nReview authenticator choice, server controls and recovery separately with the service's security team. Use the accessibility checks to evaluate whether people can complete the supported journey.\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Form field has non-empty accessible name (e086e5)](qa/w3c-act/e086e5.md)\n- [Autocomplete attribute has valid value (73f2c2)](qa/w3c-act/73f2c2.md)\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n\n## Sources\n\n- [W3C: Understanding Accessible Authentication (Minimum)](https://www.w3.org/WAI/WCAG22/Understanding/accessible-authentication-minimum.html)\n- [GOV.UK Design System: Password input](https://design-system.service.gov.uk/components/password-input/)\n- [Atomic A11y: Web password input guidance](https://github.com/charlietriplett/atomica11y-skills/blob/main/atomica11y-skills/accessible-web/password-input.md)\n- [NIST SP 800-63B-4: Authentication and Authenticator Management](https://pages.nist.gov/800-63-4/sp800-63b.html)\n- [OWASP Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)\n- [3.3.8 Accessible Authentication (Minimum)](https://www.w3.org/TR/WCAG22/#accessible-authentication-minimum)\n- [Form field has non-empty accessible name (e086e5)](https://www.w3.org/WAI/standards-guidelines/act/rules/e086e5/proposed/)\n- [Autocomplete attribute has valid value (73f2c2)](https://www.w3.org/WAI/standards-guidelines/act/rules/73f2c2/proposed/)\n- [Button has non-empty accessible name (97a4e1)](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":6,"source_end_line":103,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"657ce7fb48d3342f229ae3664649417ae9f54c584d6ac479c367b26482bde85d","heading_path":["Authentication"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-10","title":"Contents","text":"## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Build this pattern](#build-this-pattern)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":10,"source_end_line":18,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"fc371e506016f192e53434404785db5e852a9954f8b56113571a781c446ddf63","heading_path":["Authentication","Contents"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-20","title":"Introduction","text":"## Introduction\n\nHelp people prove they can access an account and return to the task they came to do. Design enrolment, sign-in, additional verification, recovery and sign-out as one journey. Someone may lose a device, be unable to use a particular method or need to switch devices midway. Choose methods that meet the service's security needs and give people an accessible route at each step.\n\nWCAG 2.2 [3.3.8 Accessible Authentication (Minimum)](https://www.w3.org/TR/WCAG22/#accessible-authentication-minimum) (Level AA) covers every step of the authentication process. If a step requires a cognitive function test such as recalling a password or solving a puzzle, it must provide a method that avoids the test, a mechanism that helps the person complete it, or meet the criterion's object-recognition or user-provided non-text content exception. Password-manager support and copy and paste can provide assistance. Prefer a usable route that avoids puzzles and forced transcription.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":20,"source_end_line":24,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"8bf2de23871521bef99fd6982675d4e4e693bca83db364a5d7841f022cd8f6d4","heading_path":["Authentication","Introduction"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-26","title":"Recommended markup","text":"## Recommended markup\n\n- Use a native form with visible labels and an explicit submit button. Use `autocomplete=\"username\"` for the sign-in identifier, `current-password` for the existing password and `new-password` for a new one. Allow password managers, autofill and paste. See [HTML Form Elements](HTML%20Form%20Elements.md#input-purpose-and-autofill).\n- Mask passwords initially. If you offer visibility, use a native button labelled ‘Show password’ or ‘Hide password’ for its next action. Keep focus on the button and preserve the entered value.\n- Use one labelled text input for a one-time code. Allow the whole code to be pasted and use `autocomplete=\"one-time-code\"`. Add `inputmode=\"numeric\"` only for digits-only codes. A code can begin with zero, so keep it as text. Make the destination, expiry and resend options clear.\n- Use the [Forms](Forms.md#error-messages) pattern for missing fields and errors. Distinguish a field the person can correct from a sign-in failure that affects the whole form.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":26,"source_end_line":31,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"3d59370f67250949b6cc68f9938d9f6fb98b595b2a0888c98789c06983f62162","heading_path":["Authentication","Recommended markup"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-33","title":"Recommended layout","text":"## Recommended layout\n\nPut the method, instructions and primary action in reading order. Keep recovery and ‘Try another way’ routes near the step where someone might need them. Explain what will happen before asking someone to switch to another device, open an app or follow a third-party sign-in route. On return, show the current step and what remains to do.\n\nKeep inputs, verification controls, errors and visible focus usable at high zoom and on small screens. Let controls wrap with enlarged text. Keep warnings available long enough to read and act on. See [Notifications and Status Messages](Notifications%20and%20Status%20Messages.md#persistent-inline-feedback).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":33,"source_end_line":37,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"c40215e60f556a7235238f05d5e7638d8ef01a587332e2baa7be7b912c6c5601","heading_path":["Authentication","Recommended layout"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-39","title":"Recommended behaviour","text":"## Recommended behaviour\n\n### Choose accessible methods that meet the security need\n\nOffer passkeys where supported and suitable for the service. Explain the device prompt in plain language and test enrolment, sign-in and recovery with the supported platform. Include a usable route when a device or authenticator is unavailable. For additional verification, offer approved alternatives where feasible and explain what each requires. Consider people who cannot use a smartphone, receive a call, scan a QR code or complete a biometric prompt.\n\nChoose verification and recovery methods according to their actual security properties. For example, a code entered manually is susceptible to phishing. Use [NIST authentication guidance](https://pages.nist.gov/800-63-4/sp800-63b.html) to decide which authenticators and recovery methods suit the service's assurance needs. Carry out credential verification, rate limiting and session management on the server or through the approved identity provider. Protect transport and keep passwords, codes and recovery secrets out of logs and analytics.\n\n### Explain failures and support recovery\n\nFor failed sign-in, give a useful next step without disclosing whether an account exists or is locked. For reset requests, use a consistent response such as ‘If these details match an account, we’ll send reset instructions’. Apply that consistency across the actual service response as well as the wording. For a code sent within a verification step, explain if the service knows it has expired and provide a way to request another. Describe when the next attempt is available where the service can safely do so. See [OWASP Authentication guidance](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html).\n\nKeep the approved recovery route accessible if a customer loses their usual authenticator. Avoid asking people to remember security-question answers as their only route. Explain what support can do and what proof is needed, without asking people to share a password or verification code with support. See [Support, Escalation and Handoffs](Support%2C%20Escalation%20and%20Handoffs.md).\n\n### Return to the task\n\nIf sign-in expires, explain what happened and what work is still available. Where permitted, return the person to the intended task after verifying access and preserve eligible progress. Keep credentials and one-time codes out of saved drafts. Apply the same checks to any identity provider or payment verification step. See [Saving and Resuming a Task](Saving%20and%20Resuming%20a%20Task.md#return-and-reauthenticate) and [Baskets and Checkout](Baskets%20and%20Checkout.md).\n\n\n\n\n","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":39,"source_end_line":60,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"7b32368b5090ac7d9d9536fc59f3f5eece8fe38fed970db2dde88c095f14e4c7","heading_path":["Authentication","Recommended behaviour"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-41","title":"Choose accessible methods that meet the security need","text":"### Choose accessible methods that meet the security need\n\nOffer passkeys where supported and suitable for the service. Explain the device prompt in plain language and test enrolment, sign-in and recovery with the supported platform. Include a usable route when a device or authenticator is unavailable. For additional verification, offer approved alternatives where feasible and explain what each requires. Consider people who cannot use a smartphone, receive a call, scan a QR code or complete a biometric prompt.\n\nChoose verification and recovery methods according to their actual security properties. For example, a code entered manually is susceptible to phishing. Use [NIST authentication guidance](https://pages.nist.gov/800-63-4/sp800-63b.html) to decide which authenticators and recovery methods suit the service's assurance needs. Carry out credential verification, rate limiting and session management on the server or through the approved identity provider. Protect transport and keep passwords, codes and recovery secrets out of logs and analytics.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":41,"source_end_line":45,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"0ba3ec14c5c6f2e36fa2c62e18cde54b6f0201af0d403ad423eae1e87a0343fe","heading_path":["Authentication","Recommended behaviour","Choose accessible methods that meet the security need"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-47","title":"Explain failures and support recovery","text":"### Explain failures and support recovery\n\nFor failed sign-in, give a useful next step without disclosing whether an account exists or is locked. For reset requests, use a consistent response such as ‘If these details match an account, we’ll send reset instructions’. Apply that consistency across the actual service response as well as the wording. For a code sent within a verification step, explain if the service knows it has expired and provide a way to request another. Describe when the next attempt is available where the service can safely do so. See [OWASP Authentication guidance](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html).\n\nKeep the approved recovery route accessible if a customer loses their usual authenticator. Avoid asking people to remember security-question answers as their only route. Explain what support can do and what proof is needed, without asking people to share a password or verification code with support. See [Support, Escalation and Handoffs](Support%2C%20Escalation%20and%20Handoffs.md).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":47,"source_end_line":51,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"f1c977fe486374f03d670d68b8f3ec7012bd38a971e5b5c801e009d7efb67b49","heading_path":["Authentication","Recommended behaviour","Explain failures and support recovery"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-53","title":"Return to the task","text":"### Return to the task\n\nIf sign-in expires, explain what happened and what work is still available. Where permitted, return the person to the intended task after verifying access and preserve eligible progress. Keep credentials and one-time codes out of saved drafts. Apply the same checks to any identity provider or payment verification step. See [Saving and Resuming a Task](Saving%20and%20Resuming%20a%20Task.md#return-and-reauthenticate) and [Baskets and Checkout](Baskets%20and%20Checkout.md).\n\n\n\n\n","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":53,"source_end_line":60,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"957a2c192ba806e44f49552e1de23734c354153c9fabddf3dd4083a96e1ea3c5","heading_path":["Authentication","Recommended behaviour","Return to the task"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-62","title":"Build this pattern","text":"## Build this pattern\n\n[Build Authentication](build-patterns/Authentication.md) using the prompt, retrieval pack and verification plan. [Original examples at the pilot baseline](https://github.com/Double-FW/Cosmos-UX-Design/blob/4925821776bbea3a5d837fac212581442a8c99e6/Authentication.md#reference-implementation).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":62,"source_end_line":64,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"d75ac54239a17f475f25cff466ea3203f595bfe51cfaf178d5a84d486ae7125a","heading_path":["Authentication","Build this pattern"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-66","title":"Testing Approach and ACT Scripts","text":"## Testing Approach and ACT Scripts\n\nTest the supported variants. Record the method, browser and assistive technology where relevant, and compare the observed result with the expected behaviour.\n\n\n\nUse test accounts and supported browsers, devices and assistive technologies. Cover the whole journey, including third-party steps, with fictitious credentials.\n\n| Method and action | Expected result |\n| --- | --- |\n| Use a keyboard and supported screen reader to sign in. Try autofill, a password manager and paste. Toggle password visibility with Enter and Space. | Labels are clear. Assisted entry works. The visible and accessible button names match the action, masking follows the control and focus stays usable. |\n| Paste a complete code starting with zero. Then try an expired code and request another. | The input retains the whole code. Feedback explains what to do next, and resend is reachable without re-entering unrelated details. |\n| Use a passkey if offered. Cancel the device prompt, then repeat without the usual device or method. | The person can return to sign-in and reach an approved accessible alternative or recovery route. |\n| Simulate an unsuccessful sign-in, a reset request and a failed identity-provider return. | Feedback offers a next step without exposing account state. Recovery can be completed with supported input and assistive technology. |\n| Expire the session during a task and sign in again. | The person understands what was retained and can return to an authorised task with eligible progress intact. |\n| Enlarge text, test narrow width and forced colours, then block scripts in a separate run. | Fields, errors and focus remain usable. The baseline works or an accessible sign-in route remains available. |\n\nReview authenticator choice, server controls and recovery separately with the service's security team. Use the accessibility checks to evaluate whether people can complete the supported journey.\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Form field has non-empty accessible name (e086e5)](qa/w3c-act/e086e5.md)\n- [Autocomplete attribute has valid value (73f2c2)](qa/w3c-act/73f2c2.md)\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":66,"source_end_line":91,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"d5a427493b882cd0392067adedc1369279ce52ad82d5a734c77e43e074a78814","heading_path":["Authentication","Testing Approach and ACT Scripts"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-85","title":"Related W3C ACT rules","text":"### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Form field has non-empty accessible name (e086e5)](qa/w3c-act/e086e5.md)\n- [Autocomplete attribute has valid value (73f2c2)](qa/w3c-act/73f2c2.md)\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":85,"source_end_line":91,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"2a8e0650e96baefe3926dcdd7a6aac029ef4c7b3f7c19a36d85cd7963cfbd553","heading_path":["Authentication","Testing Approach and ACT Scripts","Related W3C ACT rules"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-authentication-93","title":"Sources","text":"## Sources\n\n- [W3C: Understanding Accessible Authentication (Minimum)](https://www.w3.org/WAI/WCAG22/Understanding/accessible-authentication-minimum.html)\n- [GOV.UK Design System: Password input](https://design-system.service.gov.uk/components/password-input/)\n- [Atomic A11y: Web password input guidance](https://github.com/charlietriplett/atomica11y-skills/blob/main/atomica11y-skills/accessible-web/password-input.md)\n- [NIST SP 800-63B-4: Authentication and Authenticator Management](https://pages.nist.gov/800-63-4/sp800-63b.html)\n- [OWASP Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)\n- [3.3.8 Accessible Authentication (Minimum)](https://www.w3.org/TR/WCAG22/#accessible-authentication-minimum)\n- [Form field has non-empty accessible name (e086e5)](https://www.w3.org/WAI/standards-guidelines/act/rules/e086e5/proposed/)\n- [Autocomplete attribute has valid value (73f2c2)](https://www.w3.org/WAI/standards-guidelines/act/rules/73f2c2/proposed/)\n- [Button has non-empty accessible name (97a4e1)](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Authentication.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Authentication.md","source_start_line":93,"source_end_line":103,"source_document_sha256":"7561ddffe387411f260fdfa4709133080b990e3e40f41808f07de541a702f15a","text_sha256":"021b9b82dae38b6d73bfd22009c4c274c0dfa6d90d441d21c5be702c3e6ec888","heading_path":["Authentication","Sources"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-6","title":"Badge","text":"# Badge\n\n## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)\n\n## Introduction\n\nUse a badge to help people identify a status, category or count at a glance. Place it with the item it describes so the relationship also makes sense when someone reads the page with a screen reader. Use a link or button when the person needs to act, such as applying a [filter](Filter%20and%20Sort.md).\n\n## Recommended markup\n\nUse visible text for the status, category or count and associate it with the relevant item. Use a link or button if the person can act on it.\n\n## Recommended layout\n\n\n\nUse a short, visible label in sentence case, such as ‘On hold’, ‘New’ or ‘3 unread messages’. Keep the same wording and visual treatment for the same meaning across the service. Use badges selectively. Where a status affects what someone can do next, also state it in the relevant content or instructions.\n\nKeep the meaning clear when colours are hard to distinguish or replaced. Provide visible wording in the badge or immediately beside it for every status, category or count. For example, show ‘Offline’ beside a dot and ‘Verified’ beside a tick. A bare number can work when the surrounding visible wording makes clear what it counts. Icons and dots that repeat the visible meaning are decorative. See [Icons](Icons.md) and [colour guidance](Colour%2C%20Contrast%20and%20Meaning.md).\n\nGive the full label room to wrap. Use relative text sizes and padding, and let the badge grow with its content. Let groups wrap without changing the reading order. Check default and inverse colour treatments on their intended surfaces. Keep informational badges visually distinct from controls, without a pointer cursor or hover and pressed styles.\n\n## Recommended behaviour\n\n\n\nA badge is non-interactive. Its value can change. Keep it out of the tab order. When a badge is part of a link or button, the parent control owns focus and activation. Give that control visible text that identifies its destination or action.\n\nKeep the current value readable on first load without a live announcement. When a change in the current view communicates an action outcome, waiting state, progress or error, make that status message available to assistive technology without moving focus, as required by WCAG 2.2 [4.1.3 Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (Level AA). For example, after someone adds an item, announce the confirmed count with a phrase such as ‘4 items in your basket’. A routine label change, such as a product gaining a ‘New’ badge, can be discovered in the reading order. See [Dynamic Content](Dynamic%20Content.md#status-messages).\n\nUpdate the displayed count when the value is confirmed. If one action produces several intermediate values, announce the final result of that action. Avoid rolling-number animation. If a badge disappears and the change matters, make the new state clear in the page content and announce it when it is a status message. Keep important information available for people who need more time to read it.\n\n## Reference implementation\n\n\n\n### Static badges and groups\n\nUse plain text in a `span`. Its contents are read as text in context. A generic `span` does not take an accessible name from `aria-label` or `aria-labelledby`. Hide decorative icons and dots from assistive technology with `aria-hidden=\"true\"` and keep them out of the tab order. Keep the text that conveys the badge’s meaning available in the reading order.\n\nThe following fragment works without scripts. Style the badge and dot in the host design system. Use a list for a meaningful group of badges. If removing the markers also removes list semantics in a supported browser, retain those semantics with `role=\"list\"`.\n\n```html\n\n```\n\n### Associating a badge with a control\n\nKeep the badge next to the item it describes in source order. If an adjacent badge provides information that people need when the control receives focus, reference the badge’s unique ID using `aria-describedby`. In this example, ‘Cotton shirt’ identifies the destination and ‘Backorder’ describes availability.\n\n```html\n

\n \n Cotton shirt\n \n Backorder\n

\n```\n\nWhen reading the page, users can find both the link and the stock status. On focus, the link has the name ‘Cotton shirt’ and the description ‘Backorder’. In a screen reader’s list of links, the link name still identifies the product.\n\nUse the link’s name when the badge text belongs with the destination label, as in the basket count below. Put the badge after the visible destination text so the name starts with the wording people see. This helps people using voice control, as described in [2.5.3 Label in Name](https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html).\n\n### Count and status updates\n\nShow what the number counts. If the visible context identifies the count, such as a ‘Basket’ link followed by ‘3’, use [visually hidden text](Anchors%20and%20Links.md#link-content) where needed to convey ‘3 items’. The example link’s name is ‘Basket 3 items’, including in a screen reader’s list of links. When announcing a change, use a status region that already exists before the update. If an existing message already confirms the outcome, use that message for the announcement.\n\nThis example starts with three items. It uses the shared visually hidden class linked above. Call the function with a non-negative whole number after the application confirms the final count for an action. Replace the sample route with the real basket destination. In a translated interface, use the project’s localisation system to format the complete link wording and status message, including the number and plural form.\n\n```html\n\n Basket 3 items\n\n

\n\n\n```\n\n## Testing Approach and ACT Scripts\n\nTest the supported variants. Record the method, browser and assistive technology where relevant, and compare the observed result with the expected behaviour.\n\n\n\nUse the project’s supported browsers and assistive technologies. Test each badge presentation in use and record the variant, environment and result.\n\n| Method and action | Expected result |\n| --- | --- |\n| Read a card or list item with a screen reader, Tab to its control and, for links, open the screen reader’s list of links. | The badge and its item are clear in reading order. The badge adds no tab stop. A supplementary description is available on focus. Text included in a link’s name follows its destination label and is available in the list of links. |\n| Inspect badges with icons or dots. Repeat in greyscale and with forced colours. | Visible wording still conveys the meaning if the icon, dot or background changes or disappears. Assistive technology reads the text and skips decorative graphics. |\n| Navigate a group of badges in reading order. Repeat with any list markers suppressed by CSS. | The group retains its list semantics and follows the visible sequence. |\n| Test a long or translated label at 200% text size. In separate checks, apply the [text spacing overrides](https://www.w3.org/WAI/WCAG22/Understanding/text-spacing.html) and test vertically scrolling content at [320 CSS pixels wide](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html). | Labels wrap without clipping or overlap, groups stay readable and nearby controls remain usable. Badge content and controls fit at 320 CSS pixels without introducing horizontal scrolling. |\n| Measure text and any meaningful graphic contrast for the variants and surfaces in use, including inverse treatments. Tab to any parent control in each supported theme and in forced colours. | Each applicable pair meets the thresholds in the colour guide. Keyboard focus remains visible even if the badge background disappears. |\n| Load the count variant with a screen reader. Trigger updates across zero, one and multiple items, where supported. Repeat with rapid updates and with an existing confirmation for the same action. | The initial count is readable without an unsolicited announcement. Wording agrees with the count. Each meaningful action outcome is conveyed with context and without duplicate or intermediate announcements. Focus stays with the user. |\n| Trigger a routine category change and, where supported, remove a badge that indicated a change in state. | The changed category is available in the reading order. If a removal matters, the new state is clear in the page content and is announced when it is a status message. |\n| Block scripts and reload a page with badges. | The initial labels and values remain readable. Any enhanced update has the fallback provided by the host feature. |\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)\n\n## Sources\n\n- [Web Content Accessibility Guidelines 2.2](https://www.w3.org/TR/WCAG22/)\n- [W3C guide to understanding WCAG 2.2](https://www.w3.org/WAI/WCAG22/Understanding/)\n- [ARIA role, state and property definitions](https://www.w3.org/TR/wai-aria-1.2/)\n- [Accessible name and description computation](https://www.w3.org/TR/accname-1.2/)\n- [ARIA authoring practices](https://www.w3.org/WAI/ARIA/apg/)\n- [W3C technique for announcing status messages](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA22)\n- [MDN guidance on ARIA live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions)\n- [Tag design and research](https://design-system.service.gov.uk/components/tag/)\n- [Tag implementation guidance](https://designsystem.digital.gov/components/tag/)\n- [Accessibility tree relationships](https://sarahmhigley.com/writing/roles-and-relationships/)\n- [List styles and accessibility](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/list-style#accessibility)\n- [4.1.3 Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html)\n- [2.5.3 Label in Name](https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html)\n- [text spacing overrides](https://www.w3.org/WAI/WCAG22/Understanding/text-spacing.html)\n- [320 CSS pixels wide](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html)\n- [Button has non-empty accessible name (97a4e1)](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/proposed/)\n- [Link has non-empty accessible name (c487ae)](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":6,"source_end_line":163,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"8518c14aed6670e941eca87c3f783eae4f59ba8b620c9af1b242fb7d157a6a84","heading_path":["Badge"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-8","title":"Contents","text":"## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":8,"source_end_line":16,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"0e32893a2aa0532f0cfa50475629f11d30b9085627067fff4af1fced42f4da6f","heading_path":["Badge","Contents"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-18","title":"Introduction","text":"## Introduction\n\nUse a badge to help people identify a status, category or count at a glance. Place it with the item it describes so the relationship also makes sense when someone reads the page with a screen reader. Use a link or button when the person needs to act, such as applying a [filter](Filter%20and%20Sort.md).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":18,"source_end_line":20,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"d873e3bdb52f07c8afd9e4c23ab35bbf159e1804427f827ac22c7d58b6db32f1","heading_path":["Badge","Introduction"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-22","title":"Recommended markup","text":"## Recommended markup\n\nUse visible text for the status, category or count and associate it with the relevant item. Use a link or button if the person can act on it.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":22,"source_end_line":24,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"780ccc9c1d26010e667c5550d12ef73814e3b2848ea8167e99b7a2df45fbd43b","heading_path":["Badge","Recommended markup"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-26","title":"Recommended layout","text":"## Recommended layout\n\n\n\nUse a short, visible label in sentence case, such as ‘On hold’, ‘New’ or ‘3 unread messages’. Keep the same wording and visual treatment for the same meaning across the service. Use badges selectively. Where a status affects what someone can do next, also state it in the relevant content or instructions.\n\nKeep the meaning clear when colours are hard to distinguish or replaced. Provide visible wording in the badge or immediately beside it for every status, category or count. For example, show ‘Offline’ beside a dot and ‘Verified’ beside a tick. A bare number can work when the surrounding visible wording makes clear what it counts. Icons and dots that repeat the visible meaning are decorative. See [Icons](Icons.md) and [colour guidance](Colour%2C%20Contrast%20and%20Meaning.md).\n\nGive the full label room to wrap. Use relative text sizes and padding, and let the badge grow with its content. Let groups wrap without changing the reading order. Check default and inverse colour treatments on their intended surfaces. Keep informational badges visually distinct from controls, without a pointer cursor or hover and pressed styles.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":26,"source_end_line":34,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"fab54ba56d4d1090430d7679a476babad1d9dfbe6e658becdbe21db2ecac14f6","heading_path":["Badge","Recommended layout"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-36","title":"Recommended behaviour","text":"## Recommended behaviour\n\n\n\nA badge is non-interactive. Its value can change. Keep it out of the tab order. When a badge is part of a link or button, the parent control owns focus and activation. Give that control visible text that identifies its destination or action.\n\nKeep the current value readable on first load without a live announcement. When a change in the current view communicates an action outcome, waiting state, progress or error, make that status message available to assistive technology without moving focus, as required by WCAG 2.2 [4.1.3 Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (Level AA). For example, after someone adds an item, announce the confirmed count with a phrase such as ‘4 items in your basket’. A routine label change, such as a product gaining a ‘New’ badge, can be discovered in the reading order. See [Dynamic Content](Dynamic%20Content.md#status-messages).\n\nUpdate the displayed count when the value is confirmed. If one action produces several intermediate values, announce the final result of that action. Avoid rolling-number animation. If a badge disappears and the change matters, make the new state clear in the page content and announce it when it is a status message. Keep important information available for people who need more time to read it.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":36,"source_end_line":44,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"7964f0266842b604413cc8f3891bb32580ece0ee13418ec3c939420f3dde8f66","heading_path":["Badge","Recommended behaviour"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-46","title":"Reference implementation","text":"## Reference implementation\n\n\n\n### Static badges and groups\n\nUse plain text in a `span`. Its contents are read as text in context. A generic `span` does not take an accessible name from `aria-label` or `aria-labelledby`. Hide decorative icons and dots from assistive technology with `aria-hidden=\"true\"` and keep them out of the tab order. Keep the text that conveys the badge’s meaning available in the reading order.\n\nThe following fragment works without scripts. Style the badge and dot in the host design system. Use a list for a meaningful group of badges. If removing the markers also removes list semantics in a supported browser, retain those semantics with `role=\"list\"`.\n\n```html\n\n```\n\n### Associating a badge with a control\n\nKeep the badge next to the item it describes in source order. If an adjacent badge provides information that people need when the control receives focus, reference the badge’s unique ID using `aria-describedby`. In this example, ‘Cotton shirt’ identifies the destination and ‘Backorder’ describes availability.\n\n```html\n

\n \n Cotton shirt\n \n Backorder\n

\n```\n\nWhen reading the page, users can find both the link and the stock status. On focus, the link has the name ‘Cotton shirt’ and the description ‘Backorder’. In a screen reader’s list of links, the link name still identifies the product.\n\nUse the link’s name when the badge text belongs with the destination label, as in the basket count below. Put the badge after the visible destination text so the name starts with the wording people see. This helps people using voice control, as described in [2.5.3 Label in Name](https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html).\n\n### Count and status updates\n\nShow what the number counts. If the visible context identifies the count, such as a ‘Basket’ link followed by ‘3’, use [visually hidden text](Anchors%20and%20Links.md#link-content) where needed to convey ‘3 items’. The example link’s name is ‘Basket 3 items’, including in a screen reader’s list of links. When announcing a change, use a status region that already exists before the update. If an existing message already confirms the outcome, use that message for the announcement.\n\nThis example starts with three items. It uses the shared visually hidden class linked above. Call the function with a non-negative whole number after the application confirms the final count for an action. Replace the sample route with the real basket destination. In a translated interface, use the project’s localisation system to format the complete link wording and status message, including the number and plural form.\n\n```html\n\n Basket 3 items\n\n

\n\n\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":46,"source_end_line":117,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"f8625919bfd5bf60984e3c27690b04b1c9abc86c8be01c5d0cdbe33a69b9d947","heading_path":["Badge","Reference implementation"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-50","title":"Static badges and groups","text":"### Static badges and groups\n\nUse plain text in a `span`. Its contents are read as text in context. A generic `span` does not take an accessible name from `aria-label` or `aria-labelledby`. Hide decorative icons and dots from assistive technology with `aria-hidden=\"true\"` and keep them out of the tab order. Keep the text that conveys the badge’s meaning available in the reading order.\n\nThe following fragment works without scripts. Style the badge and dot in the host design system. Use a list for a meaningful group of badges. If removing the markers also removes list semantics in a supported browser, retain those semantics with `role=\"list\"`.\n\n```html\n\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":50,"source_end_line":66,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"847307cf3813f15f6061d85e02a8eb007bf15778bd8677f9e5d91c366ae49dfe","heading_path":["Badge","Reference implementation","Static badges and groups"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-68","title":"Associating a badge with a control","text":"### Associating a badge with a control\n\nKeep the badge next to the item it describes in source order. If an adjacent badge provides information that people need when the control receives focus, reference the badge’s unique ID using `aria-describedby`. In this example, ‘Cotton shirt’ identifies the destination and ‘Backorder’ describes availability.\n\n```html\n

\n \n Cotton shirt\n \n Backorder\n

\n```\n\nWhen reading the page, users can find both the link and the stock status. On focus, the link has the name ‘Cotton shirt’ and the description ‘Backorder’. In a screen reader’s list of links, the link name still identifies the product.\n\nUse the link’s name when the badge text belongs with the destination label, as in the basket count below. Put the badge after the visible destination text so the name starts with the wording people see. This helps people using voice control, as described in [2.5.3 Label in Name](https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":68,"source_end_line":83,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"9b5d16adde0ca20da9d81aa603e61c7b93295759bb0533babd6b02bd6dbe488d","heading_path":["Badge","Reference implementation","Associating a badge with a control"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-85","title":"Count and status updates","text":"### Count and status updates\n\nShow what the number counts. If the visible context identifies the count, such as a ‘Basket’ link followed by ‘3’, use [visually hidden text](Anchors%20and%20Links.md#link-content) where needed to convey ‘3 items’. The example link’s name is ‘Basket 3 items’, including in a screen reader’s list of links. When announcing a change, use a status region that already exists before the update. If an existing message already confirms the outcome, use that message for the announcement.\n\nThis example starts with three items. It uses the shared visually hidden class linked above. Call the function with a non-negative whole number after the application confirms the final count for an action. Replace the sample route with the real basket destination. In a translated interface, use the project’s localisation system to format the complete link wording and status message, including the number and plural form.\n\n```html\n\n Basket 3 items\n\n

\n\n\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":85,"source_end_line":117,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"0396702906503c7e3d63211c673f60985663774808f5eab45e029233eb553849","heading_path":["Badge","Reference implementation","Count and status updates"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-119","title":"Testing Approach and ACT Scripts","text":"## Testing Approach and ACT Scripts\n\nTest the supported variants. Record the method, browser and assistive technology where relevant, and compare the observed result with the expected behaviour.\n\n\n\nUse the project’s supported browsers and assistive technologies. Test each badge presentation in use and record the variant, environment and result.\n\n| Method and action | Expected result |\n| --- | --- |\n| Read a card or list item with a screen reader, Tab to its control and, for links, open the screen reader’s list of links. | The badge and its item are clear in reading order. The badge adds no tab stop. A supplementary description is available on focus. Text included in a link’s name follows its destination label and is available in the list of links. |\n| Inspect badges with icons or dots. Repeat in greyscale and with forced colours. | Visible wording still conveys the meaning if the icon, dot or background changes or disappears. Assistive technology reads the text and skips decorative graphics. |\n| Navigate a group of badges in reading order. Repeat with any list markers suppressed by CSS. | The group retains its list semantics and follows the visible sequence. |\n| Test a long or translated label at 200% text size. In separate checks, apply the [text spacing overrides](https://www.w3.org/WAI/WCAG22/Understanding/text-spacing.html) and test vertically scrolling content at [320 CSS pixels wide](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html). | Labels wrap without clipping or overlap, groups stay readable and nearby controls remain usable. Badge content and controls fit at 320 CSS pixels without introducing horizontal scrolling. |\n| Measure text and any meaningful graphic contrast for the variants and surfaces in use, including inverse treatments. Tab to any parent control in each supported theme and in forced colours. | Each applicable pair meets the thresholds in the colour guide. Keyboard focus remains visible even if the badge background disappears. |\n| Load the count variant with a screen reader. Trigger updates across zero, one and multiple items, where supported. Repeat with rapid updates and with an existing confirmation for the same action. | The initial count is readable without an unsolicited announcement. Wording agrees with the count. Each meaningful action outcome is conveyed with context and without duplicate or intermediate announcements. Focus stays with the user. |\n| Trigger a routine category change and, where supported, remove a badge that indicated a change in state. | The changed category is available in the reading order. If a removal matters, the new state is clear in the page content and is announced when it is a status message. |\n| Block scripts and reload a page with badges. | The initial labels and values remain readable. Any enhanced update has the fallback provided by the host feature. |\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":119,"source_end_line":143,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"ebb33889889b5a31facfe82936eaae638a80ea5d4b26bde6e253338ecdd7f1cd","heading_path":["Badge","Testing Approach and ACT Scripts"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-138","title":"Related W3C ACT rules","text":"### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":138,"source_end_line":143,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"c47849871c804ca5776c50e969ffefccf4ff1b3b71eb730b23a5ad542ba021e1","heading_path":["Badge","Testing Approach and ACT Scripts","Related W3C ACT rules"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-badge-145","title":"Sources","text":"## Sources\n\n- [Web Content Accessibility Guidelines 2.2](https://www.w3.org/TR/WCAG22/)\n- [W3C guide to understanding WCAG 2.2](https://www.w3.org/WAI/WCAG22/Understanding/)\n- [ARIA role, state and property definitions](https://www.w3.org/TR/wai-aria-1.2/)\n- [Accessible name and description computation](https://www.w3.org/TR/accname-1.2/)\n- [ARIA authoring practices](https://www.w3.org/WAI/ARIA/apg/)\n- [W3C technique for announcing status messages](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA22)\n- [MDN guidance on ARIA live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions)\n- [Tag design and research](https://design-system.service.gov.uk/components/tag/)\n- [Tag implementation guidance](https://designsystem.digital.gov/components/tag/)\n- [Accessibility tree relationships](https://sarahmhigley.com/writing/roles-and-relationships/)\n- [List styles and accessibility](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/list-style#accessibility)\n- [4.1.3 Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html)\n- [2.5.3 Label in Name](https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html)\n- [text spacing overrides](https://www.w3.org/WAI/WCAG22/Understanding/text-spacing.html)\n- [320 CSS pixels wide](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html)\n- [Button has non-empty accessible name (97a4e1)](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/proposed/)\n- [Link has non-empty accessible name (c487ae)](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Badge.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Badge.md","source_start_line":145,"source_end_line":163,"source_document_sha256":"59807a38bbd08de3f462b3f0acbe5e8240a81f6fd98d60a86ac80cf268f02b90","text_sha256":"20ea94be5fb1dc76d0f656739db7d42fb849efcada732a79b55724a72a82cf61","heading_path":["Badge","Sources"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-6","title":"Baskets and Checkout","text":"# Baskets and Checkout\n\n## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)\n\n## Introduction\n\nHelp people check what they are buying, what they will pay and when they will receive it. Someone may need to change quantities, compare delivery options or recover after a payment interruption. Keep their choices available and show the next action at each stage.\n\n| Stage | What the person needs |\n| --- | --- |\n| Add and review | Confirmation that the intended item was added, with a way to reach the basket. |\n| Edit the basket | The item, quantity, price and availability, with a way to change or remove it. |\n| Choose delivery and payment | Available options, costs and timing, plus an accessible route through any third-party service. |\n| Review and commit | A clear total, significant terms and a way to change details before placing the order. |\n| Check the outcome | A persistent record of the confirmed order or a clear way to check an uncertain payment. |\n\n## Recommended markup\n\nUse a labelled list of items, with headings when they help people navigate a long basket. Use a link to a product or another step and a button to update or remove an item. Name repeated actions for their target, such as ‘Remove Travel mug’. Give quantity controls visible labels and a way to enter the quantity without repeated clicks. Use [Forms](Forms.md) for labels, validation and recovery.\n\nGroup delivery and payment choices with a `fieldset` and `legend`. Keep the price and timing with the option they describe. Use headings and a list of terms and values for the order summary. Give change links specific names, such as ‘Change delivery address’. Use appropriate autofill tokens for name, contact and address fields. Follow the [GOV.UK payment card details pattern](https://design-system.service.gov.uk/patterns/payment-card-details/) if the checkout collects card details.\n\n## Recommended layout\n\nKeep the order contents and total easy to find before commitment. Show item prices, discounts, delivery and other applicable charges. If a charge depends on a later selection, mark the current amount as an estimate and explain what remains to be calculated. Put the currency, final total and any recurring amount or interval near the order action. See [Informed Choice and Preferences](Informed%20Choice%20and%20Preferences.md#show-what-the-choice-means).\n\nShow the current step on a multi-step checkout and let people return to edit. Keep the route to guest checkout visible wherever the service supports it. Keep optional extras unselected and keep the discount field, account invitations and promotions from displacing the order review. At narrow widths, let the summary and controls reflow in reading order. Check that a sticky total or footer leaves the focused control visible.\n\n## Recommended behaviour\n\n### Update the basket\n\nLet people add, change and remove items without moving them to an unexpected view. Show the outcome next to the action or in the basket, and announce a concise update where the person could otherwise miss it. When an item is removed, move focus to an appropriate remaining item, an undo action or the empty-basket heading if the focused control disappeared. Expose the empty state and a way to continue shopping. See [Notifications and Status Messages](Notifications%20and%20Status%20Messages.md#persistent-inline-feedback).\n\nKeep the item quantities, costs and total in sync after edits. Apply a discount only when the person requests it and report whether it was accepted. Preserve existing items and valid entries when an update fails. If stock, price or delivery changes before commitment, identify what changed and let people review it again. See [Showing What Changed Before Confirmation](Showing%20What%20Changed%20Before%20Confirmation.md).\n\n### Complete checkout\n\nOffer guest checkout where an account is unnecessary. Explain why sign-in is needed where it is required. Keep valid information across steps and avoid asking for it again. WCAG 2.2 [3.3.7 Redundant Entry](https://www.w3.org/TR/WCAG22/#redundant-entry) (Level A) requires previously supplied information needed again in the same process to be populated or available to select, with exceptions for essential re-entry, security or information that is no longer valid. Let people edit the reused information where the task permits.\n\nIf payment opens another service, explain the transition and keep the basket recoverable on return. Include external payment and authentication steps in the supported journey. Let people review and correct the order before committing. This is one way to meet WCAG 2.2 [3.3.4 Error Prevention (Legal, Financial, Data)](https://www.w3.org/TR/WCAG22/#error-prevention-legal-financial-data) (Level AA), which also permits reversal or checking for errors with an opportunity to correct them.\n\n### Confirm or recover\n\nExplain the actual result. Give a confirmed order a reference, a summary and the next step. Distinguish payment that failed from a payment whose outcome is still unknown. If the answer is unknown, let people check the existing order before asking them to pay again. The service should recognise retries and prevent duplicate orders or charges. Preserve the basket and valid checkout details when people go back or return after interruption, subject to the service’s retention rules. See [Saving and Resuming a Task](Saving%20and%20Resuming%20a%20Task.md).\n\n## Reference implementation\n\n### Edit a basket item\n\nThis vanilla HTML fragment shows a server-rendered basket with one item. Replace the sample routes and item identifier with service values, and include the service’s request verification fields. The server validates quantity and availability, recalculates the price and returns the updated basket or an error with the entered values preserved. Use separate submit actions for update and removal. The form and review link work without JavaScript once connected to those routes.\n\n```html\n

Your basket

\n\n
\n

Travel mug

\n

£12 each

\n
\n \n \n \n \n
\n
\n\n

Basket summary

\n
\n
Items subtotal
£24
\n
Delivery
Calculated when you choose a delivery option
\n
\n

Continue to delivery options

\n```\n\n### Review the order before payment\n\nThis fragment shows the next relevant step after delivery has been chosen. Render the total and commitment text from the same server-side order record. Replace the example routes and review identifier. Add the service’s request verification fields. The payment handler verifies that the reviewed order still matches the current order and prevents duplicate commitments. Only render the final button at the step where it actually places the order.\n\n```html\n

Review your order

\n

2 × Travel mug

\n\n
\n
Items
£24
\n
Standard delivery
£4, within three to five working days
\n
Total including delivery
£28
\n
\n\n

Change basket items

\n

Change delivery option

\n\n
\n \n \n
\n```\n\n## Testing Approach and ACT Scripts\n\nTest the supported variants. Record the method, browser and assistive technology where relevant, and compare the observed result with the expected behaviour.\n\n\n\nUse a test payment environment and fictitious order data. Include the host checkout and any payment or authentication service. Record the route, starting state, device and assistive technology.\n\n| Method and action | Expected result |\n| --- | --- |\n| Add two items. Use keyboard and a supported screen reader to identify and edit each quantity. Remove the focused item, then remove the last item. | Each action identifies its item. Totals reflect accepted changes. Focus stays usable and the empty basket gives a next step. |\n| Try a discount that fails. Then change delivery or make an item unavailable between review and payment. | The basket stays intact after the discount error. Material changes are explained and the person can review the current order before committing. |\n| Complete guest checkout where offered. Use Back and the review page’s change links to edit an address or delivery choice. | The guest route is findable. Valid details remain available and the person can return to review without re-entering them unnecessarily. |\n| Complete payment using keyboard and a supported screen reader, including any external step. Then simulate a decline, timeout or uncertain result and retry through the offered route. | Payment outcomes are distinguishable. The result provides an appropriate next action and a retry creates no duplicate order or charge. |\n| Enlarge text, then test narrow width, forced colours and blocked scripts in separate runs. | Item actions, summary and focus remain visible. The baseline basket and checkout routes work, or the service offers a working alternative. |\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Form field has non-empty accessible name (e086e5)](qa/w3c-act/e086e5.md)\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)\n- [Autocomplete attribute has valid value (73f2c2)](qa/w3c-act/73f2c2.md)\n\n## Sources\n\n- [Double-FW: Accessibility Across the E-Commerce Customer Lifecycle](https://github.com/Double-FW/Inclusive_and_Effective_Design/blob/main/E-Commerce%20Customer%20Lifecycle.md)\n- [GOV.UK Design System: Check answers](https://design-system.service.gov.uk/patterns/check-answers/)\n- [GOV.UK Design System: Payment card details](https://design-system.service.gov.uk/patterns/payment-card-details/)\n- [W3C: Understanding Error Prevention (Legal, Financial, Data)](https://www.w3.org/WAI/WCAG22/Understanding/error-prevention-legal-financial-data.html)\n- [W3C: Understanding Redundant Entry](https://www.w3.org/WAI/WCAG22/Understanding/redundant-entry.html)\n- [3.3.7 Redundant Entry](https://www.w3.org/TR/WCAG22/#redundant-entry)\n- [3.3.4 Error Prevention (Legal, Financial, Data)](https://www.w3.org/TR/WCAG22/#error-prevention-legal-financial-data)\n- [Form field has non-empty accessible name (e086e5)](https://www.w3.org/WAI/standards-guidelines/act/rules/e086e5/proposed/)\n- [Button has non-empty accessible name (97a4e1)](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/proposed/)\n- [Link has non-empty accessible name (c487ae)](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/proposed/)\n- [Autocomplete attribute has valid value (73f2c2)](https://www.w3.org/WAI/standards-guidelines/act/rules/73f2c2/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":6,"source_end_line":153,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"0f0ad9e495498f09f32c3e920b146cd1a267c045cbe7760e496601438dfb5164","heading_path":["Baskets and Checkout"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-8","title":"Contents","text":"## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":8,"source_end_line":16,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"0e32893a2aa0532f0cfa50475629f11d30b9085627067fff4af1fced42f4da6f","heading_path":["Baskets and Checkout","Contents"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-18","title":"Introduction","text":"## Introduction\n\nHelp people check what they are buying, what they will pay and when they will receive it. Someone may need to change quantities, compare delivery options or recover after a payment interruption. Keep their choices available and show the next action at each stage.\n\n| Stage | What the person needs |\n| --- | --- |\n| Add and review | Confirmation that the intended item was added, with a way to reach the basket. |\n| Edit the basket | The item, quantity, price and availability, with a way to change or remove it. |\n| Choose delivery and payment | Available options, costs and timing, plus an accessible route through any third-party service. |\n| Review and commit | A clear total, significant terms and a way to change details before placing the order. |\n| Check the outcome | A persistent record of the confirmed order or a clear way to check an uncertain payment. |","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":18,"source_end_line":28,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"a900570fd56fa19eafc16bf4bf1b1d2ff215434e3db6e99bc43b56498f1b1f6d","heading_path":["Baskets and Checkout","Introduction"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-30","title":"Recommended markup","text":"## Recommended markup\n\nUse a labelled list of items, with headings when they help people navigate a long basket. Use a link to a product or another step and a button to update or remove an item. Name repeated actions for their target, such as ‘Remove Travel mug’. Give quantity controls visible labels and a way to enter the quantity without repeated clicks. Use [Forms](Forms.md) for labels, validation and recovery.\n\nGroup delivery and payment choices with a `fieldset` and `legend`. Keep the price and timing with the option they describe. Use headings and a list of terms and values for the order summary. Give change links specific names, such as ‘Change delivery address’. Use appropriate autofill tokens for name, contact and address fields. Follow the [GOV.UK payment card details pattern](https://design-system.service.gov.uk/patterns/payment-card-details/) if the checkout collects card details.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":30,"source_end_line":34,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"80f1e2236157eee81a82dc6a94d41c7412455f5b0fc35370cd10e88c1a99067c","heading_path":["Baskets and Checkout","Recommended markup"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-36","title":"Recommended layout","text":"## Recommended layout\n\nKeep the order contents and total easy to find before commitment. Show item prices, discounts, delivery and other applicable charges. If a charge depends on a later selection, mark the current amount as an estimate and explain what remains to be calculated. Put the currency, final total and any recurring amount or interval near the order action. See [Informed Choice and Preferences](Informed%20Choice%20and%20Preferences.md#show-what-the-choice-means).\n\nShow the current step on a multi-step checkout and let people return to edit. Keep the route to guest checkout visible wherever the service supports it. Keep optional extras unselected and keep the discount field, account invitations and promotions from displacing the order review. At narrow widths, let the summary and controls reflow in reading order. Check that a sticky total or footer leaves the focused control visible.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":36,"source_end_line":40,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"124808b790d533feb5386a0e9fa5593d51be6ee32f28beb424b306029d655eff","heading_path":["Baskets and Checkout","Recommended layout"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-42","title":"Recommended behaviour","text":"## Recommended behaviour\n\n### Update the basket\n\nLet people add, change and remove items without moving them to an unexpected view. Show the outcome next to the action or in the basket, and announce a concise update where the person could otherwise miss it. When an item is removed, move focus to an appropriate remaining item, an undo action or the empty-basket heading if the focused control disappeared. Expose the empty state and a way to continue shopping. See [Notifications and Status Messages](Notifications%20and%20Status%20Messages.md#persistent-inline-feedback).\n\nKeep the item quantities, costs and total in sync after edits. Apply a discount only when the person requests it and report whether it was accepted. Preserve existing items and valid entries when an update fails. If stock, price or delivery changes before commitment, identify what changed and let people review it again. See [Showing What Changed Before Confirmation](Showing%20What%20Changed%20Before%20Confirmation.md).\n\n### Complete checkout\n\nOffer guest checkout where an account is unnecessary. Explain why sign-in is needed where it is required. Keep valid information across steps and avoid asking for it again. WCAG 2.2 [3.3.7 Redundant Entry](https://www.w3.org/TR/WCAG22/#redundant-entry) (Level A) requires previously supplied information needed again in the same process to be populated or available to select, with exceptions for essential re-entry, security or information that is no longer valid. Let people edit the reused information where the task permits.\n\nIf payment opens another service, explain the transition and keep the basket recoverable on return. Include external payment and authentication steps in the supported journey. Let people review and correct the order before committing. This is one way to meet WCAG 2.2 [3.3.4 Error Prevention (Legal, Financial, Data)](https://www.w3.org/TR/WCAG22/#error-prevention-legal-financial-data) (Level AA), which also permits reversal or checking for errors with an opportunity to correct them.\n\n### Confirm or recover\n\nExplain the actual result. Give a confirmed order a reference, a summary and the next step. Distinguish payment that failed from a payment whose outcome is still unknown. If the answer is unknown, let people check the existing order before asking them to pay again. The service should recognise retries and prevent duplicate orders or charges. Preserve the basket and valid checkout details when people go back or return after interruption, subject to the service’s retention rules. See [Saving and Resuming a Task](Saving%20and%20Resuming%20a%20Task.md).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":42,"source_end_line":58,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"c640dbc3fd268d783131b495c134dec36df08a8eeee59f6b86c0d5fcad10e34c","heading_path":["Baskets and Checkout","Recommended behaviour"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-44","title":"Update the basket","text":"### Update the basket\n\nLet people add, change and remove items without moving them to an unexpected view. Show the outcome next to the action or in the basket, and announce a concise update where the person could otherwise miss it. When an item is removed, move focus to an appropriate remaining item, an undo action or the empty-basket heading if the focused control disappeared. Expose the empty state and a way to continue shopping. See [Notifications and Status Messages](Notifications%20and%20Status%20Messages.md#persistent-inline-feedback).\n\nKeep the item quantities, costs and total in sync after edits. Apply a discount only when the person requests it and report whether it was accepted. Preserve existing items and valid entries when an update fails. If stock, price or delivery changes before commitment, identify what changed and let people review it again. See [Showing What Changed Before Confirmation](Showing%20What%20Changed%20Before%20Confirmation.md).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":44,"source_end_line":48,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"a4d19d90e3073a0b058ec45e1009ccc76eabd14f08562749c66a67ac120c131a","heading_path":["Baskets and Checkout","Recommended behaviour","Update the basket"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-50","title":"Complete checkout","text":"### Complete checkout\n\nOffer guest checkout where an account is unnecessary. Explain why sign-in is needed where it is required. Keep valid information across steps and avoid asking for it again. WCAG 2.2 [3.3.7 Redundant Entry](https://www.w3.org/TR/WCAG22/#redundant-entry) (Level A) requires previously supplied information needed again in the same process to be populated or available to select, with exceptions for essential re-entry, security or information that is no longer valid. Let people edit the reused information where the task permits.\n\nIf payment opens another service, explain the transition and keep the basket recoverable on return. Include external payment and authentication steps in the supported journey. Let people review and correct the order before committing. This is one way to meet WCAG 2.2 [3.3.4 Error Prevention (Legal, Financial, Data)](https://www.w3.org/TR/WCAG22/#error-prevention-legal-financial-data) (Level AA), which also permits reversal or checking for errors with an opportunity to correct them.","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":50,"source_end_line":54,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"5aa5ba8d9e93d8054c7c81f609808e2be013717358d4897501af3ccd90f52fc4","heading_path":["Baskets and Checkout","Recommended behaviour","Complete checkout"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-56","title":"Confirm or recover","text":"### Confirm or recover\n\nExplain the actual result. Give a confirmed order a reference, a summary and the next step. Distinguish payment that failed from a payment whose outcome is still unknown. If the answer is unknown, let people check the existing order before asking them to pay again. The service should recognise retries and prevent duplicate orders or charges. Preserve the basket and valid checkout details when people go back or return after interruption, subject to the service’s retention rules. See [Saving and Resuming a Task](Saving%20and%20Resuming%20a%20Task.md).","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":56,"source_end_line":58,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"df60463cd582c5cd894505624464faf6a583a2855a985a142f8d1af7844e03b2","heading_path":["Baskets and Checkout","Recommended behaviour","Confirm or recover"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-60","title":"Reference implementation","text":"## Reference implementation\n\n### Edit a basket item\n\nThis vanilla HTML fragment shows a server-rendered basket with one item. Replace the sample routes and item identifier with service values, and include the service’s request verification fields. The server validates quantity and availability, recalculates the price and returns the updated basket or an error with the entered values preserved. Use separate submit actions for update and removal. The form and review link work without JavaScript once connected to those routes.\n\n```html\n

Your basket

\n\n
\n

Travel mug

\n

£12 each

\n
\n \n \n \n \n
\n
\n\n

Basket summary

\n
\n
Items subtotal
£24
\n
Delivery
Calculated when you choose a delivery option
\n
\n

Continue to delivery options

\n```\n\n### Review the order before payment\n\nThis fragment shows the next relevant step after delivery has been chosen. Render the total and commitment text from the same server-side order record. Replace the example routes and review identifier. Add the service’s request verification fields. The payment handler verifies that the reviewed order still matches the current order and prevents duplicate commitments. Only render the final button at the step where it actually places the order.\n\n```html\n

Review your order

\n

2 × Travel mug

\n\n
\n
Items
£24
\n
Standard delivery
£4, within three to five working days
\n
Total including delivery
£28
\n
\n\n

Change basket items

\n

Change delivery option

\n\n
\n \n \n
\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":60,"source_end_line":114,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"c1e8796359628d501d4edf536e6763200908402170834446ebc30dcdca70cad7","heading_path":["Baskets and Checkout","Reference implementation"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-62","title":"Edit a basket item","text":"### Edit a basket item\n\nThis vanilla HTML fragment shows a server-rendered basket with one item. Replace the sample routes and item identifier with service values, and include the service’s request verification fields. The server validates quantity and availability, recalculates the price and returns the updated basket or an error with the entered values preserved. Use separate submit actions for update and removal. The form and review link work without JavaScript once connected to those routes.\n\n```html\n

Your basket

\n\n
\n

Travel mug

\n

£12 each

\n
\n \n \n \n \n
\n
\n\n

Basket summary

\n
\n
Items subtotal
£24
\n
Delivery
Calculated when you choose a delivery option
\n
\n

Continue to delivery options

\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":62,"source_end_line":91,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"c4b9900ec74af65359fda18a9339f3990e4b2035a48a67bee63424f0b34c74b5","heading_path":["Baskets and Checkout","Reference implementation","Edit a basket item"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-93","title":"Review the order before payment","text":"### Review the order before payment\n\nThis fragment shows the next relevant step after delivery has been chosen. Render the total and commitment text from the same server-side order record. Replace the example routes and review identifier. Add the service’s request verification fields. The payment handler verifies that the reviewed order still matches the current order and prevents duplicate commitments. Only render the final button at the step where it actually places the order.\n\n```html\n

Review your order

\n

2 × Travel mug

\n\n
\n
Items
£24
\n
Standard delivery
£4, within three to five working days
\n
Total including delivery
£28
\n
\n\n

Change basket items

\n

Change delivery option

\n\n
\n \n \n
\n```","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":93,"source_end_line":114,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"c607b06115d817a1218d0a38410f55a164eb265d4d08afe9f58d9bd9dca5e3b8","heading_path":["Baskets and Checkout","Reference implementation","Review the order before payment"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-116","title":"Testing Approach and ACT Scripts","text":"## Testing Approach and ACT Scripts\n\nTest the supported variants. Record the method, browser and assistive technology where relevant, and compare the observed result with the expected behaviour.\n\n\n\nUse a test payment environment and fictitious order data. Include the host checkout and any payment or authentication service. Record the route, starting state, device and assistive technology.\n\n| Method and action | Expected result |\n| --- | --- |\n| Add two items. Use keyboard and a supported screen reader to identify and edit each quantity. Remove the focused item, then remove the last item. | Each action identifies its item. Totals reflect accepted changes. Focus stays usable and the empty basket gives a next step. |\n| Try a discount that fails. Then change delivery or make an item unavailable between review and payment. | The basket stays intact after the discount error. Material changes are explained and the person can review the current order before committing. |\n| Complete guest checkout where offered. Use Back and the review page’s change links to edit an address or delivery choice. | The guest route is findable. Valid details remain available and the person can return to review without re-entering them unnecessarily. |\n| Complete payment using keyboard and a supported screen reader, including any external step. Then simulate a decline, timeout or uncertain result and retry through the offered route. | Payment outcomes are distinguishable. The result provides an appropriate next action and a retry creates no duplicate order or charge. |\n| Enlarge text, then test narrow width, forced colours and blocked scripts in separate runs. | Item actions, summary and focus remain visible. The baseline basket and checkout routes work, or the service offers a working alternative. |\n\n### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Form field has non-empty accessible name (e086e5)](qa/w3c-act/e086e5.md)\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)\n- [Autocomplete attribute has valid value (73f2c2)](qa/w3c-act/73f2c2.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":116,"source_end_line":139,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"712b52655fac3f238ca122474d34b3dc624540acbb68224db88854e4582e11b6","heading_path":["Baskets and Checkout","Testing Approach and ACT Scripts"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-132","title":"Related W3C ACT rules","text":"### Related W3C ACT rules\n\nApply these proposed rules where their applicability conditions are met. Use the pattern checks above to verify behaviour and outcomes beyond their scope.\n\n- [Form field has non-empty accessible name (e086e5)](qa/w3c-act/e086e5.md)\n- [Button has non-empty accessible name (97a4e1)](qa/w3c-act/97a4e1.md)\n- [Link has non-empty accessible name (c487ae)](qa/w3c-act/c487ae.md)\n- [Autocomplete attribute has valid value (73f2c2)](qa/w3c-act/73f2c2.md)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":132,"source_end_line":139,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"b4f5fabc71672782b5b35d5aa0c89bd82a9e8dd733d3e4fdfdc7ed78ac78bf40","heading_path":["Baskets and Checkout","Testing Approach and ACT Scripts","Related W3C ACT rules"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-baskets-and-checkout-141","title":"Sources","text":"## Sources\n\n- [Double-FW: Accessibility Across the E-Commerce Customer Lifecycle](https://github.com/Double-FW/Inclusive_and_Effective_Design/blob/main/E-Commerce%20Customer%20Lifecycle.md)\n- [GOV.UK Design System: Check answers](https://design-system.service.gov.uk/patterns/check-answers/)\n- [GOV.UK Design System: Payment card details](https://design-system.service.gov.uk/patterns/payment-card-details/)\n- [W3C: Understanding Error Prevention (Legal, Financial, Data)](https://www.w3.org/WAI/WCAG22/Understanding/error-prevention-legal-financial-data.html)\n- [W3C: Understanding Redundant Entry](https://www.w3.org/WAI/WCAG22/Understanding/redundant-entry.html)\n- [3.3.7 Redundant Entry](https://www.w3.org/TR/WCAG22/#redundant-entry)\n- [3.3.4 Error Prevention (Legal, Financial, Data)](https://www.w3.org/TR/WCAG22/#error-prevention-legal-financial-data)\n- [Form field has non-empty accessible name (e086e5)](https://www.w3.org/WAI/standards-guidelines/act/rules/e086e5/proposed/)\n- [Button has non-empty accessible name (97a4e1)](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/proposed/)\n- [Link has non-empty accessible name (c487ae)](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/proposed/)\n- [Autocomplete attribute has valid value (73f2c2)](https://www.w3.org/WAI/standards-guidelines/act/rules/73f2c2/proposed/)","record_type":"section","source_repository":"Double-FW/Cosmos-UX-Design","source_path":"Baskets and Checkout.md","source_commit":"6195ccd6b7c30e7ebf35eef7357aaedd11f8e068","source_url":"https://github.com/Double-FW/Cosmos-UX-Design/blob/6195ccd6b7c30e7ebf35eef7357aaedd11f8e068/Baskets%20and%20Checkout.md","source_start_line":141,"source_end_line":153,"source_document_sha256":"740161fa6e51ef244ff53194177dc8e5154ff034a811345c616607c92d037c9e","text_sha256":"70337002725cd3c737ea2cb1723285dd9038cf64fab829a562cb682eae332a04","heading_path":["Baskets and Checkout","Sources"],"declared_source_license":"MIT","repository_license":"MIT","dataset_version":"1.0.0","source_commit_date":"2026-11-29","language":"en-GB","review_status":"Consult the source text; the exporter does not infer approval."} {"id":"section-breadcrumbs-6","title":"Breadcrumbs","text":"# Breadcrumbs\n\n## Contents\n\n- [Introduction](#introduction)\n- [Recommended markup](#recommended-markup)\n- [Recommended layout](#recommended-layout)\n- [Recommended behaviour](#recommended-behaviour)\n- [Reference implementation](#reference-implementation)\n- [Testing Approach and ACT Scripts](#testing-approach-and-act-scripts)\n- [Sources](#sources)\n\n## Introduction\n\nA breadcrumb component provides users with a clear and intuitive way to understand the hierarchy of the content, and to navigate back to previous sections of the website. Breadcrumbs are particularly useful for large websites or web applications with a deep and complex structure. Use [Landmarks](Landmarks.md) and [Page Structure](Page_Structure.md) to place and name the breadcrumb navigation within the page. Compare it with [Global Navigation](Global%20Navigation.md) and [Site Menus](Site%20Menus.md) so the hierarchy trail complements rather than duplicates other navigation.\n\n## Recommended markup\n\nUse a named `nav` with a list of ancestor links. Mark the current page with `aria-current=\"page\"`.\n\n## Recommended layout\n\n\n\nEach ancestor breadcrumb should link to the corresponding section of the website or application. The breadcrumb should be visually separated from the main content, and should be distinguishable from regular links. The last item in the breadcrumb list should indicate the current page.\n\n### Requirements\n\nThere are no further requirements for this component.\n\n### Guidelines\n\nBetween each link there should be a separator, such as a chevron or a slash. The separator should be visually distinguishable from the links.\n\n## Recommended behaviour\n\nLet people follow ancestor links through ordinary browser navigation. Update the current-page marker as they move through the hierarchy.\n\n## Reference implementation\n\n\n\nThe breadcrumb should be a list of links, using either an `
    ` or `