Tweaking Kwicks accordion plugin for accessible keyboard navigation

Tweaking Kwicks accordion plugin for accessible keyboard navigation

I'd like the Kwicks accordion implemented here to open up the next accordion section when the first url link in that section hasfocus / is tabbed onto via keyboard as opposed to using mouseenter to trigger the next section opening via mouse control.

Here's the script to which I've added the corrections that were suggested in the comments on Jeremy Martin's blog. See the comments at the top. 
http://www.tzcdev.com/js/jquery/kwicks/jquery.kwicks-1.5.1.js
I think it's a matter of getting the kwicks function to execute on either 'event: mouseenter' or 'event: onfocus'

If that's correct, then I need to add 'event: onfocus' to the following part of the script:

  1. (function($){
    $.fn.kwicks = function(options) {
    var defaults = {
    isVertical: false,
    sticky: false,
    defaultKwick: 0,
    event: 'mouseenter',
    spacing: 0,
    duration: 500
    };









So I guess I have two questions.

1 - Am I right about how to add recognition of the url that hasfocus?

2 - What is the syntax needed to get the kwicks function to execute for either event: mouseenter or event: onfocus?


Thanks in advance for any help.
















    • Topic Participants

    • vbd