<?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>13942</bug_id>
          
          <creation_ts>2011-08-29 04:41:37 +0000</creation_ts>
          <short_desc>Allow @autofocus on any element with @tabindex</short_desc>
          <delta_ts>2013-12-17 11:21:20 +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>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc>http://dev.w3.org/html5/spec/association-of-controls-and-forms#attr-fe-autofocus</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>a11y</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leif Halvard Silli">xn--mlform-iua</reporter>
          <assigned_to>contributor</assigned_to>
          <cc>ayg</cc>
    
    <cc>giorgio.liscio</cc>
    
    <cc>ian</cc>
    
    <cc>jfoliot</cc>
    
    <cc>jonas</cc>
    
    <cc>laura.lee.carlson</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-a11y</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>xn--mlform-iua</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>55962</commentid>
    <comment_count>0</comment_count>
      <attachid>1026</attachid>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2011-08-29 04:41:37 +0000</bug_when>
    <thetext>Created attachment 1026
Demo page (the demo immitates a frameset page)

ISSUE:

* @autofocus is currently permitted only on 5 elements: button; input; keygen; select; textarea
* HOWEVER, javascript is used to set focus also on other elements. One usecase can be elements that imitated a frame: If the main content of the page is kept inside that element, then authors would like to give focus to that element, so that the user can start to scroll the page by pressing the SPACE key.
* Of course, it must continue to only be permitted to have a single @autofocus per page.

EXAMPLE PAGE: (also available as attachment): http://tinyurl.com/4xy4nr8

ADVANTAGES: 

  Currently, one must use javascript to do this. This means that autofocus can&apos;t be set whenever javascript is disabled or when the author is unfamiliar with javascript.

DISADVANTAGE OF CURRENT SITUATION: 

   If a page contains e.g. a &lt;button autofocus&gt; element, the author might still use javascript to give focus to another element than the one with @autofocus set - making @autofocus virtually useless. But, if autofocus could be used to give focus to any element with @tabindex, then the author is more likely  to keep @autofocus and javascript in sync (e.g. if he/she uses javascript to target legacy browsers).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55963</commentid>
    <comment_count>1</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2011-08-29 05:14:27 +0000</bug_when>
    <thetext>MORE ON THE NEED FOR THIS CHANGE:

It is currently rather common to &quot;imitate frames&quot; by using position:fixed banners and menus on the top of the page.  However, authors often do not realize that this simplistic approach typically will cause the banner to hide content when the user is SPACE key scrolling. 

   Example: http://www.gp.se/ 
               (Swedish news paper with a banner that hides content - 3 to 4 lines -  when SPACE key scrolling.)

Some are are aware of the issue, and creates a banner that is so low that it doesn&apos;t create problems.

   Example: http://www.bt.no/
                 (Norwegian newspage where a fixed menu of low hight  
                 &quot;pops up&quot; when user is scrolling.I)

On the other side, there exists more &quot;true&quot; frame imitations, which however suffer from the problem of getting focus on the content element.

   Example: http://www.cssplay.co.uk/layouts/fixit.html
                  (A complete frame emulation which suffer from lack of  interactivity, 
                   since it doesn&apos;t give focus to the main content element.)

And lastly, frame pages and iframe pages are still in use - and often critisized. However, fact is that frame pages and iframe pages are simpler to give focus to (via Javascript) than it is to give focus to emulated frames: Firefox has a bug when it comes to setting focus on &quot;imitation frames&quot;: https://bugzilla.mozilla.org/show_bug.cgi?id=682763 And Opera has a similar bug. These bugs are not present for &quot;real&quot; frame and iframe elements, where it is easy and safe to set the focus.

     Example  of frame based page: http://di.se
                    ( This page does not seem to manage focus - so it is not an example in that regard.
                       So this page ony shows that setting focus via javascript can be a challenge to
                      authors ... Please see the mozilla bug above for test frame and ifram tests. ) 

SUMMARY:

@autofocus on any element with @tabindex will *not* be able to *automatically* solve all the above problems. However, I believe it would: make socalled &quot;CSS frames&quot; (that is: imitated frames) a more serious alternative. We have been bashing frames for a long time, but when one actually try to do CSS frames, then one stumbles on some much of the same problems. Permitting @autfocus on any element with @tabindex, could raise awareness about the correct way as well as raise the awareness of what it actually takes to imitate frames.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55975</commentid>
    <comment_count>2</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2011-08-29 12:03:53 +0000</bug_when>
    <thetext>PROPOSED NEW SPEC TEXT:

]] The autofocus content attribute allows the author to indicate that a control
&lt;INS&gt;or specially focusable element&lt;/INS&gt; is to be focused as soon as the page
is loaded, allowing the user to just start &lt;INS&gt;interacting with the element
via the keyboard (for example &lt;/ins&gt; typing&lt;ins&gt; or SPACE key scrolling a
scrollabel element)&lt;/ins&gt; without having to manually focus the main control
&lt;INS&gt; or specially focusable element&lt;/INS&gt;. [[</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>61368</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-12-09 23:33:00 +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: Rejected
Change Description: no spec change
Rationale: Let&apos;s see how people do with autofocus on &lt;input&gt; before we start making it even easier to move focus around.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97739</commentid>
    <comment_count>4</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2013-12-17 11:21:20 +0000</bug_when>
    <thetext>*** Bug 24124 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1026</attachid>
            <date>2011-08-29 04:41:37 +0000</date>
            <delta_ts>2011-08-29 04:41:37 +0000</delta_ts>
            <desc>Demo page (the demo immitates a frameset page)</desc>
            <filename>framulation.html</filename>
            <type>text/html</type>
            <size>3035</size>
            <attacher name="Leif Halvard Silli">xn--mlform-iua</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hodG1s
IiBsYW5nPSJlbiIgeG1sOmxhbmc9ImVuIiAKdGFiaW5kZXg9Jy0xJyA+CjxoZWFkPgo8bWV0YSBj
aGFyc2V0PSJVVEYtOCIgLz4KPHRpdGxlPiBjc3MgZnJhbWVzIDwvdGl0bGU+CjxzdHlsZSB0eXBl
PSJ0ZXh0L2NzcyI+Cmh0bWx7cG9zaXRpb246Zml4ZWQ7aGVpZ2h0OjEwMCU7b3ZlcmZsb3c6aGlk
ZGVuO3BhZGRpbmc6MDttYXJnaW46MDt9CmJvZHl7cG9zaXRpb246Zml4ZWQ7Ym9yZGVyOnNvbGlk
IGJyb3duO3RleHQtYWxpZ246Y2VudGVyO3BhZGRpbmc6MDttYXJnaW46MDt9CiNmcmFtZXt3aWR0
aDoxMDAlO2Rpc3BsYXk6YmxvY2s7bGVmdDowO3Bv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