The Daily WTF
“Hey,” someone on Russell F‘s team said. “We should add some keyboard navigation to our web app.” That struck everyone as an “easy win”, specifically because they were really talking about making “enter” and “escape” do something useful.
They wrote some quick requirements, passed it off, and the developer submitted a surprisingly long pull request. Russell passed a sample of three out of the dozens of methods:
function lr_control(event) { var current = document.getElementById(‘lr’); var next = document.getElementById(‘rf’); var back = document.getElementById(‘lf’); if (event.key == “Enter”) { divareInoperativeSensorsReplacedShow(); } if (event.key == “Escape”) { unCheck(current); } nav_control_clickable(current, next, back, event); return; } function rf_control(event) { var current = document.getElementById(‘rf’); var next = document.getElementById(‘rr’); var back = document.getElementById(‘lr’); if (event.key == “Enter”) { divareInoperativeSensorsReplacedShow(); } if (event.key == “Escape”) { unCheck(current); } nav_control_clickable(current, next, back, event); return; } function rr_control(event) { var current = document.getElementById(‘rr’); var next = document.getElementById(‘yesReplace’); var back
To read the full article click on the 'post' link at the top.