Error display for Select, DatePicker, Checkbox, RadioGroup - #43
Open
shanerbaner82 wants to merge 2 commits into
Open
Error display for Select, DatePicker, Checkbox, RadioGroup#43shanerbaner82 wants to merge 2 commits into
shanerbaner82 wants to merge 2 commits into
Conversation
The validation audit found is_error/supporting rendered ONLY on text inputs — every other form element silently swallowed injected (or author-set) validation errors on all targets. This adds the display to the four commonly-validated elements, on every layer: - iOS (SwiftUI): destructive border/tint on error, supporting Text below the control, error message announced via the a11y hint channel unless an explicit hint is set — same conventions as the text inputs. - Android (Compose): first-class isError/supportingText on the OutlinedTextField-based controls (Select, DatePicker trigger), destructive checkbox tint + supporting Text, RadioGroup label tint + supporting Text; error message on the hint channel likewise. - PHP elements: `supporting` and `error`/`isError`/`is-error` attributes + supporting()/error() builder methods, mirroring BaseTextInput's vocabulary. Deliberately NOT added: Slider, Toggle, Chip, ButtonGroup — rarely validated; can follow the same pattern when needed. Native renderer changes are pattern-copies of the shipping text-input code but are NOT yet device-built — verify on a real build before merging. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The validation audit (core mobile-air#301 context) found
is_error/supportingrendered ONLY on text inputs — every other form element silently swallowed validation errors on all targets. This adds the display to the four commonly-validated elements on every layer:Textbelow the control, error message announced via the a11y hint channel unless an explicit hint is set — same conventions as the shipping text inputs.isError/supportingTexton theOutlinedTextField-based controls (Select, DatePicker trigger), destructive checkbox tint + supportingText, RadioGroup label tint + supportingText; hint-channel announcement likewise.supportinganderror/isError/is-errorattributes +supporting()/error()builder methods mirroringBaseTextInput.Deliberately NOT added: Slider, Toggle, Chip, ButtonGroup — rarely validated; the same pattern applies when needed.
Blessed usage (explicit-only display, per the core validation semantics):
Verification
:app:compileDebugKotlinclean with these renderers compiled in) and exercised on-device via xclone's/settingsdemo screen.🤖 Generated with Claude Code