I'm working with the following set up:
jQuery - 1.7.1
simplemodal - 1.4.2
And my problem is that for accessibility reasons I'd like to put focus on the modal window when it opens and allow users to hit the tab-key to go to the close-button and there click enter to close the window.
What I'm using simplemodal for on the page is just to show tables in full-size which does not fit on the original grid. I hence have no input fields or such, the only thing I can put focus on is the div working as a container for the simplemodal window, simplemodal-wrap
, and yes we are working with HTML 5.
I've followed the steps suggested here, tab order for links in a simplemodal dialog, which made me able to put focus on the close-link by extending the input variable to:
$('#simplemodal-container :input:visible:enabled, #simplemodal-container a:visible')
But this is where I'm stuck, I cannot manage to change this to also contain the div/table/content, and once the close-link has focus hitting enter-key has no effect.
Any suggestions, pointers, solutions?