W3C home > Mailing lists > Public > public-html@w3.org > January 2010

Re: Proposal: Canvas accessibility and a media querries approach for alternative content (Action Item 6 in the HTML Accessibility Task Force)

From: Henri Sivonen <hsivonen@iki.fi>
Date: Wed, 20 Jan 2010 17:17:49 +0200
Cc: Ian Hickson <ian@hixie.ch>, Maciej Stachowiak <mjs@apple.com>, public-canvas-api@w3.org, HTML WG <public-html@w3.org>
Message-Id: <EC0BB084-4E67-422B-8DE5-9223D09CC082@iki.fi>
To: Steven Faulkner <faulkner.steve@gmail.com>
On Jan 20, 2010, at 16:58, Steven Faulkner wrote:

> currently the spec [http://dev.w3.org/html5/2dcontext/Overview.html#focus-management] says:
>>  If element is not focused or is not a descendant of the element with whose context the method is associated, then return false and abort these steps.

The spec says why it is designed like this:
"This method only draws the focus ring if the element is focused, so that it can simply be called whenever drawing the element, without checking whether the element is focused or not first."

This way, the call to drawFocusRing() can be an unconditional part of a paint routine and the check to see if the element is focused can be done in the UA C++ code without the script having to make an explicit JS-to-C++ query for each element to decide whether to call drawFocusRing().

(I retract my statement that it might make sense to imply a call to focus(). It is a bit surprising, though, that a method called drawFoo() actually means drawFooIfBar().)

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Wednesday, 20 January 2010 15:18:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:00 GMT