<?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>23980</bug_id>
          
          <creation_ts>2013-12-03 16:50:16 +0000</creation_ts>
          <short_desc>drawSystemFocusRing and drawCustomFocusRing is poorly named</short_desc>
          <delta_ts>2014-01-20 23:26: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>CR HTML Canvas 2D Context</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>a11y_canvas</keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philippe Le Hegaret">plh</reporter>
          <assigned_to name="Jay Munro">jaymunro</assigned_to>
          <cc>jmann</cc>
    
    <cc>mark.sadecki+w3c</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>schwer</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>97060</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2013-12-03 16:50:16 +0000</bug_when>
    <thetext>A.  drawSystemFocusRing and drawCustomFocusRing don&apos;t necessarily draw a ring. This may be just terminology. How does one call the drawing to indicate a focus location?

 B. If the element isn&apos;t in focus, they don&apos;t draw anything at all. If the element is in focus, it won&apos;t be drawn if the user hasn&apos;t requested a particular focus ring (and the element doesn&apos;t usually have a focus ring for drawSystemFocusRing). In other words, it&apos;s user and platform dependent whether a focus ring is drawn or not. Those functions are request to the user agent that may be fulfilled or not.

See also
[[
What would you call it if it never draws, but just notifies the UI? I think
we could call it notifyFocusRingPath or something like that.
]]
http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Oct/0203.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97084</commentid>
    <comment_count>1</comment_count>
    <who name="Jay Munro">jaymunro</who>
    <bug_when>2013-12-03 21:32:36 +0000</bug_when>
    <thetext>Reassigning to Canvas 2D Context Level 2 since drawSystemFocusRing and drawCustomFocusRing are at risk for CR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97119</commentid>
    <comment_count>2</comment_count>
    <who name="Rich Schwerdtfeger">schwer</who>
    <bug_when>2013-12-04 14:42:41 +0000</bug_when>
    <thetext>Like any error condition, if someone tries to draw focus ring on something that does not have focus then it should not draw the ring. I don&apos;t see the issue. That is how it should operate.


This statement makes no sense: 

&quot;If the element is in focus, it won&apos;t be drawn if the user hasn&apos;t requested a particular focus ring (and the element doesn&apos;t usually have a focus ring for drawSystemFocusRing)&quot; 

All the platforms I have used have a default focus ring style. It is also a WCAG requirement that the user draw visual focus. WCAG2 is also being applied to software in the new 508 refresh so if the OS does not provide for this then the OS platform will have problems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97120</commentid>
    <comment_count>3</comment_count>
    <who name="Rich Schwerdtfeger">schwer</who>
    <bug_when>2013-12-04 14:48:12 +0000</bug_when>
    <thetext>I think the name is fine as it is consistent with platform accessibility APIs. A name change is also not justification for pushing low vision access to L2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97138</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2013-12-04 17:53:46 +0000</bug_when>
    <thetext>The spec says &quot;or if the element would have a focus ring drawn around it&quot;, which implies that not all elements have a default focus ring.

My point related to the naming is that, at best, it is a quest to draw a focus ring but the specification doesn&apos;t guarantee that a focus ring will be drawn even if the element is in focus and a descendant of the context. At least, that&apos;s how I read the spec.

Given that, some are questioning the naming of the method.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97146</commentid>
    <comment_count>5</comment_count>
    <who name="Rich Schwerdtfeger">schwer</who>
    <bug_when>2013-12-04 19:13:17 +0000</bug_when>
    <thetext>I don&apos;t interpret it that way. At best we are talking about an editorial change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97148</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2013-12-04 19:33:53 +0000</bug_when>
    <thetext>You may not interpret that way but,as far as I can tell, my interpretation of the specification reflects what was implemented.

If you focus on a p element and then call drawSystemFocusRing on it, you won&apos;t get a focus ring:
 http://w3c-test.org/web-platform-tests/submissions/457/2dcontext/drawing-paths-to-the-canvas/drawSystemFocusRing_005.html
(this test fails on Firefox Nightly and Chrome Canary)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97150</commentid>
    <comment_count>7</comment_count>
    <who name="Jay Munro">jaymunro</who>
    <bug_when>2013-12-04 19:46:43 +0000</bug_when>
    <thetext>I jumped the gun on moving to L2, there are still ongoing discussions on the focus ring methods. Moving back to CR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97173</commentid>
    <comment_count>8</comment_count>
    <who name="Rich Schwerdtfeger">schwer</who>
    <bug_when>2013-12-05 15:08:46 +0000</bug_when>
    <thetext>The focus ring is a hold over from platform accessibility apis that is something that people who work in accessibility are familiar with on Windows. This is why Microsoft and others who wrote the original proposal chose this name. I don&apos;t think the name should be something that holds us up. Perhaps simply calling the API drawSystemFocus() and drawCustomFocus()? This gets us away with being tied down to any particular path appearance.

I should note that Microsoft wanted to convert the path to a rectangle as it was consistent with how focus &quot;rings&quot; were drawn in Windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97185</commentid>
    <comment_count>9</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2013-12-05 16:35:21 +0000</bug_when>
    <thetext>As a side comment, 
http://w3c-test.org/web-platform-tests/submissions/457/2dcontext/drawing-paths-to-the-canvas/drawSystemFocusRing_005.html
was incorrect since it didn&apos;t have a tabindex. It&apos;s now fixed and works properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98056</commentid>
    <comment_count>10</comment_count>
    <who name="Jay Munro">jaymunro</who>
    <bug_when>2014-01-06 23:53:24 +0000</bug_when>
    <thetext>Initial title: 
drawSystemFocusRing and drawCustomFocusRing are poorly named

Per A11y/Canvas group, we&apos;ll keep drawSystemFocusRing name the same. drawCustomFocusRing will be worked on in Canvas Context 2D Level 2. 

Changing title to:
drawCustomFocusRing is poorly named</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98141</commentid>
    <comment_count>11</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2014-01-08 18:35:27 +0000</bug_when>
    <thetext>I&apos;m fine with the resolution btw and having this bug closed or moved to L2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98206</commentid>
    <comment_count>12</comment_count>
    <who name="Jatinder Mann [MSFT]">jmann</who>
    <bug_when>2014-01-09 16:58:35 +0000</bug_when>
    <thetext>I would like to talk about this bug some more in next Monday&apos;s Canvas Accessibility Sub Group meeting. I think we should consider updating the name of drawSystemFocusRing in the L1 spec to make the feature more clear to web developers. I personally don&apos;t think fixing the name should mean that we need to push this API out to the L2 spec; its quite reasonable to update the name in the L1 spec, especially if we will likely be going to Last Call anyway. Just because some old Win32 API is using this sort of name doesn&apos;t mean we should confuse web developers and impact the adoption of this API.

I don&apos;t like the use of &quot;System&quot; because it sounds like we are using the OS focus, whereas we really mean User Agent focus. E.g., On Windows Chrome uses a orange focus which is different from the system dotted focus. I rather we just remove the word &quot;System&quot; for this method. The &quot;Custom&quot; version should keep the word &quot;Custom&quot; because it is a custom focus that the web developer draws.

I don&apos;t like the use of &quot;Ring&quot;. You can use the Canvas API to draw any path, not just a ring. We can drop &quot;Ring&quot; and go with &quot;Region&quot;, &quot;Path&quot;, or nothing at all.  

I don&apos;t particularly like the use of &quot;draw&quot; as we only draw if the area is focused. Other draw calls like &quot;drawImage&quot; always draw once the call is made. I can see that &quot;set&quot; may be confusing as it may appear that we are setting the focus, not the user. Since it may be the least confusing, I think we should leave &quot;draw&quot; in.

How does &quot;drawFocus&quot; instead of &quot;drawSystemFocusRing&quot; and &quot;drawCustomFocus&quot; instead of &quot;drawCustomFocusRing&quot; sound? I know naming may sound like a minor thing, but if we are spending the time to fix the defects in this API, we might as well get the name right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98362</commentid>
    <comment_count>13</comment_count>
    <who name="Jatinder Mann [MSFT]">jmann</who>
    <bug_when>2014-01-13 22:11:22 +0000</bug_when>
    <thetext>Bringing the bug back to HTML5 CR as there is an ongoing discussion on fixing this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98378</commentid>
    <comment_count>14</comment_count>
    <who name="Philippe Le Hegaret">plh</who>
    <bug_when>2014-01-13 23:46:10 +0000</bug_when>
    <thetext>Proposed resolution is to change drawSystemFocusRing to drawFocusIfNeeded</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98665</commentid>
    <comment_count>15</comment_count>
    <who name="Jay Munro">jaymunro</who>
    <bug_when>2014-01-16 23:11:47 +0000</bug_when>
    <thetext>drawSystemFocusRing has been renamed to drawFocusIfNeeded.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98793</commentid>
    <comment_count>16</comment_count>
    <who name="Jatinder Mann [MSFT]">jmann</who>
    <bug_when>2014-01-20 23:26:31 +0000</bug_when>
    <thetext>As per Canvas SubGroup discussion, we have agreed upon the drawFocusIfNeeded name, http://www.w3.org/2014/01/20-html-a11y-minutes.html. The spec has been updated to reflect that change.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>