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:14, Steven Faulkner wrote:

>> Do you mean that the UA should check if a 'click' event handler is on the call stack when drawfocus() is called?
>  
> Forgive my ignorance, but i don't understand what you are talking about.

I mean call stack in this sense:
http://en.wikipedia.org/wiki/Call_stack

> what i mean is when a region of the canvas is being monitored for clicks and the response to a click is to call the drawfocus() method, this method includes a reference to an element,

I take that as affirmative answer to my question.

> then the calling of the drawfocus() method should cause the focus to move to the referenced element.

What if the call to drawfocus() is not in response to a click?

> rather than  the developer having to manually move focus to the element via scripting.

It would be exceedingly weird API design to make drawfocus(element, ...) also call element.focus() but only if drawfocus() was called in response to a click (i.e. there's a 'click' event handler on the call stack). I wouldn't support that (exceeding weirdness of API behavior depending on the call stack being the reason).

It *might* make sense to make drawfocus(element, ...) call element.focus() unconditionally. However, keeping drawfocus() as focus() distinct would seem to be more fitting to a low level API as far as separation of concerns goes. At the very least, repeated calls to drawfocus(element, ) with the same element shouldn't cause element to refocus every time but to focus the first time and then remain focused if drawfocus() is called again without focusing something else in between.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/

Received on Wednesday, 20 January 2010 14:34:59 UTC