-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addition: clarify when to expose a required element as invalid #429
Addition: clarify when to expose a required element as invalid #429
Conversation
Not the happiest with my initial wording here, but figure maybe others can review and help provide some better text. The intent here is to tell browsers to NOT expose a required field as invalid until after a user has interacted with it in some way (blur and left empty or entered an invalid value, or attempted to submit a form of required elements without filling them in).
I think it's very good because it would finally solve this old problem. I only wonder if it is technically possible, because the HTML specification specifies something else and in my opinion the HTML specification and this specification would contradict each other. |
Update: Chromium browsers have implemented this change and now the invalid state is not announced until a user has entered an invalid value to a field. Safari on macOS also does not announce the invalid state with an untouched field. Safari doesn't announce a field as invalid when it has an incorrect entry - there is a browser form message that appears that indicates the incorrect entry, but the field itself does not expose an aria-invalid=true. Firefox announces an untouched required field as invalid. |
thanks @cookiecrook. i pulled in your suggestion and also broke the paragraph into two parts. |
edit: no, that should be its own PR still. |
per the approving review and the fact the chrome bug has been marked as fixed, i'm merging this PR. |
Not the happiest with my initial wording here, but figure maybe others can review and help provide some better text.
The intent here is to tell browsers to NOT expose a required field as invalid until after a user has interacted with it in some way (blur and left empty or entered an invalid value, or attempted to submit a form of required elements without filling them in).
Closes #394
related to w3c/aria#1488
and Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1318969#c17
Preview | Diff