{"action":"closed","issue":{"url":"https://api.github.com/repos/TelescopeJS/Telescope/issues/1063","labels_url":"https://api.github.com/repos/TelescopeJS/Telescope/issues/1063/labels{/name}","comments_url":"https://api.github.com/repos/TelescopeJS/Telescope/issues/1063/comments","events_url":"https://api.github.com/repos/TelescopeJS/Telescope/issues/1063/events","html_url":"https://github.com/TelescopeJS/Telescope/issues/1063","id":93920249,"number":1063,"title":"Search field problematic for keyboard-only users","user":{"login":"ndarilek","id":1172,"avatar_url":"https://avatars.githubusercontent.com/u/1172?v=3","gravatar_id":"","url":"https://api.github.com/users/ndarilek","html_url":"https://github.com/ndarilek","followers_url":"https://api.github.com/users/ndarilek/followers","following_url":"https://api.github.com/users/ndarilek/following{/other_user}","gists_url":"https://api.github.com/users/ndarilek/gists{/gist_id}","starred_url":"https://api.github.com/users/ndarilek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndarilek/subscriptions","organizations_url":"https://api.github.com/users/ndarilek/orgs","repos_url":"https://api.github.com/users/ndarilek/repos","events_url":"https://api.github.com/users/ndarilek/events{/privacy}","received_events_url":"https://api.github.com/users/ndarilek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-09T00:22:47Z","updated_at":"2015-08-01T03:30:26Z","closed_at":"2015-08-01T03:30:26Z","body":"As a blind user, I find myself arrowing through Telescope sites to pass the search field. Only, I notice that I often find myself on the /search route without having consciously done anything to get there. I dug in the code and found this in the keyup event handler:\r\n\r\n    'keyup .search-field, search .search-field': function(e){\r\n      e.preventDefault();\r\n      var val = $(e.target).val(),\r\n          $search = $('.search');\r\n      if (val === '') {\r\n        // if search field is empty, just do nothing and show an empty template\r\n        $search.addClass('empty');\r\n        Session.set('searchQuery', '');\r\n        Router.go('search', null, {replaceState: true});\r\n      } else {\r\n\r\nSeems like you're tracking empty search values, but you're still redirecting to the search route. Maybe the assumption is that all keyboard input triggers a search, but this isn't true for keyboard-only screen reader users examining the site via arrows and just so happening to be on the search field.\r\n\r\nNot sure what the best fix is:\r\n\r\n * Leave the existing route intact if the field is empty. Perhaps navigate to the previous route if the user is on the search page already and clears the field. The idea is that clearing the search field should restore the app's previous state, but either way it needs to not trigger just because the user presses an arrow on the search field.\r\n * Don't change the route at all if the field is empty.\r\n * Don't change the route if the new field value equals the old value. This should handle keyboard navigation, tab traversal, empty fields, etc. but would require tracking previous state of the field. Also, don't change to the search route if the field is empty.\r\n\r\nHoping this can be resolved as it's something I'm regularly hitting on Telescope sites. Even so, it's definitely among the friendliest community packages I've used in light of all the previous a11y fixes. :)"}}