Hello! Will there be keyboard support added for paginat…
Hello!
Will there be keyboard support added for paginated quizzes to support accessibility?
If not, what are your suggestions for enabling that type of functionality, especially on paginated quizzes?
This thread has been imported from harmonicdesign.ca/hd-quiz/
Hi Ember,
a GREAT deal of work has been done to get HD Quiz to be WCAG compliant – in fact, the buttons (next, finish) are the only stand-outs. They are fully accessible to screen readers and announce themselves as buttons, but cannot be navigated with the keyboard – yet. This is because I need to make them as divs to ensure compatibility with all themes.
I used to have them as buttons, but you have no idea how many people are running terrible themes on their sites – themes that best case would make the buttons look ugly, and worst case, clicking the button would trigger some other poorly coded form elsewhere on their site.
I will be making these buttons keyboard navigatable, but there are still some challenges that need to be solved first since I need to essentially emulate the keyboard actions and allow tabbing (without the tabbing order being broken due to the aforementioned terrible themes).
For now, if you want to fake it / test it, you can try this one “simple” mod that might work for you and your theme – but not gurantees of course!
If you edit ./includes/functions.php
you will see functions hdq_print_jPaginate
and hdq_print_finish
. You will even see my dev notes “TODO: give tabindex = “0” once ready to fire off JS events to sim buttons”- proof that this is something I care about and am activly working on haha.
As the note implies, you can add tabindex = "0"
to the buttons. This will allow them to be tabbed onto with the keyboard. Now, depending on your browser and operating system this might be enough, but you will probably need to add some javascript as well with an event listener for keyup
and detect the space key. If space is pressed, click on the button.
I hope this makes sense and let me know if you need further help with the above and I can see what I can do
If you are enjoying HD Quiz please leave a review here on the official WordPress.org page. HD Quiz is developed by me, just some dude, and is supported and available for free. It may seem dumb, but truly nothing makes me happier than knowing that people are using and loving HD Quiz and my hard work.
This thread has either been marked as complete or has been automatically closed due to inactivity.