{
  "schemaVersion": 1,
  "theme": "j3w1-theme",
  "version": "1.1.0",
  "profile": "default",
  "profileStatus": "approved",
  "release": {
    "version": "1.1.0",
    "stability": "release",
    "policy": "Use the pinned approved default profile. Pending roles in that profile use-and-report their decision IDs; this does not approve them. Proposed profiles are preview-only and blocked for delivery. Heritage profiles are historical-only. Deprecated or heritage roles are blocked for new approved-profile mappings. Consume roles within their documented scope, never primitives. Release numbering does not approve profiles or tokens."
  },
  "sourceDigest": "sha256-C+iD5Q7l0XPU/boMj003wPbPLBOq3C3ZM7s4OfzJ6mc=",
  "id": "fieldset",
  "family": "forms-basic",
  "maturity": "stable",
  "priority": "R1",
  "coverage": {
    "family": "forms-basic",
    "priority": "R1",
    "maturity": "stable",
    "specified": true,
    "demonstrated": true,
    "tested": false,
    "testImplemented": false,
    "states": 2
  },
  "title": "Fieldset",
  "summary": "The native fieldset that groups related fields under a legend inside a 1px divider border; disabling it disables everything inside.",
  "anchors": {
    "site": "https://j3w1.github.io/theme/reference/#c-fieldset",
    "spec": "spec/components/fieldset.md",
    "brief": "exports/components/fieldset.brief.txt"
  },
  "native": true,
  "aria": {
    "pattern": "native <fieldset> with <legend>",
    "apg": "https://www.w3.org/WAI/ARIA/apg/practices/forms/"
  },
  "variants": [
    {
      "id": "default",
      "name": "Default"
    }
  ],
  "sizes": [
    "compact",
    "comfortable"
  ],
  "states": [
    "default",
    "disabled"
  ],
  "tokens": {
    "root.border": {
      "alias": "color.border.divider",
      "value": "#2b0e0d",
      "status": "proposed",
      "deprecated": false,
      "decisionId": "D-008",
      "eligibility": {
        "action": "use-and-report",
        "reason": "Use the pinned value and disclose every pending decision ID; approval statuses are unchanged.",
        "decisionIds": [
          "D-008"
        ]
      }
    },
    "root.bg": {
      "alias": "color.surface.default",
      "value": "#100c0c",
      "status": "approved",
      "deprecated": false,
      "decisionId": "D-023",
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "legend.text": {
      "alias": "color.text.bright",
      "value": "#ffa2a7",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "body.text": {
      "alias": "color.text.default",
      "value": "#e99499",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "legend.text-disabled": {
      "alias": "color.text.disabled",
      "value": "#8a5559",
      "status": "approved",
      "deprecated": false,
      "decisionId": "D-003",
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "field.bg": {
      "alias": "color.surface.input",
      "value": "#000000",
      "status": "approved",
      "deprecated": false,
      "decisionId": "D-023",
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "field.border": {
      "alias": "color.border.control",
      "value": "#a3676b",
      "status": "proposed",
      "deprecated": false,
      "decisionId": "D-007",
      "eligibility": {
        "action": "use-and-report",
        "reason": "Use the pinned value and disclose every pending decision ID; approval statuses are unchanged.",
        "decisionIds": [
          "D-007"
        ]
      }
    },
    "field.bg-disabled": {
      "alias": "color.interaction.disabled.bg",
      "value": "#160b0b",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "field.border-disabled": {
      "alias": "color.border.disabled",
      "value": "#7d1310",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "field.text-disabled": {
      "alias": "color.text.disabled",
      "value": "#8a5559",
      "status": "approved",
      "deprecated": false,
      "decisionId": "D-003",
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    },
    "help.text": {
      "alias": "color.text.muted",
      "value": "#bd787d",
      "status": "observed",
      "deprecated": false,
      "decisionId": null,
      "eligibility": {
        "action": "use",
        "reason": "Use within the role's documented scope and restrictions.",
        "decisionIds": []
      }
    }
  },
  "stateRules": [
    {
      "state": "default",
      "visual": "1px {color.border.divider} border; legend {color.text.bright}; fields as their own components",
      "channel": "the border and the legend",
      "tokens": {
        "fg": {
          "alias": "color.text.bright",
          "value": "#ffa2a7",
          "status": "observed",
          "deprecated": false,
          "decisionId": null,
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        },
        "bg": {
          "alias": "color.surface.default",
          "value": "#100c0c",
          "status": "approved",
          "deprecated": false,
          "decisionId": "D-023",
          "eligibility": {
            "action": "use",
            "reason": "Use within the role's documented scope and restrictions.",
            "decisionIds": []
          }
        }
      }
    },
    {
      "state": "disabled",
      "visual": "legend and labels {color.text.disabled}; every control inside takes its own disabled treatment ({color.interaction.disabled.bg}, {color.border.disabled}); the border unchanged",
      "channel": "`disabled` on the fieldset; cursor: not-allowed on the controls",
      "tokens": {}
    }
  ],
  "keyboard": [
    {
      "key": "Tab / Shift+Tab",
      "action": "Moves through the fields inside in document order; the legend is not a tab stop."
    }
  ],
  "responsive": "Fills its container; fields inside stack at every width; the legend wraps rather than truncating at 320px. RTL keeps the legend at the inline start of the top border.",
  "portability": {
    "web": "native <fieldset> and <legend>; disabled on the fieldset disables every descendant control and is the only way a group is disabled; never a div with role=\"group\" when the group holds form controls.",
    "nativeFallbacks": [
      "GTK4 Frame with a label child; sensitivity propagates.",
      "Qt QGroupBox; the title styled as the legend, checkable off.",
      "Terminal UI: a box-drawing border with the legend in the top edge."
    ]
  },
  "fixtures": [
    "FX-LONG",
    "FX-320",
    "FX-ZOOM-200",
    "FX-I18N",
    "FX-RTL",
    "FX-RM",
    "FX-HC",
    "FX-DENSITY",
    "FX-STATE-MATRIX"
  ],
  "related": [
    "field",
    "checkbox",
    "radio-group",
    "text-field",
    "card"
  ],
  "specimens": [
    "admin-form",
    "settings-panel"
  ],
  "nonExamples": "A fieldset with no legend or with a legend hidden visually. A card used\ninstead of a fieldset for form controls. Rounded corners. A 2px or\n`border.control` border on the group, which would read as a control. A\nlegend in accent red. Disabling only the legend. Nesting three levels deep.",
  "contrast": [
    {
      "label": "fieldset default text",
      "state": "default",
      "kind": "text",
      "min": 4.5,
      "fg": "color.text.bright",
      "bg": "color.surface.default",
      "fgHex": "#ffa2a7",
      "bgHex": "#100c0c",
      "ratio": 10.17,
      "pass": true,
      "waiver": null
    },
    {
      "label": "group border (decorative; the legend and spacing carry the grouping)",
      "state": null,
      "kind": "ui",
      "min": 1,
      "fg": "color.border.divider",
      "bg": "color.surface.default",
      "fgHex": "#2b0e0d",
      "bgHex": "#100c0c",
      "ratio": 1.08,
      "pass": true,
      "waiver": "the divider border is a decorative section rule, never the boundary of a control"
    },
    {
      "label": "field labels inside the group",
      "state": null,
      "kind": "text",
      "min": 4.5,
      "fg": "color.text.default",
      "bg": "color.surface.default",
      "fgHex": "#e99499",
      "bgHex": "#100c0c",
      "ratio": 8.48,
      "pass": true,
      "waiver": null
    },
    {
      "label": "help text inside the group",
      "state": null,
      "kind": "text",
      "min": 4.5,
      "fg": "color.text.muted",
      "bg": "color.surface.default",
      "fgHex": "#bd787d",
      "bgHex": "#100c0c",
      "ratio": 5.69,
      "pass": true,
      "waiver": null
    },
    {
      "label": "disabled legend and labels (exempt; house floor 3:1)",
      "state": "disabled",
      "kind": "ui",
      "min": 3,
      "fg": "color.text.disabled",
      "bg": "color.surface.default",
      "fgHex": "#8a5559",
      "bgHex": "#100c0c",
      "ratio": 3.26,
      "pass": true,
      "waiver": null
    },
    {
      "label": "disabled field text (exempt; house floor 3:1)",
      "state": "disabled",
      "kind": "ui",
      "min": 3,
      "fg": "color.text.disabled",
      "bg": "color.interaction.disabled.bg",
      "fgHex": "#8a5559",
      "bgHex": "#160b0b",
      "ratio": 3.24,
      "pass": true,
      "waiver": null
    },
    {
      "label": "disabled field border (exempt)",
      "state": "disabled",
      "kind": "ui",
      "min": 1,
      "fg": "color.border.disabled",
      "bg": "color.interaction.disabled.bg",
      "fgHex": "#7d1310",
      "bgHex": "#160b0b",
      "ratio": 1.82,
      "pass": true,
      "waiver": "disabled controls are exempt from 1.4.11"
    }
  ]
}
