Support ForumTabs, Toggles, and Accordions operated via keyboard – Support Forum https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/feed/ Sun, 05 May 2024 15:37:04 +0200 http://bbpress.org/?v=2.5.12-6148 en-US https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/#post-15518 <![CDATA[Tabs, Toggles, and Accordions operated via keyboard]]> https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/#post-15518 Fri, 23 Jun 2017 21:24:37 +0000 COFWebmaster Hello,
The Tab/Accordions on your theme can not be operated via keyboard, this means they fail ADA scans, and since we are a city we need to be able to pass ADA scans. Is there a way to make them keyboard operable? When you tab though the page they never get focus so they can never be opened unless you are using a mouse. Please help. Need to be able to use them with keyboard only.
Thank you,
Gavin

]]>
https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/#post-15525 <![CDATA[Reply To: Tabs, Toggles, and Accordions operated via keyboard]]> https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/#post-15525 Mon, 26 Jun 2017 15:12:08 +0000 IshYoBoy Hi Gavin,

yes it is possible :)

1. You have to add attribute tabindex for clickable part of accordion / toggle element. So simple add this one line of code into your js file
jQuery('.ish-tgg-acc-title').attr('tabindex', '0');

2. And then add this short snippet:

Now it works for these keyboard keys: space bar, arrow up, arrow down.
You can change it as you need. ( Number 37 is left and 39 is right arrow. )

Let us know if it helped.

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>
https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/#post-15526 <![CDATA[Reply To: Tabs, Toggles, and Accordions operated via keyboard]]> https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/#post-15526 Mon, 26 Jun 2017 16:10:04 +0000 COFWebmaster Hi,
In what JS file should I place these?
Thanks,
Gavin

]]>
https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/#post-15530 <![CDATA[Reply To: Tabs, Toggles, and Accordions operated via keyboard]]> https://support.ishyoboy.com/forums/topic/tabs-toggles-and-accordions-operated-via-keyboard/#post-15530 Tue, 27 Jun 2017 05:46:25 +0000 IshYoBoy Hi Gavin,

you can use child theme js file e.g. assets/js/my-custom.js
If you are not using any js file in your child theme, you can create one.

If you created this file, so you have to add this one line of code into functions.php of child theme into function multicorp_child_theme_enqueue_scripts to load added custom js file:
wp_enqueue_script( "child-main", get_stylesheet_directory_uri() . "/assets/js/my-custom.js", array('jquery'), null, true );

So function multicorp_child_theme_enqueue_scripts should looks like this:

Cheers

A 5 star rating is always a great motivation for us if you are happy with our theme or support!
Themeforest | MojoMarketplace | Creative Market

]]>