This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8210 - Add drawFocusRing(x,y,w,h,element) which, if element is focused, draws a system focus ring at x,y,w,h.
Summary: Add drawFocusRing(x,y,w,h,element) which, if element is focused, draws a syst...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML Canvas 2D Context (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: LC
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords: NE
Depends on:
Blocks:
 
Reported: 2009-11-05 23:56 UTC by contributor
Modified: 2010-10-05 12:59 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2009-11-05 23:56:04 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#canvasrenderingcontext2d

Comment:
Add drawFocusRing(x,y,w,h,element) which, if element is focused, draws a system focus ring at x,y,w,h.

Posted from: 72.254.11.163
Comment 1 Simon Pieters 2009-11-06 11:42:22 UTC
What if you want the focus ring to have a non-rectangular shape? What if the shape is constantly moving around?

Will anyone even want system focus ring in canvas rather than rolling their own focus rings in canvas?
Comment 2 Ian 'Hixie' Hickson 2009-11-06 17:05:47 UTC
They can't draw their own — there'd be no way to notify the OS of where the focus ring is (required for accessibility assistive tools to move the magnification around, etc), and they wouldn't be able to use the OS-default rendering for focus.
Comment 3 Ian 'Hixie' Hickson 2010-01-05 01:14:32 UTC
Seems like the requirements are:
   1. ability to draw an OS focus ring around a path
   2. ability to draw a custom focus ring if the OS focus style isn't needed
   3. ability to specify where the caret is, for magnification tracking
   4. design that encourages the author to keep an element in the DOM focused, so that ATs can expose the state
   5. no reliance on CSS, since CSS is optional and we don't want the accessibility story to fall apart when styles are absent
Comment 4 Ian 'Hixie' Hickson 2010-01-05 02:53:46 UTC
EDITOR'S RESPONSE: This is an Editor'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: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 5 contributor 2010-01-05 02:54:45 UTC
Checked in as WHATWG revision r4465.
Check-in comment: drawFocusRing() support
http://html5.org/tools/web-apps-tracker?from=4464&to=4465
Comment 6 Vladimir Vukicevic (Mozilla) 2010-01-20 18:55:43 UTC
(Sorry -- first I've seen this, has no mention of canvas anywhere so my filters didn't catch it.)

There's very little rationale for the original request, though Hixie identifies a couple of possible needs.  But, I don't think that a method on the 2D context is the best place for this -- it's a pretty odd thing to stick onto the 2D rendering context which otherwise has no user interaction.  This seems like it would be more useful as a toplevel Document API that overlays a focus ring at a specific location on the page, or something of that nature.