On 06/19/2017 04:28 PM, Brian Grinstead wrote:
I was wondering what would need to be done in order to use the accesskey 
attribute on HTML elements in the browser chrome. Here are some of the 
differences between the attribute in HTML and XUL that I've found so far:

1) In XUL 
(https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/accesskey) 
the shortcut is `Control + key` on Windows and `Command + key` on Mac. In HTML 
(https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey) 
the shortcut is `Alt + Shift + key` on Windows and `Control + Alt + key` on 
Mac. Would we want to change the HTML shortcut (in browser chrome) to match XUL 
behavior?
As far as I can tell this was last changed/discussed in https://bugzilla.mozilla.org/show_bug.cgi?id=340902, and Mats may be the right person to comment on it (but do note that this hasn't changed since Firefox 2.)

2) The FAQ & Policies page 
(https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/XUL_Accesskey_FAQ_and_Policies)
 conflicts the with previous point when it says that accesskey is only available on 
Mac in HTML. If this is correct, would we want to disable accesskey functionality 
on Mac for HTML (in browser chrome) to maintain the current behavior, or would it 
working be a benefit of using HTML?
That documentation seems incorrect. Mac <https://searchfox.org/mozilla-central/rev/7cc377ce3f0a569c5c9b362d589705cd4fecc0ac/modules/libpref/init/all.js#4040> uses different defaults than other OSes <https://searchfox.org/mozilla-central/rev/7cc377ce3f0a569c5c9b362d589705cd4fecc0ac/modules/libpref/init/all.js#2518>. Not sure why. :-)
3) The formatting / underlining is controlled by the label-control xbl binding 
at 
http://searchfox.org/mozilla-central/source/toolkit/content/widgets/text.xml#66.
 Presumably this is something that would need to be reimplemented for HTML 
elements in order to use them in the browser chrome.
The underlining?  Could that not be achieved using CSS?
Am I missing anything else?
on Windows, the OS native widgets have a custom way of handling the underlining IIRC to draw it only when Alt is pressed or something along those lines and at some point we also had a bug about it to implement it for XUL, but I'm not sure if we ever did that and I can't find the bug right now, but something to double check perhaps.

Cheers,
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to