Skip to content

fix(text-field): reconcile documented contract - #88

Open
Banegasn wants to merge 2 commits into
mainfrom
codex/issue-23-text-field
Open

fix(text-field): reconcile documented contract#88
Banegasn wants to merge 2 commits into
mainfrom
codex/issue-23-text-field

Conversation

@Banegasn

Copy link
Copy Markdown
Owner

Fixes #23

Summary

  • establish one typed text-field API for filled/outlined variants, labels, helper/error text, counters, slots, validation, and host methods
  • connect generated label, helper, and error IDs to the native input; make required, min/max length, pattern, and custom errors participate in form validation
  • standardize on exactly-once native host input/change events, update the Angular demo, and document the clean-break migration from undocumented aliases
  • add browser tests and package test/typecheck wiring

Acceptance mapping

  • Every documented property, attribute, slot, event, method, and variant is implemented and typed, with public removals documented.
  • Label activation focuses the input; label/help/error relationships use generated IDs and ARIA IDREFs.
  • Required, minlength, maxlength, pattern, and custom-error validity participate through ElementInternals.
  • Native-like host input and change events fire once; removed custom aliases do not fire.
  • README and Angular demo use the canonical contract; browser tests cover Chromium, Firefox, and WebKit.

Validation

  • pnpm build (passes; existing Angular bundle/style budget warnings)
  • pnpm typecheck
  • pnpm lint
  • pnpm test
  • pnpm --filter @banegasn/m3-text-field test (12 tests across Chromium, Firefox, and WebKit)

@Banegasn

Copy link
Copy Markdown
Owner Author

Acceptance review found a P1 blocker: rendered validity/ARIA can diverge from ElementInternals. Initial or dynamically added required/pattern constraints can make the form invalid after render without updating the error supporting row, aria-invalid, or aria-errormessage; disabled controls can retain an invalid visual/ARIA state after form validity clears. Synchronize a rendered validity state after input/constraint changes (respecting form-disabled state) and add browser regressions for initial required, dynamic constraints, and disabled clearing. Implementation has been returned for this focused fix.

@Banegasn
Banegasn force-pushed the codex/issue-23-text-field branch from 707f6a1 to ce2f8ec Compare July 30, 2026 06:51
@Banegasn
Banegasn force-pushed the codex/issue-23-text-field branch from ce2f8ec to bf1e7be Compare July 30, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P1] Reconcile m3-text-field implementation with its documented API

1 participant