ngAria bindKeypress: IE9/IE11 doesn't fire some 'keypress' events on DIV, LI #11287
Description
Dear ngAria/a11y Angular devs,
I'm working on developing a highly accessible application in which Internet Explorer 9 (and eventually IE11) will be the primary browser target. In our application we've included the ngAria module, but have found that even though we can use keyboard navigation, not all keyboard events fire as expected in IE9/IE11.
Because of ngAria's bindKeypress
configuration, ngClick items also can get identical bindings for the 'keypress' event. This works great in Chrome where I've tested it. But if the elements are one of DIV, LI
the keypress event does not fire for the ENTER key in IE9/IE11.
Fiddle demonstrating this behavior: http://jsfiddle.net/kkoskelin/ag8hcknz/
Angular Versions tested: 1.3.14, 1.4.0-beta.5
Browser/OS: Internet Explorer 9 + Windows 7, Internet Explorer 11 + Windows 8.1
Suggested fix: Internet Explorer 9 will fire the keydown
event. This is also shown in the fiddle above. I've also tested by altering my local copy of angular-aria.js and changing the 'keypress' binding to 'keydown' at line 336 of
https://github.com/angular/angular.js/blob/master/src/ngAria/aria.js#L336
such that it reads
elem.on('keydown', function(event) { ...
I've attempted to use $provide.decorator to alter the directive's behavior but haven't had any success.