]> git.openstreetmap.org Git - rails.git/commitdiff
Single tab keypress focus on map for keyboard users
authorRichard Finegold <goldfndr+git@gmail.com>
Sat, 20 Jul 2013 00:07:03 +0000 (17:07 -0700)
committerTom Hughes <tom@compton.nu>
Mon, 29 Jul 2013 20:32:55 +0000 (21:32 +0100)
When one goes to the default map page, the first tabindex is set to the
search field, which is good. But, to use the keyboard with the map (arrows
for scrolling, =/- for zooming), one must press the tab key many times.

This modification quickly gets the keyboard to a much-used location via
a single keypress.

app/views/site/index.html.erb

index 4b66fa149c12c646953bb41d48c828fadac0be57..721fd18edc988154efc7c9a6ea658d72369a112e 100644 (file)
@@ -16,7 +16,7 @@
 <div id="map-ui">
 </div>
 
-<div id="map">
+<div id="map" tabindex="2">
 </div>
 
 <iframe id="linkloader" style="display: none">