<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>13958</bug_id>
          
          <creation_ts>2011-08-29 18:47:51 +0000</creation_ts>
          <short_desc>Authors should be able to request specific modifiers for accesskeys</short_desc>
          <delta_ts>2012-09-15 12:17:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML.next</product>
          <component>default</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>LATER</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>RFE</status_whiteboard>
          <keywords>a11y</keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aryeh Gregor">ayg</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>chaals</cc>
    
    <cc>devarshipant</cc>
    
    <cc>ehsan</cc>
    
    <cc>ian</cc>
    
    <cc>laura.lee.carlson</cc>
    
    <cc>mike</cc>
    
    <cc>plh</cc>
    
    <cc>public-html-a11y</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>rniwa</cc>
    
    <cc>robin</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>56001</commentid>
    <comment_count>0</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-29 18:47:51 +0000</bug_when>
    <thetext>Ryosuke, Ehsan, Annie, and I discussed this at our face-to-face meeting last week.  See the &quot;Keyboard shortcuts&quot; section of the Etherpad, for the second day:

http://etherpad.mozilla.com:9000/html-editing-mozilla-google-meeting-minutes

Currently, authors get no control over which modifiers are used for accesskeys.  accesskey=b might mean Alt-B, Ctrl-B, Alt-Shift-B, Shift-Esc-B, etc.  This is fine in a lot of cases, but sometimes authors want more control.  For instance, users expect that pressing Ctrl-B (or Cmd-B on Mac) will make text bold in a rich-text editor.

Thus authors intercept key events.  This is bad, because it&apos;s a pain and easy to get wrong.  Authors have to manually sniff Mac vs. Windows/Linux to decide whether to recognize Cmd or Ctrl.  Also, the accesskey won&apos;t be visible as an accesskey when hitting Shift-Esc in Opera or anything else that cares about accesskeys.  This might include AT (I don&apos;t know).

It would be better if authors could declaratively request a specific modifier, and programmatically detect if they got it or not.  For the use-cases I know of, the only modifier authors would need to request is the accelerator (Cmd on Mac, Ctrl on Windows/Linux).

Perhaps in the accesskey attribute, tokens could be optionally prefixed by &quot;accel-&quot; to request the accelerator instead of the normal modifier.  Like this:

  &lt;button onclick=&quot;execCommand(&apos;bold&apos;)&quot; accesskey=&quot;accel-b&quot;&gt;&lt;b&gt;B&lt;/b&gt;&lt;/button&gt;

Whether it worked could be detectable using accessKeyLabel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56058</commentid>
    <comment_count>1</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2011-08-30 19:31:57 +0000</bug_when>
    <thetext>Should accessKeyLabel be the same as the accesskey attribute value if this works?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56060</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-30 19:33:43 +0000</bug_when>
    <thetext>I don&apos;t think so.  I&apos;d want accessKeyLabel to reflect cmd vs. ctrl, at least, not be a generic &quot;accel&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56061</commentid>
    <comment_count>3</comment_count>
    <who name="Ehsan Akhgari [:ehsan]">ehsan</who>
    <bug_when>2011-08-30 19:36:34 +0000</bug_when>
    <thetext>But that would require authors to handle Mac and Windows/Linux cases separately in their code, right?  Why can&apos;t we just require UAs to map &quot;accel&quot; to the default platform accelerator key?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56062</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-30 19:38:54 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; But that would require authors to handle Mac and Windows/Linux cases separately
&gt; in their code, right?  Why can&apos;t we just require UAs to map &quot;accel&quot; to the
&gt; default platform accelerator key?

I don&apos;t think that&apos;s necessary true.  As far as I know, the label is intended to be used a part of UI; not something the authors should be parsing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56068</commentid>
    <comment_count>5</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2011-08-30 20:20:17 +0000</bug_when>
    <thetext>Right.  accessKeyLabel is (I think) meant to be used to inform the user what the accesskey is.  I filed bug 13902 to request that the format be standardized so that authors can easily parse it if they want, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58619</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-10-21 05:37:21 +0000</bug_when>
    <thetext>This is already on the medium-term plan for accesskey. I intend to add &quot;modifier+&quot; prefixes to what is currently just single-letter items, as well as key names (&quot;home&quot;, &quot;F1&quot;, etc; see bug 13576). That&apos;s why the spec currently says to ignore values longer than one character. First I&apos;m waiting for implementations to pick up the stuff we&apos;ve specced so far.

One open question is what to do about the way that different platforms use different accelerators for different purposes. e.g. Windows uses Ctrl where Mac uses Command; Mac and Unix have accelerators like Ctrl+A for going to the start of the line, and each platform has their own eccentricities, e.g. Mac&apos;s &quot;Home&quot; key doesn&apos;t act like Windows&apos; &quot;Home&quot; key; &quot;Shift-Delete&quot; on Windows is quite different than on Mac, etc. I don&apos;t really want to have to list a bazillion &quot;virtual&quot; keys for these purposes.

Any suggestions welcome. For now I&apos;m marking this LATER; please don&apos;t hesitate to reopen this if you notice before I do that browsers have adopted what we have here so far (accesskey=&quot;a b c&quot;, accessKeyLabel, etc).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58624</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-10-21 06:19:26 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; One open question is what to do about the way that different platforms use
&gt; different accelerators for different purposes. e.g. Windows uses Ctrl where Mac
&gt; uses Command; Mac and Unix have accelerators like Ctrl+A for going to the start
&gt; of the line, and each platform has their own eccentricities, e.g. Mac&apos;s &quot;Home&quot;
&gt; key doesn&apos;t act like Windows&apos; &quot;Home&quot; key; &quot;Shift-Delete&quot; on Windows is quite
&gt; different than on Mac, etc. I don&apos;t really want to have to list a bazillion
&gt; &quot;virtual&quot; keys for these purposes.

I think we should translate these to editing command name; e.g. Delete, DeleteForward, etc... In WebKit at least, home, end, etc... are also translated to editing commands internally.

Once we add beforeeditingaction and editingaction events (or extend beforeinput/input events), then authors can intercept those commands instead of adding specific key bindings by menu/command/etc...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73955</commentid>
    <comment_count>8</comment_count>
    <who name="Charles McCathieNevile">chaals</who>
    <bug_when>2012-09-15 12:11:02 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; One open question is what to do about the way that different platforms use
&gt; &gt; different accelerators for different purposes. e.g. Windows uses Ctrl where Mac
&gt; &gt; uses Command; Mac and Unix have accelerators like Ctrl+A for going to the start
&gt; &gt; of the line, and each platform has their own eccentricities, e.g. Mac&apos;s &quot;Home&quot;
&gt; &gt; key doesn&apos;t act like Windows&apos; &quot;Home&quot; key; &quot;Shift-Delete&quot; on Windows is quite
&gt; &gt; different than on Mac, etc. I don&apos;t really want to have to list a bazillion
&gt; &gt; &quot;virtual&quot; keys for these purposes.
&gt; 
&gt; I think we should translate these to editing command name; e.g. Delete,
&gt; DeleteForward, etc... In WebKit at least, home, end, etc... are also translated
&gt; to editing commands internally.
&gt; 
&gt; Once we add beforeeditingaction and editingaction events (or extend
&gt; beforeinput/input events), then authors can intercept those commands instead of
&gt; adding specific key bindings by menu/command/etc...

Where there are commands (see IndieUI - someone else is inventing those wheels), there should be no need to define accesskeys, as the user agent should take care of providing access to the commands in a way that makes sense to the user.

Letting the author interfere in this is simply a recipe to perpetuate the mess we have had for the last decade, of things that don&apos;t actually work at all on many systems in the name of giving the author the ability to force everything to match whatever system s/he did imagine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73956</commentid>
    <comment_count>9</comment_count>
    <who name="Charles McCathieNevile">chaals</who>
    <bug_when>2012-09-15 12:17:07 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; This is already on the medium-term plan for accesskey. I intend to add
&gt; &quot;modifier+&quot; prefixes to what is currently just single-letter items, as well as
&gt; key names (&quot;home&quot;, &quot;F1&quot;, etc; see bug 13576). That&apos;s why the spec currently
&gt; says to ignore values longer than one character. First I&apos;m waiting for
&gt; implementations to pick up the stuff we&apos;ve specced so far.
&gt; 
&gt; One open question is what to do about the way that different platforms use
&gt; different accelerators for different purposes. e.g. Windows uses Ctrl where Mac
&gt; uses Command; Mac and Unix have accelerators like Ctrl+A for going to the start
&gt; of the line, and each platform has their own eccentricities, e.g. Mac&apos;s &quot;Home&quot;
&gt; key doesn&apos;t act like Windows&apos; &quot;Home&quot; key; &quot;Shift-Delete&quot; on Windows is quite
&gt; different than on Mac, etc. I don&apos;t really want to have to list a bazillion
&gt; &quot;virtual&quot; keys for these purposes.
&gt; 
&gt; Any suggestions welcome. For now I&apos;m marking this LATER; please don&apos;t hesitate
&gt; to reopen this if you notice before I do that browsers have adopted what we
&gt; have here so far (accesskey=&quot;a b c&quot;, accessKeyLabel, etc).

Suggestion: Please don&apos;t add modifiers as a way to give authors more control. (Adding key names is fine - and as we appear likely to get more voice commands in the web being able to add words is going to help attach commands directly to the interface of a page instead of relying solely on the browser).

Accesskeys have a fighting chance of being useful precisely to the extent that authors *don&apos;t* control them, and accept that the user agent won&apos;t allow that. They were fine for a decade on mobile phones that had keypads even while they were unusable on a number of desktop browsers that gave authors the ability to interfere with the browser&apos;s user interface.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>