{"skills":[{"name":"Review form error messages","description":"Check whether a person can identify which input failed and what was wrong after the form detects an error.","content":"# Review form error messages\n\nCheck whether a person can identify which input failed and what was wrong after the form detects an error.\n\n## When to use this skill\n\n- Someone has screenshots or notes of a form's error state and wants to know whether the errors are accessible.\n- A form marks errors only with red borders or icons and the team wants to know what to add.\n- An error summary at the top of a page lists problems and the team wants to check that each one leads to the right field.\n\n## When not to use it\n\n- Designing the validation rules themselves, such as which postcode formats are valid. That belongs to the product owner or the relevant data standard.\n- Errors announced while typing, or success messages after submission. Those raise WCAG 4.1.3 Status Messages and need a screen-reader test.\n- Preventing mistakes on legal, financial or data-changing forms, which is WCAG 3.3.4 Error Prevention (reversible, checked or confirmed submissions).\n\n## What you need\n\n- The submitted values, field labels and validation rules used on a test form.\n- The exact visible error text and how each message is linked visually or programmatically to its field.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Which values were submitted, and which validation rule did each rejected field fail? Without the detected error, a message cannot be judged accurate.\n- What exact text appears, where, and how is it connected to its field: beside it, linked from a summary, or referenced with aria-describedby? A screenshot and the markup both help.\n- Is there anything a message must not reveal, such as whether an account exists? WCAG 3.3.3 allows a suggestion to be withheld when giving it would put security at risk.\n\n## Method\n\n1. List every field the application rejected and the condition it detected: blank, wrong format, out of range or a failed rule. Keep a business rule you cannot see separate from a message that fails to explain it.\n2. For each rejected field, look for an error description in text: beside the field, in a summary, an alert or a dialog. Colour, a red border or an icon alone is not a text description (WCAG 3.3.1, and 1.4.1 Use of Color). With no text, the result is no-text.\n3. Check that the person can tell which field the text is about: it names the field by its visible label, sits unambiguously beside it, or links from a summary to it. If more than one field could match, such as two date fields, the result is unidentified-field.\n4. Check that the words describe the detected problem. Mark vague where the text would not tell the person what to change, such as 'Invalid entry' for a date outside the booking window. Be careful about calling this a 3.3.1 failure: W3C's own example accepts 'Email is not valid' for 3.3.1, and the correction is covered by 3.3.3.\n5. Where the fix is known, such as a format, a range or a required value, check that the message suggests it, as WCAG 3.3.3 Error Suggestion (Level AA) expects, unless that would compromise security.\n6. Check the connection for assistive technology: the field is marked invalid (for example aria-invalid) and its message is programmatically associated with it, and a summary links to each field. W3C places these under 1.3.1 and 4.1.2 rather than 3.3.1.\n7. Submit again with several errors at once and confirm that each message still belongs to exactly one field.\n\n## Checks before you deliver\n\n- A generic banner can indicate that submission failed while leaving every rejected field unidentified.\n- An inline message can identify its field through a clear association without repeating the full label inside every message.\n- A field-level error that the server returned but the page never displayed is not a message. Check what the person actually sees and hears, not the API response.\n- Native browser validation messages meet 3.3.1 in most browser and screen-reader pairings, but W3C notes they may disappear, are not enlarged with page zoom and are generic. Check them in the browsers in scope and against 3.3.3.\n\n## How to present the result\n\nStart with how many rejected fields have a clear, identifiable message. Then give a table with each field, the error detected, the text shown and where, the result (clear, vague, unidentified-field or no-text) and a replacement message. Write replacements ready to paste, naming the field and the fix, such as 'Enter a start date between 1 June and 30 September'.\n\n## Worked example\n\n**Request:** Review the recorded error state.\n\n**Supplied material:**\n\n```text\nPostcode: mandatory but blank. Only a red border, no text.\nEmail: contains no @. Message attached to Email: Enter an address with an @ sign.\n```\n\n**Answer:** Add a visible message such as \u201cEnter your postcode\u201d and associate it with Postcode. Retest a blank submission to confirm the field and error are identifiable. The Email message already explains the missing @ sign.\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 errors in field order as {field,result}. Use no-text if no error text is presented to the user, unidentified-field if text is present but the affected field cannot be identified, vague if the field is clear but the text does not describe its error, and clear when both are identifiable. When a generic banner identifies neither the field nor the cause, use unidentified-field in the JSON. In an ordinary review, also describe both omissions and suggest where to render the field-level error.\n\n## Sources\n\n- [W3C Understanding Error Identification](https:\/\/www.w3.org\/WAI\/WCAG22\/Understanding\/error-identification.html): Explains WCAG 2.2 success criterion 3.3.1 (Level A): when an input error is detected, the item in error is identified and the error is described in text. It allows colour or icons only in addition to text, does not mandate inline or summary placement, and discusses native browser validation and its drawbacks.\n- [W3C Understanding Error Suggestion](https:\/\/www.w3.org\/WAI\/WCAG22\/Understanding\/error-suggestion.html): Explains WCAG 2.2 success criterion 3.3.3 (Level AA): when an error is detected and a correction is known, the suggestion is given unless it would put the security or purpose of the content at risk. The skill uses it for messages that identify an error but not how to fix it.\n- [W3C WAI forms tutorial: user notifications](https:\/\/www.w3.org\/WAI\/tutorials\/forms\/notifications\/): Says each listed error should reference the field's label, describe the problem concisely, say how to correct it including any format, and link to the field. The skill's replacement messages follow this pattern.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/review-form-error-messages\n","scope":"contextual","trigger_keywords":["Review form error messages","review-form-error-messages","review form error messages","Are the error messages on our sign-up form accessible?","Are the error messages on our sign-up form accessible","form validation messages","form errors accessible","review these form errors"],"is_private":true,"is_active":true,"scripts":[{"name":"review-form-error-messages-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":"review-form-error-messages-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: review-form-error-messages\ndescription: \"Check each form error after submission: is there a text message, can the person tell which field it belongs to, and does it say what is wrong? Use when reviewing validation messages, error summaries or red-outline errors against WCAG 3.3.1 Error Identification and 3.3.3 Error Suggestion.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/review-form-error-messages\n---\n\n# Review form error messages\n\nCheck whether a person can identify which input failed and what was wrong after the form detects an error.\n\n## When to use this skill\n\n- Someone has screenshots or notes of a form's error state and wants to know whether the errors are accessible.\n- A form marks errors only with red borders or icons and the team wants to know what to add.\n- An error summary at the top of a page lists problems and the team wants to check that each one leads to the right field.\n\n## When not to use it\n\n- Designing the validation rules themselves, such as which postcode formats are valid. That belongs to the product owner or the relevant data standard.\n- Errors announced while typing, or success messages after submission. Those raise WCAG 4.1.3 Status Messages and need a screen-reader test.\n- Preventing mistakes on legal, financial or data-changing forms, which is WCAG 3.3.4 Error Prevention (reversible, checked or confirmed submissions).\n\n## What you need\n\n- The submitted values, field labels and validation rules used on a test form.\n- The exact visible error text and how each message is linked visually or programmatically to its field.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Which values were submitted, and which validation rule did each rejected field fail? Without the detected error, a message cannot be judged accurate.\n- What exact text appears, where, and how is it connected to its field: beside it, linked from a summary, or referenced with aria-describedby? A screenshot and the markup both help.\n- Is there anything a message must not reveal, such as whether an account exists? WCAG 3.3.3 allows a suggestion to be withheld when giving it would put security at risk.\n\n## Method\n\n1. List every field the application rejected and the condition it detected: blank, wrong format, out of range or a failed rule. Keep a business rule you cannot see separate from a message that fails to explain it.\n2. For each rejected field, look for an error description in text: beside the field, in a summary, an alert or a dialog. Colour, a red border or an icon alone is not a text description (WCAG 3.3.1, and 1.4.1 Use of Color). With no text, the result is no-text.\n3. Check that the person can tell which field the text is about: it names the field by its visible label, sits unambiguously beside it, or links from a summary to it. If more than one field could match, such as two date fields, the result is unidentified-field.\n4. Check that the words describe the detected problem. Mark vague where the text would not tell the person what to change, such as 'Invalid entry' for a date outside the booking window. Be careful about calling this a 3.3.1 failure: W3C's own example accepts 'Email is not valid' for 3.3.1, and the correction is covered by 3.3.3.\n5. Where the fix is known, such as a format, a range or a required value, check that the message suggests it, as WCAG 3.3.3 Error Suggestion (Level AA) expects, unless that would compromise security.\n6. Check the connection for assistive technology: the field is marked invalid (for example aria-invalid) and its message is programmatically associated with it, and a summary links to each field. W3C places these under 1.3.1 and 4.1.2 rather than 3.3.1.\n7. Submit again with several errors at once and confirm that each message still belongs to exactly one field.\n\n## Checks before you deliver\n\n- A generic banner can indicate that submission failed while leaving every rejected field unidentified.\n- An inline message can identify its field through a clear association without repeating the full label inside every message.\n- A field-level error that the server returned but the page never displayed is not a message. Check what the person actually sees and hears, not the API response.\n- Native browser validation messages meet 3.3.1 in most browser and screen-reader pairings, but W3C notes they may disappear, are not enlarged with page zoom and are generic. Check them in the browsers in scope and against 3.3.3.\n\n## How to present the result\n\nStart with how many rejected fields have a clear, identifiable message. Then give a table with each field, the error detected, the text shown and where, the result (clear, vague, unidentified-field or no-text) and a replacement message. Write replacements ready to paste, naming the field and the fix, such as 'Enter a start date between 1 June and 30 September'.\n\n## Worked example\n\n**Request:** Review the recorded error state.\n\n**Supplied material:**\n\n```text\nPostcode: mandatory but blank. Only a red border, no text.\nEmail: contains no @. Message attached to Email: Enter an address with an @ sign.\n```\n\n**Answer:** Add a visible message such as \u201cEnter your postcode\u201d and associate it with Postcode. Retest a blank submission to confirm the field and error are identifiable. The Email message already explains the missing @ sign.\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 errors in field order as {field,result}. Use no-text if no error text is presented to the user, unidentified-field if text is present but the affected field cannot be identified, vague if the field is clear but the text does not describe its error, and clear when both are identifiable. When a generic banner identifies neither the field nor the cause, use unidentified-field in the JSON. In an ordinary review, also describe both omissions and suggest where to render the field-level error.\n\n## Sources\n\n- [W3C Understanding Error Identification](https:\/\/www.w3.org\/WAI\/WCAG22\/Understanding\/error-identification.html): Explains WCAG 2.2 success criterion 3.3.1 (Level A): when an input error is detected, the item in error is identified and the error is described in text. It allows colour or icons only in addition to text, does not mandate inline or summary placement, and discusses native browser validation and its drawbacks.\n- [W3C Understanding Error Suggestion](https:\/\/www.w3.org\/WAI\/WCAG22\/Understanding\/error-suggestion.html): Explains WCAG 2.2 success criterion 3.3.3 (Level AA): when an error is detected and a correction is known, the suggestion is given unless it would put the security or purpose of the content at risk. The skill uses it for messages that identify an error but not how to fix it.\n- [W3C WAI forms tutorial: user notifications](https:\/\/www.w3.org\/WAI\/tutorials\/forms\/notifications\/): Says each listed error should reference the field's label, describe the problem concisely, say how to correct it including any format, and link to the field. The skill's replacement messages follow this pattern.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/review-form-error-messages\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\/review-form-error-messages\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# A form rejected two fields\n\nReview the recorded error state.\n\n## Supplied material\n\nPostcode: mandatory but blank. Only a red border, no text.\nEmail: contains no @. Message attached to Email: Enter an address with an @ sign.\n\n## Worked answer\n\nAdd a visible message such as \u201cEnter your postcode\u201d and associate it with Postcode. Retest a blank submission to confirm the field and error are identifiable. The Email message already explains the missing @ sign.\n\n## Reasoning\n\nThe email format issue is explained. A coloured outline cannot tell the customer what happened to the postcode.\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":"Review the recorded error state.\nReturn only the JSON specified in SKILL.md for this test.\n\nPostcode: mandatory but blank. Only a red border, no text.\nEmail: contains no @. Message attached to Email: Enter an address with an @ sign.\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"errors\": [\n        {\n            \"field\": \"Postcode\",\n            \"result\": \"no-text\"\n        },\n        {\n            \"field\": \"Email\",\n            \"result\": \"clear\"\n        }\n    ]\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The email format issue is explained. A coloured outline cannot tell the customer what happened to the postcode.\n"},{"path":"tests\/case-2\/request.txt","content":"Review the three error records.\nReturn only the JSON specified in SKILL.md for this test.\n\nStart date: outside booking window. Attached message: Invalid entry.\nEnd date: wrong format. Unattached summary: Use DD\/MM\/YYYY, shown on a page with two date fields; no link or label identifies which field.\nGuests: blank. Summary link to Guests says Guests is required.\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"errors\": [\n        {\n            \"field\": \"Start date\",\n            \"result\": \"vague\"\n        },\n        {\n            \"field\": \"End date\",\n            \"result\": \"unidentified-field\"\n        },\n        {\n            \"field\": \"Guests\",\n            \"result\": \"clear\"\n        }\n    ]\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"A message can specify a date format but still fail to identify which date needs correcting.\n"},{"path":"tests\/case-3\/request.txt","content":"Review the passphrase field after a short entry. Several fields are shown.\nReturn only the JSON specified in SKILL.md for this test.\n\nThe server detected a 12-character minimum. Only \u201cPlease check\u201d appears at the top. No label or link in the banner names a field. A red border marks Passphrase. The field-specific server message is not rendered or exposed to assistive technology.\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"errors\": [\n        {\n            \"field\": \"Passphrase\",\n            \"result\": \"unidentified-field\"\n        }\n    ]\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"Generic text exists, but a person who cannot distinguish the red border cannot locate or understand the passphrase error. Present the detected length requirement with the field.\n"}],"is_active":true,"is_approved":false}]}]}