I need to make a an existing slider navigation controls accessible (wcag2), meaning --> to enable full keyboard support for the Prev and Next buttons. 1. first I need to make sure that the buttons get focus when the user is navigating with the tab key. 2. when the user press "ENTER" the slider will work the same way as the cicking with the mouse pointer on that button.
so far this is what I did:it solves the first problem but not the second one:(
jquery( document ).ready(function(){
jquery(".fusion-naprev").attr("tabindex","0").addClass("tab_enable");
jquery(".fusion-nanext").attr("tabindex","0").addClass("tab_enable");
jquery(".tab_enable").keypress(function(e) {
var code = e.keyCode || e.which;
if (code == '13'){
jquery(this).mouseover();
}
});