We have a request to use the select onchange element to trigger a transition to a new page.
In the past, the web accessibility literature that I read generally did not recommend doing this. This was on the grounds that it violates the expectations of users, and browsers (especially IE <6) trigger a change event even when moving parameters using the keyboard, which makes it impossible to select only for keyboard users.
IE6 + and all other more modern browsers. I tested the fire select onchange when the option is really selected with the mouse or the enter key. Analytics for the application in question show that previously IE browsers were essentially destroyed (<0.01%)
Given that our users can only properly control these select elements using the keyboard, should this function still be considered an obstacle to accessibility? This behavior seems so common these days that I also wonder if it really violates user expectations in a meaningful way?
EDIT: IE behaves differently if select focuses on the mouse or keyboard. When you focus with the mouse, onchange doesnโt work when you configure the keys, but when you click on it to focus it from the keyboard, onchange works when scrolling.
javascript html accessibility onchange
Michael berkowski
source share