Re: Mapping for aria-keyshortcuts in AXAPI?

> On Jun 29, 2016, at 10:54 AM, Richard Schwerdtfeger <richschwer@gmail.com> wrote:
> 
> 
>> On Jun 29, 2016, at 12:46 AM, James Craig <jcraig@apple.com> wrote:
>> 
>> Joanie, please leave this "not mapped" in AAM for 1.1. 
>> 
>> Since we're getting away from using "ARIA" in API property names, and because this property is not yet mapped, please don't list it. It'd be bad to document API in a formal TR when it's not supported and likely to change.
>> 
>> To fill in a bit more detail for Chris, this is a Google proposal because the many web apps include custom shortcuts for everything (mostly single-letter keys). Domenic mentioned It's unlikely they'd use the same shortcut across platforms, so for example, 
>> 
>> The Windows version might list aria-shortcuts="Control+8"
>> The Mac version might list aria-shortcuts="Meta+8" (e.g. Command+8)
>> 
>> I've already pointed out that this API will be difficult to do well across platforms and locales. Many keyboards have totally different layouts than US English, with some characters requiring different modifier keys to access. For example, you have to hold Shift to access the number keys on french keyboards, so if you wanted a primary modifier + "8" it gets even more complicated:
>> 
> This comment is misleading. The API does not specify that the browser implement the keyboard mapping in the value.

Not misleading. All my comments have been about the complications of the authoring API. E.g. "Authors wishing to localize would need to know all these rules:"

> (Implementing the API is not difficult)

I'm referring to the authoring Web API and the end user perspective, not the implementation side. Of course it's not 

> Authors add keyboard shortcuts to web pages whether this attribute is available or not. However, to implement keyboard shortcuts authors will need to be aware of the system they are deployed on. 
> 
> I agree that you it is difficult to maintain code that creates keyboard shortcuts for each OS platform, browser, and device. That said, Google wanted to provide keyboard shortcuts and were doing so. This is a vehicle for them to expose the documentation about what those keyboard shortcuts are to AT. 
> 
> So, saying that it is difficult to implement an API that documents the shortcut is technically inaccurate.

You are using the term API to mean the implementation. I am referring to the Web API.

James

> In general, creating keyboard shortcuts that work on different devices is indeed challenging. However, if the author wants to do that, not exposing it is not going to change the situation. This is a vehicle to assist the end user in determining the shortcut that is applied. All not mapping would be doing is forcing the user to look elsewhere for the documentation.
> 
> I have rarely seen IBM make use of keyboard shortcuts in their web applications. Google, however has had a number of them in gmail and I believe Google Docs as well.  
> 
> 
>> Authors wishing to localize would need to know all these rules:
>> 
>> aria-shortcuts="Control+8" (US PC)
>> aria-shortcuts="Meta+8" (US Mac: e.g. Command+8)
>> aria-shortcuts="Meta+Shift+!" (French Mac; not a typo, 8 is Shift+! in France)
>> aria-shortcuts="Control+Shift+_" (French PC; again, not a typo, 8 is typed different on French PCs and Macs)
>> 
>> "Shift+1" becomes ambiguous in French ("What is shifted may never shift."), and there is no Web API to figure out which keyboard a user has. 
>> 
>>> On Jun 28, 2016, at 3:50 PM, Joanmarie Diggs <jdiggs@igalia.com> wrote:
>>> 
>>> On 06/28/2016 06:27 PM, cfleizach@apple.com wrote:
>>>> 
>>>>> On Jun 28, 2016, at 3:24 PM, Joanmarie Diggs <jdiggs@igalia.com> wrote:
>>> 
>>>>> The spec [1] currently states, "Note that Meta corresponds to the
>>>>> Command key on Apple computers." So we presumably need a similar
>>>>> statement for Alt, which seems to correspond to the Option key.
>>> 
>>> That Alt corresponds to Option is now stated in the spec. [1]
>> 
>> That's still problematic: Alt is actually fn+Option on macOS (note the top corner of the Option key), but no one would use this. It' may be better to leave this an unformatted string, that is just spoken literally to the user. 
>> 
>> Authors would have to localize and platformize (?) on so it'd be the authors responsibility to send a value of "Alt F" on Windows, and "Option F" on Mac. 
>> 
>>> If there
>>> are any others which need to be added, please let me know.
>>> 
>>>> We probably want to inform what the consumers of this API should do with this info... 
>>>> 
>>>> that is) does the screenreader directly announce these keys, or do they map them back to their platform specifics. And then have the mapping be provided in the spec so that we know Alt -> Option and Meta -> Command and so on
>>> 
>>> I'll leave it to others more familiar with this property to chime in.
>>> But what the spec states is:
>>> 
>>>  User agents MUST NOT change keyboard behavior in response to the
>>>  aria-keyshortcuts attribute. Authors MUST handle scripted keyboard
>>>  events to process aria-keyshortcuts. The aria-keyshortcuts
>>>  attribute exposes the existence of these shortcuts so that
>>>  assistive technologies can communicate this information to users.
>>> 
>>> --joanie
>>> 
>>> [1] https://rawgit.com/w3c/aria/master/aria/aria.html#aria-keyshortcuts
>>> 
>> 
>> 
> 

Received on Wednesday, 29 June 2016 18:04:24 UTC