<?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>14870</bug_id>
          
          <creation_ts>2011-11-18 01:20:40 +0000</creation_ts>
          <short_desc>autosubmit attribute for form elements</short_desc>
          <delta_ts>2013-05-08 13:51:48 +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>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NEEDSINFO</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>a11y</keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Stone">david</reporter>
          <assigned_to name="David Stone">david</assigned_to>
          <cc>cooper</cc>
    
    <cc>eoconnor</cc>
    
    <cc>everett</cc>
    
    <cc>ian</cc>
    
    <cc>jfoliot</cc>
    
    <cc>mark.sadecki+w3c</cc>
    
    <cc>mike</cc>
    
    <cc>plh</cc>
    
    <cc>public-html-a11y</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>therandshow</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>60129</commentid>
    <comment_count>0</comment_count>
    <who name="David Stone">david</who>
    <bug_when>2011-11-18 01:20:40 +0000</bug_when>
    <thetext>Currently javascript is frequently used to submit simple html forms with a small number of controls. Implementing an autosubmit boolean attribute for all form elements would eliminate the need to use javascrpt&apos;s onchange method to call a form&apos;s submit method and provide a better user experience especially on mobile devices. 

One use case would be a simple search form like so:
&lt;form&gt;
Search terms: &lt;input type=&quot;search&quot; name=&quot;search_terms&quot; autosubmit&gt;
&lt;input type=&quot;submit&quot;&gt;
&lt;/form&gt;
Once the user has enter their data using a touch keyboard on a mobile device and tapped &quot;done&quot; to close the keyboard the form would be automatically submitted with the user needing to tap the submit button. 

The above use case is most useful for mobile devices while placing an autosubmit attribute on a &lt;select&gt; element for paginating content would be useful for any device:
&lt;form action=&quot;content&quot;&gt;
Page: &lt;select name=&quot;page&quot; autosubmit&gt;
&lt;option&gt;1&lt;/option&gt;
&lt;option&gt;2&lt;/option&gt;
&lt;option&gt;3&lt;/option&gt;
&lt;option&gt;4&lt;/option&gt;
&lt;option&gt;5&lt;/option&gt;
...
&lt;/select&gt;
&lt;input type=&quot;submit&quot;&gt;
&lt;/form&gt;

Once the user selected a different option the form would auto-submit and the chosen page would be displayed. There are many sites that currently use javascript and onchange events to autosubmit such forms used for pagination.

Other possible use cases would be a survey asked one multiple choice question per page. Each question could be answered by simply selecting the appropriate radio button without needed to click submit. Like so:
&lt;form&gt;
What gender are you?
&lt;label&gt;&lt;input name=&quot;gender&quot; value=&quot;male&quot; type=&quot;radio&quot; autosubmit &gt;Male&lt;/label&gt;
&lt;label&gt;&lt;input name=&quot;gender&quot; value=&quot;female&quot; type=&quot;radio&quot; autosubmit &gt;Female&lt;/label&gt;
&lt;/form&gt;

In the above case it might be better also define an autosubmit attribute for the form element itself. This would make the form auto-submit if any of it&apos;s elements were changed and eliminate the need to specify autosubmit for each element in the form as above. 

Other use cases would be &lt;input type=&quot;file&quot; autosubmit&gt; which would submit the form once a file is selected by the browser. 

This attribute was previously proposed for menu elements:
http://www.w3.org/TR/2008/WD-html5-20080610/interactive-elements.html#menu
and there was a little discussion about it:
http://lists.w3.org/Archives/Public/public-html/2007Sep/0315.html

I&apos;m not entirely sure why it was removed from the spec, other than the fact that it was more appropriate for form elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60130</commentid>
    <comment_count>1</comment_count>
    <who name="Everett Zufelt">everett</who>
    <bug_when>2011-11-18 01:40:43 +0000</bug_when>
    <thetext>From what I can tell from the bug description, this is a request to add an @autosubmit boolean attribute to all form input elements. If @autosubmit is set on an input element then an action that would have the element fire an onchange event would automatically submit the form that owns the element.

WCAG 2.0 success criteria 3.2.2
&quot;On Input: Changing the setting of any user interface component does not automatically cause a change of context unless the user has been advised of the behavior before using the component. (Level A)&quot;

http://www.w3.org/TR/UNDERSTANDING-WCAG20/consistent-behavior-unpredictable-change.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60176</commentid>
    <comment_count>2</comment_count>
    <who name="David Stone">david</who>
    <bug_when>2011-11-20 05:19:58 +0000</bug_when>
    <thetext>Yes, that is exactly what I was attempting to describe.

I can understand the concern with causing an unpredictable context change. However, in the case of a form with only one element such a select list the submit button could be omitted in which case a context change wouldn&apos;t be unexpected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60349</commentid>
    <comment_count>3</comment_count>
    <who name="John Thomas">therandshow</who>
    <bug_when>2011-11-22 14:37:50 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; From what I can tell from the bug description, this is a request to add an
&gt; @autosubmit boolean attribute to all form input elements. If @autosubmit is set
&gt; on an input element then an action that would have the element fire an onchange
&gt; event would automatically submit the form that owns the element.
&gt; 
&gt; WCAG 2.0 success criteria 3.2.2
&gt; &quot;On Input: Changing the setting of any user interface component does not
&gt; automatically cause a change of context unless the user has been advised of the
&gt; behavior before using the component. (Level A)&quot;
&gt; 
&gt; http://www.w3.org/TR/UNDERSTANDING-WCAG20/consistent-behavior-unpredictable-change.html

The key element here should be unpredictable. For example, sometimes sorting controls (especially in js-free environments) are represented as form elements. I think most users would expect a simple sorter (such as an arrow button next to a table header) to autosubmit. Likewise with paging controls. 

In addition, consider a corporate environment where web pages may be modeled after certain desktop applications. If that application autosubmits, then the user will likely expect the web page to do likewise. 

If I may make a bad pun, sometimes what is unpredictable to the user is not always predictable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60354</commentid>
    <comment_count>4</comment_count>
    <who name="Everett Zufelt">everett</who>
    <bug_when>2011-11-22 16:10:26 +0000</bug_when>
    <thetext>The HTML Accessibility Task Force will track this bug to ensure that there are no negative implications for accessibility.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61132</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-12-07 21:13:09 +0000</bug_when>
    <thetext>We actually had an &quot;autosubmit&quot; feature in an earlier draft, but didn&apos;t keep it (I forget why).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81704</commentid>
    <comment_count>6</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-01-21 15:59:04 +0000</bug_when>
    <thetext>Mass move to &quot;HTML WG&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81822</commentid>
    <comment_count>7</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-01-21 16:01:49 +0000</bug_when>
    <thetext>Mass move to &quot;HTML WG&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83685</commentid>
    <comment_count>8</comment_count>
    <who name="Edward O&apos;Connor">eoconnor</who>
    <bug_when>2013-02-25 22:58:23 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are
satisfied with this response, 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

Status: Additional Information Needed
Change Description: No spec change.
Rationale: As Ian noted in comment 5, we used to have such a feature,
but dropped it. Would you be interested in pursuing such a feature in an
extension specification?

         http://www.w3.org/html/wg/wiki/ExtensionSpecifications

I note that there&apos;s already an extension spec which enhances &lt;form&gt;
features. Perhaps you could coordinate with its editor?

     http://cameronjones.github.com/form-http-extensions/index.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>