Avatar of Alicia St Rose
Alicia St RoseFlag for United States of America

asked on 

Need to apply focus via keyboard to add to cart button for accessibility.

I've found a really good plugin for online ordering for restaurants. However, there is one major accessibility issue with it.

If you go to this page and only using the keyboard select any item, you'll see that once you get to the modal with add to cart button there is no way to focus it with keyboard.

https://orderdemo.wpwithheart.com/food-items/

Is there a workaround I can apply? Some javascript?

Accessibility is essential or else I can't use this plugin.

I've written to the devs, but just in case they are overwhelmed, I thought I'd see what I can do.
JavaScript* AccessibilityHTMLWordPress

Avatar of undefined
Last Comment
Alicia St Rose
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Alicia St Rose

ASKER

This seems to be working!

I just notified the plugin developer. He'd responded to my post that it would take some time to implement properly.
I found the file and the line to swap.

I'm going to see if there is some collateral damage elsewhere in the plugin from the change. Once I hear back I'll return with points or more elaboration!
Avatar of Alicia St Rose

ASKER

Perfect solution! The plugin dev is adding it to the next update!

Thank you!!
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Perfect solution! The plugin dev is adding it to the next update!

Cool, glad to know that
Avatar of Alicia St Rose

ASKER

Here's some follow up! The solution worked well for the button, focus and keyboard. Unfortunately, it broke the cart quantity editing. So, it turns out just adding href="#" did the trick.

I still think the points are rightfully rewarded based on my actual question. I just wanted to make sure all the details were here in the answer!

Hoppy Easter!!
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo