Page 1 of 1

onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 10:35 am
by webchick
JAW Reader - Dialog Box HELP needed

';return false; I think needs removed ??

Working with Tyler (Blind) with JAWS Reader and testing script on FDIC Links
https://www.fairfieldfederal.com/FDIC-N ... deral.html
The pop-up doesn't appear as a DIALOG box on his JAWS reader (so he can't tab to hear message) It just takes him directly to page.

TRIED 2 DIFFERENT FORMATS
<a href="https://www.fdic.gov/" onclick="alert('leaving Fairfield Federal website');window.location.href='https://www.fdic.gov/';return false;">CHANGES TO FDIC DEPOSIT INSURANCE COVERAGE</a>
______
<a href="#" class="dkmar" rel="nofollow" target="_blank" onclick="alert ('leaving Fairfield Federal website');window.location.href='https://www.fdic.gov/';return false;">FDIC PRESS RELEASES AND CONSUMER NEWS</a>

Found a second Accessibility script
https://accessibility.psu.edu/scripts/alertboxes/#basic
- He was able to hear dialog box (on pop-up) and JAWS read the content of the box (pop-up)
<a href="#basic" onclick="javascript:alert ('False. It only mandates that the PDF be accessible or that there is an accessible format available for an inaccessible PDF.')">View Answer&nbsp;</a>

Since third party website - we are implementing - "Leaving website" to reduce liability of WCAG issues and alerting users you are leaving.

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 10:49 am
by BaconFries
In general there is no help with 3rd party scripts as it is understood that if you wish to use you will understand how to implement yourself. Maybe the following will help.
See the following:
return true

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 11:16 am
by webchick
This isn't a third party script?

onclick="alert is WBS script
- the return false/true -- is not required. I don't see in WBS script where to remove

also WBS doesn't have JAVASCRIPT mentioned on the onclick="alert so JAWS doesn't understand the script (to open dialog box to reader)
onclick="javascript:alert

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 11:26 am
by BaconFries
This is what I was referring to!

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 11:51 am
by Pablo
The reason why 'return false' is added is because otherwise the default click behavior will also be executed. In most cases, this is not what you want.
However, if you do want this, then you can add 'return true' to the code yourself.

So, instead of

Code: Select all

alert('enter your message');
use

Code: Select all

alert('enter your message'); return true;

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 12:18 pm
by webchick
I'll make a video and send over to you on JAW reader issue.

I've changed the first link
https://www.fairfieldfederal.com/FDIC-N ... deral.html

<a href="#" onclick="alert('leaving Fairfield Federal website');window.location.href='https://www.fdic.gov/';return false;">CHANGES TO FDIC DEPOSIT INSURANCE COVERAGE</a>

I'll test today - but I have to ask, the Return False or TRUE -- where is the control of this on
Link, Events, onclick

Image

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 12:23 pm
by webchick
Modified
https://www.fairfieldfederal.com/FDIC-N ... deral.html

<a href="https://www.fdic.gov/" onclick="alert('leaving Fairfield Federal website'); return true;window.location.href='https://www.fdic.gov/';return false;">CHANGES TO FDIC DEPOSIT INSURANCE COVERAGE</a>

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 12:29 pm
by webchick
I removed the link from the JS onclick link
refresh page: https://www.fairfieldfederal.com/FDIC-N ... deral.html

<a href="https://www.fdic.gov/" onclick="alert('leaving Fairfield Federal website'); return true;return false;">CHANGES TO FDIC DEPOSIT INSURANCE COVERAGE</a>

False appears above

Screenshots
Image
Image

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 1:36 pm
by Pablo
I can not help you with third party scripts.

But what code do you need to add to make JAWS reader work?
And why do you need events to add that code?

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 4:05 pm
by webchick
Using events --- Unless you have a better idea

But need a message pop-up for users

Alerts are needed when leaving website for outside links (message - leaving website) so user will know we are not liable for ADA issues outside the current website.

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 4:16 pm
by wwonderfull
Why not use a modal to do the same thing. The purpose is to make the user know he is being redirected to another link. You can use a pop up also. If you want quick solution I think you should use a popup modal. I as a User recommend.

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 4:20 pm
by BaconFries
Understood, but it isn't directly related to the use of the software, but a requirement of the website and the disability act of (law or state) the country in your case USA. In this case it will require a third party script and your understanding how to use and implement so that it works in all browsers and the screen reader ot the device of the user using the site.

Re: onclick Alert message fails on JAWS reader

Posted: Sun Jun 12, 2022 5:07 pm
by Pablo
I'm sorry, but it is still not clear what the problem is. The event seems to be working based on your settings.
What is the intended behavior?