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

Discussion on Fieldset User Validity #4317

Closed
mkhatib opened this issue Aug 2, 2016 · 2 comments
Closed

Discussion on Fieldset User Validity #4317

mkhatib opened this issue Aug 2, 2016 · 2 comments

Comments

@mkhatib
Copy link
Contributor

mkhatib commented Aug 2, 2016

The current PR to introduce .user-valid and .user-invalid to inputs, fieldsetand form make the following assumptions that we'd like to discuss and try to loop in people that know what's might be the future of the :user-invalid spec behavior.

Demo of current behavior can be found here.

<form>
  <fieldset>
    <input id=inputA required>
    <input id=inputB type=email required>
  </fieldset>
</form>

The current behavior is:

  • Everything starts with NO .user--mode
  • The user types a character in inputA it becomes .user-valid
  • The user removes the character from inputA it becomes .user-invalid - this is also propagated to the fieldset marking it also .user-invalid
  • The user types the character again inputA becomes .user-valid and fieldset is still user-invalid

This behavior seems a bit off (specially the last part), we'd like to understand a bit better what's the spec'd behavior would be for this part so we can match that. Some ideas for what might make a better behavior:

  • Only propagate .user--mode to fieldset if ALL its inputs are now in .user--mode.

One main issue also seems to be inconsistencies between Chrome and other browsers implementation of fieldset.checkValidity where Chrome seems to evaluate based on whether the fieldset has invalid/valid inputs and all other browsers always return true - This being tracked in #3898.

@rohitverma007
Copy link

rohitverma007 commented Sep 28, 2016

Would it make sense to skip the validation on fieldset and not add any .-user- fields to fieldset since all browsers besides chrome return true for the fieldsets validation anyways?

@adelinamart
Copy link
Contributor

Hey,

The AMP community has been working nonstop to make AMP better, but somehow we've still managed to grow an enormous backlog of open issues. This has made it difficult for the community to prioritize what we should work on next.

A new process is on the way and to give it a chance for success we will be closing issues that have not been updated in awhile.

If this issue still requires further attention, simply reopen it. Please verify first whether the feature proposal is still relevant.

We really appreciate the contribution! Thank you for bearing with us as we drag ourselves out of the issue abyss. :)

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

3 participants