Edgewall Software

Ticket #1752 (closed enhancement: fixed)

Opened 3 years ago

Last modified 8 months ago

Keyboard shortcut for Edit/Preview buttons

Reported by: Shun-ichi Goto <gotoh@…> Owned by: jonas
Priority: normal Milestone: 0.9
Component: general Version: none
Severity: normal Keywords: accesskey
Cc: m@…

Description

I'm using modified template file with adding keyboard shortcut via 'accesskey' attribute for 'Edit' button and 'Preview' button they are frequently used.

I assigned 'r' key (ALT-R on windows) for 'Preview', and 'e' key (ALT-E on windows) for 'Edit'.
## Other buttons are not assinged because of avoid submitting by miss operation.

I think this is usefull for daily trac operation.

Index: newticket.cs
===================================================================
--- newticket.cs	(revision 1886)
+++ newticket.cs	(working copy)
@@ -95,7 +95,7 @@
    var:htdocs_location ?>js/wikitoolbar.js"></script>
 
  <div class="buttons">
-  <input type="submit" name="preview" value="Preview" />&nbsp;
+  <input type="submit" name="preview" value="Preview" accesskey="r" />&nbsp;
   <input type="submit" value="Submit ticket" />
  </div>
 </form>
Index: ticket.cs
===================================================================
--- ticket.cs	(revision 1886)
+++ ticket.cs	(working copy)
@@ -287,7 +287,7 @@
    var:htdocs_location ?>js/wikitoolbar.js"></script>
 
  <div class="buttons">
-  <input type="submit" name="preview" value="Preview" />&nbsp;
+  <input type="submit" name="preview" value="Preview" accesskey="r" />&nbsp;
   <input type="submit" value="Submit changes" />
  </div>
 </form>
Index: wiki.cs
===================================================================
--- wiki.cs	(revision 1886)
+++ wiki.cs	(working copy)
@@ -227,7 +227,7 @@
      <?cs /if ?>
     </fieldset>
     <div class="buttons">
-     <input type="submit" name="preview" value="Preview" />&nbsp;
+     <input type="submit" name="preview" value="Preview" accesskey="r" />&nbsp;
      <input type="submit" name="save" value="Submit changes" />&nbsp;
      <input type="submit" name="cancel" value="Cancel" />
     </div>
@@ -257,7 +257,7 @@
     if:trac.acl.WIKI_MODIFY ?>
      <form method="get" action="<?cs var:wiki.current_href ?>"><div>
       <input type="hidden" name="action" value="edit" />
-      <input type="submit" value="<?cs if:wiki.exists ?>Edit<?cs else ?>Create<?cs /if ?> this page" />
+      <input type="submit" value="<?cs if:wiki.exists ?>Edit<?cs else ?>Create<?cs /if ?> this page" accesskey="e" />
      </div></form><?cs
      if:wiki.exists ?>
       <form method="get" action="<?cs var:wiki.attach_href ?>"><div>

Attachments

Change History

Changed 3 years ago by Markus Tacker <m@…>

Bump.

Please also add accesskey="s" to the submit button.s

Changed 3 years ago by Markus Tacker <m@…>

  • cc m@… added

Changed 3 years ago by cmlenz

  • status changed from new to closed
  • resolution set to fixed
  • component changed from wiki to general
  • milestone set to 0.9

Implemented in [2185]. Also adds the access key “f” for jumping to the quick-search text field.

I agree with Shun-ichi Goto that adding access keys for operations such as “Submit” or “Cancel” might be dangerous. You accidentially hit the key (which you aren't aware of due to the bad discoverability of access keys in current user agents), and the current form is submitted or cancelled.

Changed 3 years ago by fumanchu@…

There go my file and edit menus in Firefox on Windows; access keys are extremely annoying for that reason, and are a major usability headache at, say, Wikipedia for the same reason. Alt-F, Alt-C now fails to close the tab; instead, it jumps me to the search box. Alt-E, Alt-F used to allow me to search the text on the current page, now it takes me to "Edit this page", in sharp contrast to every other web page on the 'Net.

I would very much like to see at least the 'e' and 'f' accesskey's backed out of the trunk.

Changed 3 years ago by Markus Tacker <m@…>

I think it would be usefull to move this to a configuration section where you could define the access keys yourself, even for the submit button.

Changed 3 years ago by Markus Tacker <m@…>

  • keywords accesskey added

Add/Change #1752 (Keyboard shortcut for Edit/Preview buttons)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.