Skip to content
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

Merged
merged 10 commits into from
Oct 3, 2023

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Jul 13, 2022

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

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).
@scottaohara scottaohara changed the title First draft of text for required elements' state Addition: clarify when to expose a required element as invalid Jul 13, 2022
@JAWS-test
Copy link

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.

@scottaohara
Copy link
Member Author

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.

index.html Outdated Show resolved Hide resolved
@scottaohara
Copy link
Member Author

thanks @cookiecrook. i pulled in your suggestion and also broke the paragraph into two parts.

@scottaohara
Copy link
Member Author

scottaohara commented Mar 8, 2023

this pr should pull in the work steve started in #395

edit: no, that should be its own PR still.

index.html Outdated Show resolved Hide resolved
@scottaohara
Copy link
Member Author

per the approving review and the fact the chrome bug has been marked as fixed, i'm merging this PR.

@scottaohara scottaohara merged commit 06c41c2 into gh-pages Oct 3, 2023
2 checks passed
@scottaohara scottaohara deleted the initial-validity-state-required-elements branch October 3, 2023 14:11
@pkra pkra mentioned this pull request Feb 6, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants