<?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>27912</bug_id>
          
          <creation_ts>2015-01-27 23:30:09 +0000</creation_ts>
          <short_desc>initial focus precedence: autofocus or fragment identifier</short_desc>
          <delta_ts>2016-04-27 16:52: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>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Rodney Rehm">mail</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>arronei</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>117524</commentid>
    <comment_count>0</comment_count>
    <who name="Rodney Rehm">mail</who>
    <bug_when>2015-01-27 23:30:09 +0000</bug_when>
    <thetext>There are currently at least 2 ways to set initial focus upon document load. The document itself can define an element to (scroll to and) focus by using the autofocus attribute [1] (limited to form elements). The user can define the element to (scroll to and) focus by using a URL fragment identifier [2]. The specification does not define order of processing autofocus and fragment identifiers. 

Blink [3] prefers the autofocus attribute. Gecko [4] and WebKit [5] prefer :target but show bugs in doing so. Trident (IE11) prefers :target without bugs.

In my opinion Microsoft got this one right. A URL fragment identifier can be argued to be user-input, where autofocus is a document&apos;s default state. User input should be more important. I propose to add a note to the autofocus [1] spec saying that fragment identifiers [2] have precedence.


[1] http://www.w3.org/html/wg/drafts/html/master/forms.html#autofocusing-a-form-control:-the-autofocus-attribute
[2] http://www.w3.org/html/wg/drafts/html/master/browsers.html#scroll-to-fragid
[3] https://code.google.com/p/chromium/issues/detail?id=382901
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=840187
[5] https://bugs.webkit.org/show_bug.cgi?id=140963</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121064</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2015-06-16 11:11:48 +0000</bug_when>
    <thetext>Re-prioritizing per implementer feedback but noting this us simply editorial.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126205</commentid>
    <comment_count>2</comment_count>
    <who name="Arron Eicholz">arronei</who>
    <bug_when>2016-04-27 16:52:20 +0000</bug_when>
    <thetext>HTML5.1 Bugzilla Bug Triage: Moved to Github issue: https://github.com/w3c/html/issues/277

To file additional issues please use the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>