{"skills":[{"name":"Check control labels for speech input","description":"Compare what a person sees on a control with its computed accessible name to find labels a speech user cannot say naturally.","content":"# Check control labels for speech input\n\nCompare what a person sees on a control with its computed accessible name to find labels a speech user cannot say naturally.\n\n## When to use this skill\n\n- Someone has a list of buttons, links or fields with their visible text and the accessible names from browser developer tools or an audit.\n- A voice control user (for example Dragon, Voice Control on Apple devices or Voice Access on Android) says a control does not respond when they say its label.\n- A design system is adding aria-label to buttons and the team wants to check it has not replaced the visible wording.\n\n## When not to use it\n\n- Choosing a good name for an icon-only control. That is WCAG 1.1.1 and 4.1.2 work; use the image alternatives skill for the icon's text.\n- Checking that a control works by keyboard or exposes the right role and state. Run a keyboard and Name, Role, Value review for that.\n- Testing a particular speech product's commands. This check compares text only; confirm real behaviour with the person's own software.\n\n## What you need\n\n- Each interactive control's visible text and computed accessible name from the accessibility tree.\n- Any relevant context such as icon-only controls, punctuation, or symbolic text.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Can you supply the computed accessible name from the accessibility tree (for example the Accessibility pane in browser developer tools), not just the HTML attributes? The computed name is what speech software matches against.\n- What exact text is visible on or next to each control, including text inside images? The comparison is with what a sighted speech user can read.\n- Which state was captured? Labels that change, such as Play and Pause, need each state checked.\n\n## Method\n\n1. List each interactive control with its visible label exactly as displayed, including adjacent visible label text for form fields and words inside images of text. Note controls whose only visible content is an icon or symbol.\n2. Get the computed accessible name from the accessibility tree for the same state. Do not infer it from one attribute: in the accessible name computation, aria-labelledby is used before aria-label, and both before native labels such as the label element or alt, so the attribute you can see may not be the name.\n3. Normalise both strings before comparing: ignore case, collapse whitespace and ignore punctuation such as a trailing ellipsis or colon. W3C says capitalisation and most punctuation are not relevant to this criterion.\n4. Check that the visible words appear in the name in the same order as one unbroken phrase. A longer name such as 'Apply code to basket' for the visible 'Apply code' passes. W3C recommends putting the visible text first, so note a name that passes but buries the label.\n5. Mark mismatch where the name omits, reorders or replaces the visible words, even with a sensible synonym. Mark no-text for a control whose visible content is only an icon or symbol, because text used symbolically is not treated as a visible label, and assess its name separately. Mark unknown where no computed name was captured.\n6. For each mismatch, give the fix: change the accessible name so it contains the visible words (often by removing a conflicting aria-label or aria-labelledby), or change the visible text, then recheck the computed name in the tree.\n\n## Checks before you deliver\n\n- Replacing visible words with synonyms can prevent activation by voice even when the standalone accessible name sounds reasonable.\n- A pass on this check establishes label containment only. It does not prove the control works by keyboard or has the right role.\n- Reading aria-label from the markup and calling it the name misses an aria-labelledby that overrides it. Use the computed name from the accessibility tree.\n- A lone symbol such as '+' or '>' used as an icon is not a visible label for this test. W3C treats text used symbolically as not a label.\n- Controls whose label changes with state, such as Show and Hide, can pass in one state and fail in the other. Check every state the person will see.\n\n## How to present the result\n\nStart with how many controls match, mismatch, have no visible text or could not be checked. Then give a table with each control, its visible label, its computed name and the result. For each mismatch, give the corrected accessible name or markup change ready to hand to a developer, and list the controls whose names still need capturing.\n\n## Worked example\n\n**Request:** Check each computed name against the visible text.\n\n**Supplied material:**\n\n```text\nN1 visible=Pay now | computed=Confirm order\nN2 visible=Apply code | computed=Apply code to basket\nN3 icon only (magnifying glass) | computed=Search\n```\n\n**Answer:** Give the payment button a computed name containing \u201cPay now\u201d, its visible label, then verify the name in the accessibility tree. \u201cApply code\u201d already matches its longer name. The Search icon has no visible text to compare.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn controls in source order as {id,result}. Use match for ordinary visible words contained in order as a contiguous phrase, mismatch for a known non-match, no-text for an icon-only control and unknown for absent computed-name evidence.\n\n## Sources\n\n- [W3C Understanding Label in Name](https:\/\/www.w3.org\/WAI\/WCAG22\/Understanding\/label-in-name.html): Explains WCAG 2.2 success criterion 2.5.3 (Level A): for controls with visible text labels, the accessible name contains the text presented visually. It recommends starting the name with the label, says capitalisation and most punctuation are not relevant, and says text used symbolically is not a visible label.\n- [W3C technique G208: Including the text of the visible label as part of the accessible name](https:\/\/www.w3.org\/WAI\/WCAG22\/Techniques\/general\/G208): Its test checks that the accessible name contains the same letters in the same order as the visible label. The skill's in-order, unbroken comparison follows this test.\n- [W3C Accessible Name and Description Computation 1.1](https:\/\/www.w3.org\/TR\/accname\/): The W3C Recommendation for computing accessible names. It processes aria-labelledby before aria-label, and both before native labelling such as the HTML label element or alt, which is why the skill reads the computed name rather than a single attribute.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/check-control-labels-for-speech-input\n","scope":"contextual","trigger_keywords":["Check control labels for speech input","check-control-labels-for-speech-input","check control labels for speech input","Do our button names match the words people see, so voice control works?","Do our button names match the words people see, so voice control works","label in name","speech input labels","visible label match"],"is_private":true,"is_active":true,"scripts":[{"name":"check-control-labels-for-speech-input-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"check-control-labels-for-speech-input-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: check-control-labels-for-speech-input\ndescription: \"Check that each control's accessible name contains its visible label text, so people using voice control can say what they see. Use when reviewing buttons, links and form fields for WCAG 2.5.3 Label in Name, or when a speech user reports that saying a button's label does nothing.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/check-control-labels-for-speech-input\n---\n\n# Check control labels for speech input\n\nCompare what a person sees on a control with its computed accessible name to find labels a speech user cannot say naturally.\n\n## When to use this skill\n\n- Someone has a list of buttons, links or fields with their visible text and the accessible names from browser developer tools or an audit.\n- A voice control user (for example Dragon, Voice Control on Apple devices or Voice Access on Android) says a control does not respond when they say its label.\n- A design system is adding aria-label to buttons and the team wants to check it has not replaced the visible wording.\n\n## When not to use it\n\n- Choosing a good name for an icon-only control. That is WCAG 1.1.1 and 4.1.2 work; use the image alternatives skill for the icon's text.\n- Checking that a control works by keyboard or exposes the right role and state. Run a keyboard and Name, Role, Value review for that.\n- Testing a particular speech product's commands. This check compares text only; confirm real behaviour with the person's own software.\n\n## What you need\n\n- Each interactive control's visible text and computed accessible name from the accessibility tree.\n- Any relevant context such as icon-only controls, punctuation, or symbolic text.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Can you supply the computed accessible name from the accessibility tree (for example the Accessibility pane in browser developer tools), not just the HTML attributes? The computed name is what speech software matches against.\n- What exact text is visible on or next to each control, including text inside images? The comparison is with what a sighted speech user can read.\n- Which state was captured? Labels that change, such as Play and Pause, need each state checked.\n\n## Method\n\n1. List each interactive control with its visible label exactly as displayed, including adjacent visible label text for form fields and words inside images of text. Note controls whose only visible content is an icon or symbol.\n2. Get the computed accessible name from the accessibility tree for the same state. Do not infer it from one attribute: in the accessible name computation, aria-labelledby is used before aria-label, and both before native labels such as the label element or alt, so the attribute you can see may not be the name.\n3. Normalise both strings before comparing: ignore case, collapse whitespace and ignore punctuation such as a trailing ellipsis or colon. W3C says capitalisation and most punctuation are not relevant to this criterion.\n4. Check that the visible words appear in the name in the same order as one unbroken phrase. A longer name such as 'Apply code to basket' for the visible 'Apply code' passes. W3C recommends putting the visible text first, so note a name that passes but buries the label.\n5. Mark mismatch where the name omits, reorders or replaces the visible words, even with a sensible synonym. Mark no-text for a control whose visible content is only an icon or symbol, because text used symbolically is not treated as a visible label, and assess its name separately. Mark unknown where no computed name was captured.\n6. For each mismatch, give the fix: change the accessible name so it contains the visible words (often by removing a conflicting aria-label or aria-labelledby), or change the visible text, then recheck the computed name in the tree.\n\n## Checks before you deliver\n\n- Replacing visible words with synonyms can prevent activation by voice even when the standalone accessible name sounds reasonable.\n- A pass on this check establishes label containment only. It does not prove the control works by keyboard or has the right role.\n- Reading aria-label from the markup and calling it the name misses an aria-labelledby that overrides it. Use the computed name from the accessibility tree.\n- A lone symbol such as '+' or '>' used as an icon is not a visible label for this test. W3C treats text used symbolically as not a label.\n- Controls whose label changes with state, such as Show and Hide, can pass in one state and fail in the other. Check every state the person will see.\n\n## How to present the result\n\nStart with how many controls match, mismatch, have no visible text or could not be checked. Then give a table with each control, its visible label, its computed name and the result. For each mismatch, give the corrected accessible name or markup change ready to hand to a developer, and list the controls whose names still need capturing.\n\n## Worked example\n\n**Request:** Check each computed name against the visible text.\n\n**Supplied material:**\n\n```text\nN1 visible=Pay now | computed=Confirm order\nN2 visible=Apply code | computed=Apply code to basket\nN3 icon only (magnifying glass) | computed=Search\n```\n\n**Answer:** Give the payment button a computed name containing \u201cPay now\u201d, its visible label, then verify the name in the accessibility tree. \u201cApply code\u201d already matches its longer name. The Search icon has no visible text to compare.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn controls in source order as {id,result}. Use match for ordinary visible words contained in order as a contiguous phrase, mismatch for a known non-match, no-text for an icon-only control and unknown for absent computed-name evidence.\n\n## Sources\n\n- [W3C Understanding Label in Name](https:\/\/www.w3.org\/WAI\/WCAG22\/Understanding\/label-in-name.html): Explains WCAG 2.2 success criterion 2.5.3 (Level A): for controls with visible text labels, the accessible name contains the text presented visually. It recommends starting the name with the label, says capitalisation and most punctuation are not relevant, and says text used symbolically is not a visible label.\n- [W3C technique G208: Including the text of the visible label as part of the accessible name](https:\/\/www.w3.org\/WAI\/WCAG22\/Techniques\/general\/G208): Its test checks that the accessible name contains the same letters in the same order as the visible label. The skill's in-order, unbroken comparison follows this test.\n- [W3C Accessible Name and Description Computation 1.1](https:\/\/www.w3.org\/TR\/accname\/): The W3C Recommendation for computing accessible names. It processes aria-labelledby before aria-label, and both before native labelling such as the HTML label element or alt, which is why the skill reads the computed name rather than a single attribute.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/check-control-labels-for-speech-input\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/check-control-labels-for-speech-input\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# Two checkout controls\n\nCheck each computed name against the visible text.\n\n## Supplied material\n\nN1 visible=Pay now | computed=Confirm order\nN2 visible=Apply code | computed=Apply code to basket\nN3 icon only (magnifying glass) | computed=Search\n\n## Worked answer\n\nGive the payment button a computed name containing \u201cPay now\u201d, its visible label, then verify the name in the accessibility tree. \u201cApply code\u201d already matches its longer name. The Search icon has no visible text to compare.\n\n## Reasoning\n\nThe payment button has a meaningful name that still omits the visible words a customer would speak.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Check each computed name against the visible text.\nReturn only the JSON specified in SKILL.md for this test.\n\nN1 visible=Pay now | computed=Confirm order\nN2 visible=Apply code | computed=Apply code to basket\nN3 icon only (magnifying glass) | computed=Search\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"controls\": [\n        {\n            \"id\": \"N1\",\n            \"result\": \"mismatch\"\n        },\n        {\n            \"id\": \"N2\",\n            \"result\": \"match\"\n        },\n        {\n            \"id\": \"N3\",\n            \"result\": \"no-text\"\n        }\n    ]\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The payment button has a meaningful name that still omits the visible words a customer would speak.\n"},{"path":"tests\/case-2\/request.txt","content":"Review these control labels.\nReturn only the JSON specified in SKILL.md for this test.\n\nA visible=Continue\u2026 | computed=continue to payment\nB visible=Select date | computed name was not captured\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"controls\": [\n        {\n            \"id\": \"A\",\n            \"result\": \"match\"\n        },\n        {\n            \"id\": \"B\",\n            \"result\": \"unknown\"\n        }\n    ]\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"The decorative ellipsis is irrelevant to this comparison. The absent tree capture cannot support a verdict.\n"}],"is_active":true,"is_approved":false}]}]}