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

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:34 UTC