Good morning;
I've got a fairly critical and urgent problem; a line in the main jPlayer script is breaking ALL links on a page for users that rely on the keyboard (blind, disabled etc).
Example:
Visit:
http://www.bbc.co.uk/news/ , press "tab" 8 times, "weather" will be highlighted. Press enter/return and you will be on the weather site.
This is 100% universal standard across all browsers and all operating systems and is expected and relied up for keyboard-only users.
Now try this:
And just to be sure it's not something about the site, try
http://jplayer.org/, tab 8 times, press enter, and you get the support page, as it should be.
This is also a particular issue for the playlist, as users can't "click" a playlist item with the keyboard.
I found and commented out
event.preventDefault(); // Key being used by jPlayer, so prevent default operation. which lives
here at line 450.
Great! My links were working, keypresses were still working, I could now tab onto jplayer control keys to activate them with the enter key (still have to sort out why the keys lose focus but working on it!).
Except... when you hit a playlist item with the enter key now, it loads the file. Incidentally, I've changed the playlist links to reduce the clutter for screenreader users; they play when you click but retain default download functionality when you right click. I know I always complain when people don't post full links to working sites, but I really can't! But my playlist looks like this:
<div class="jp-playlist">
<ul role="listbox" class="lead" style="display: block;">
<li class="jp-playlist-current">
</div>
</li>
<li>
</div>
</li>
</ul>
</div>
I spend most of yesterday going through Stackoverflow, jQuery site etc trying to work around this myself, but gave up.
So what I would really like is for everything to function as it does after removing the event.preventDefault() line but for JUST the playlist region to accept "enter" as a method of playing the currently highlighted item.
Also, is there are way of "overriding" an existing function, in this case keyBindings = function(event)?
Messing with the core code every time jplayer updates is going to be a pain, and I guess that line is there for good reasons in use cases I'm not dealing with.
OR is there a jQuery function I've not found which restores "click on enter" functionality for all links? Everything I tried either didn't work cross-browser, or got nullified by jplayer.
Many thanks for any help!