drawSystemFocusRing and drawCustomFocusRing names are confusing.

Regarding Bug 23980 - drawSystemFocusRing and drawCustomFocusRing are poorly named, https://www.w3.org/Bugs/Public/show_bug.cgi?id=23980, I would like to talk more about this bug in next Monday'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't think fixing the name should mean that we need to push this API out to the L2 spec; it's 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't mean we should confuse web developers and impact the adoption of this API.

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

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

I don't particularly like the use of "draw" as we only draw if the area is focused. Other draw calls like "drawImage" always draw once the call is made. I can see that "set" 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 "draw" in.

How does "drawFocus" instead of "drawSystemFocusRing" and "drawCustomFocus" instead of "drawCustomFocusRing" 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.


Thanks,
Jatinder

Received on Thursday, 9 January 2014 17:07:54 UTC