<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>7411</bug_id>
          
          <creation_ts>2009-08-24 21:57:07 +0000</creation_ts>
          <short_desc>:invalid and :out-of-range shouldn&apos;t match until the user has consciously interacted with the form.  Roughly, after the input fires a change event.  If, say, &lt;input required&gt; matches :invalid immediately on pageload, it becomes basically useless.</short_desc>
          <delta_ts>2010-10-04 14:48:31 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://whatwg.org/specs/web-apps/current-work/#matching-html-elements-using-selectors</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>NE</keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>LC</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>26620</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2009-08-24 21:57:07 +0000</bug_when>
    <thetext>Section: http://whatwg.org/specs/web-apps/current-work/#matching-html-elements-using-selectors

Comment:
:invalid and :out-of-range shouldn&apos;t match until the user has consciously interacted with the form.  Roughly, after the input fires a change event.  If, say, &lt;input required&gt; matches :invalid immediately on pageload, it becomes basically useless.

Posted from: 99.35.179.251</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26628</commentid>
    <comment_count>1</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2009-08-25 00:58:01 +0000</bug_when>
    <thetext>To be specific, if &lt;input required&gt; matches :invalid immediately on pageload, then all the warnings an author can specify for invalid inputs (red border, special background, etc) pop up immediately.  This is generally unacceptable from a design standpoint - we only want to tell a user they&apos;ve made a mistake *after they&apos;ve actually made a mistake*.

This argument applies generally for anything that can cause an input to match :invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27387</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2009-09-21 10:40:55 +0000</bug_when>
    <thetext>Surely if the user loads a form, sees there&apos;s nothing wrong, and hits submit, that&apos;s worse than if the user loads a form and sees a lot of red before typing anything?

Also, what about forms that did round-trips through the server? Surely those will want to be red straight away, regardless?

It seems like if you want what you describe, you should just do this:

   &lt;form onchange=&quot;event.target.classList.add(&apos;dirty&apos;)&quot;&gt;

...and then in the CSS use &quot;:invalid.dirty&quot; instead of &quot;:invalid&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33320</commentid>
    <comment_count>3</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2010-03-14 14:50:00 +0000</bug_when>
    <thetext>This bug predates the HTML Working Group Decision Policy.

If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
  http://dev.w3.org/html5/decision-policy/decision-policy.html

This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>