{
  "id": "F20",
  "rulePrefix": "F20",
  "variant": null,
  "ruleType": "w3c-failure",
  "scanScope": "specimen",
  "synthetic": false,
  "status": "current",
  "title": "Failure of Success Criterion 1.1.1 and 4.1.2 due to not updating text alternatives when\n                    changes to non-text content occur",
  "summary": "not updating text alternatives when\n                    changes to non-text content occur",
  "whyItFails": "This page reproduces the F20 failure pattern so auditors can verify detection against 1.1.1, 4.1.2.",
  "principles": [
    "perceivable",
    "robust"
  ],
  "guidelines": [
    "1.1",
    "4.1"
  ],
  "successCriteria": [
    {
      "id": "1.1.1",
      "name": "Non-text Content",
      "level": "A",
      "slug": "non-text-content"
    },
    {
      "id": "4.1.2",
      "name": "Name, Role, Value",
      "level": "A",
      "slug": "name-role-value"
    }
  ],
  "versions": [
    "2.0",
    "2.1",
    "2.2"
  ],
  "automatable": "partial",
  "requires": [
    "html",
    "js",
    "media",
    "input"
  ],
  "isolated": true,
  "pairWith": [],
  "w3c": {
    "understanding": [
      "https://www.w3.org/WAI/WCAG22/Understanding/non-text-content",
      "https://www.w3.org/WAI/WCAG22/Understanding/name-role-value"
    ],
    "quickref": [
      "https://www.w3.org/WAI/WCAG22/quickref/#non-text-content",
      "https://www.w3.org/WAI/WCAG22/quickref/#name-role-value"
    ],
    "technique": "https://www.w3.org/WAI/WCAG22/Techniques/failures/F20"
  },
  "specimen": {
    "html": "<img id=\"f20-img\" src=\"/assets/icon-ok.png\" alt=\"All clear\" width=\"32\" height=\"32\">\n<button type=\"button\" id=\"f20-toggle\">Toggle status</button>",
    "css": "",
    "js": "document.getElementById('f20-toggle')?.addEventListener('click', () => {\n  const img = document.getElementById('f20-img');\n  const warn = img.src.includes('icon-warn');\n  img.src = warn ? '/assets/icon-ok.png' : '/assets/icon-warn.png';\n});",
    "assets": [
      "assets/icon-ok.png",
      "assets/icon-warn.png"
    ]
  },
  "expectedFindings": [
    {
      "sc": "1.1.1",
      "outcome": "fail",
      "note": "Specimen demonstrates failure of 1.1.1."
    },
    {
      "sc": "4.1.2",
      "outcome": "fail",
      "note": "Specimen demonstrates failure of 4.1.2."
    }
  ],
  "mustNotFlag": [],
  "manualCheck": "Confirm the specimen demonstrates the documented F20 failure in isolation.",
  "generated": {
    "url": "https://wcagfail.patternd.io/specimens/F20/",
    "lastmod": "2026-10-08"
  }
}
