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

Test :user-invalid after input and focus change #9346

Open
foolip opened this issue Feb 1, 2018 · 9 comments
Open

Test :user-invalid after input and focus change #9346

foolip opened this issue Feb 1, 2018 · 9 comments

Comments

@foolip
Copy link
Member

foolip commented Feb 1, 2018

#8899 introduced a basic test for :user-error, but in w3c/csswg-drafts#1329 (comment) @fantasai also agreed that testing against this condition would be in line with the spec:

typing at least one character and then moving the focus to another input element

This is blocked on #7434. @kereliuk, could you poke me when it's possible to write such a test, so that I can give it a try?

@fantasai
Copy link
Contributor

fantasai commented Feb 3, 2018

Would it be possible to try writing a test with regular keypress events (and maybe .focus() to shift the focus)? I'd expect that will pass: although an UA could in theory decide not to allow scripts to trigger :user-invalid, it seems easier from an implementation perspective (and not really harmful in a practical sense) to not screen them out.

If you make it a self-describing reftest, then the description can detail the requisite manual steps and note that a UA is still considered passing if it fails as scripted reftest but passes the manual-interactive version--that way anyone investigating a fail condition will be alerted to that point, and we have a test without being blocked on #7434.

@kereliuk
Copy link
Contributor

kereliuk commented Feb 5, 2018

@foolip Sounds good!

@foolip
Copy link
Member Author

foolip commented May 4, 2018

@kereliuk, do you think that test_driver.send_keys is now enough to support writing tests for this? Are there any other tests yet that send tab keys to move focus around?

@kereliuk
Copy link
Contributor

kereliuk commented May 9, 2018

@foolip foolip self-assigned this May 9, 2018
@foolip
Copy link
Member Author

foolip commented May 9, 2018

@kereliuk, cool, I've assigned this to myself to give it a try!

@foolip
Copy link
Member Author

foolip commented Sep 17, 2018

@gsnedders, before I try this, does testdriver.js work with reftests?

@gsnedders
Copy link
Member

@foolip I think we decided to punt on that until we actually had a need for it?

@foolip
Copy link
Member Author

foolip commented Sep 19, 2018

@gsnedders oh, so deliberately punted, I didn't remember that. Well, here I do need it :)

webcompat/web-bugs#17453 (comment) is going to be another case requiring it.

Can you file an issue detailing what would need to change?

@gsnedders
Copy link
Member

#13183 filed for that.

@foolip foolip removed their assignment Oct 25, 2019
@emilio emilio changed the title Test :user-error after input and focus change Test :user-invalid after input and focus change Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants