• SupportSolved
  • Adding accessibility javascript to a buttonizer group

Good evening! I would love to know how to add the following Userway website accessibility javascript to my current button group on https://6and40brewery.com. Any thoughts are appreciated, thanks for making the time!

Scott

<script>(function(){var s = document.createElement("script");s.setAttribute("data-account","Va20ZXTeXx");s.setAttribute("src","https://cdn.userway.org/widget.js");document.body.appendChild(s);})();</script>

  • FabianDJ replied to this.
  • Hi marketyourcraft ,

    Thank you for the reply, we see what's going on. I suggest adding the following CSS to the site:

    #userwayAccessibilityIcon {
      display: none;
    }

    After adding the CSS, you should load in the UserWay 's JavaScript on page load instead of loading it in after clicking the button.

    Then, you should only have to use UserWay.widgetOpen(); to the custom JavaScript action, then it will work as intended 🙂

    Hello marketyourcraft !

    First of all, welcome to the Buttonizer family!

    You can change your "Button Action" to JavaScript funtions to imply JavaScript into the button

    Once you've done that you'll be able to press on "open JavaScript code editor"


    Now you can add your JavaScript code to the JavaScript Editor and save it!
    I hope this helps your case!

    Thanks for the quick response! I guess I was trying to include the accessibility button produced by the javascript in the actual button group. This pops a new button separate from Buttonizer in a different spot on the page, which isn't the best user experience. Any examples of similar javascript popups that could be consolidated into a single button group? That would be most helpful, thanks for your time.

    Hi marketyourcraft ,

    Thank you for the reply, we see what's going on. I suggest adding the following CSS to the site:

    #userwayAccessibilityIcon {
      display: none;
    }

    After adding the CSS, you should load in the UserWay 's JavaScript on page load instead of loading it in after clicking the button.

    Then, you should only have to use UserWay.widgetOpen(); to the custom JavaScript action, then it will work as intended 🙂

    7 days later

    May I add a quick note to this one? On https://6and40brewery.com over the past 24 hours, it seems the Accessibility popup isn't launching from the button tree. I'm trying to figure out if it's a cached or other issue, any thoughts? When you access the site after clearing any cache, does the Accessibility popup work for you? Cheers, I appreciate the help troubleshooting this. I'm also using WP-Rocket to help speed up the site - are there any file caching or other optimization settings that SHOULD NOT be used with Buttonizer?

    Good morning! Recently Jasper and team helped solve a problem I was having with Userway Accessibility tools. I'm not sure what in the settings for https://6and40brewery.com may have changed, but the Accessibility button is no longer working in the button tree. Any thoughts? Possible caching or optimizing conflict with WP-Rocket, or would you have any other troubleshooting tips? Much appreciated, thanks again for the help. Cheers!

    Sorry, it seems that the Usability Tool updated their javascript, which I hadn't yet reflected in the header of the site. Seems to be working now. Cheers!