Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub

Form Participation & Accessibility

Same-Root Accessibility & Labels

  • Every aria-* ID reference (aria-labelledby,aria-describedby, aria-errormessage,aria-controls, aria-activedescendant) resolves within the exact same DOM root.
  • Controls render their own internal <label>, hint, and error containers inside Shadow DOM, populated via props/attributes plus mirrored slot="label",slot="hint", and slot="error".
  • External <label for="id"> works natively viaElementInternals.labels.
  • <mth-field> is strictly a layout wrapper and Community Context Protocol provider — never a cross-root ARIA bridge.

Form-Associated Custom Elements (FACE)

  • FormControlController wires static formAssociated = true,setFormValue(), setValidity(), formResetCallback(),formStateRestoreCallback(), and :state(dirty | touched | user-invalid).
  • fieldset[disabled] rule:formDisabledCallback(disabled) disables internal shadow controls without ever mutating the host's disabled attribute.
  • Autofill Bridge: Autofill-targeted inputs (mth-input,mth-password-input, mth-phone-input,mth-credit-card-input) support a Light-DOM <input> slot mode alongside shadow forwarding.