onclick Alert message fails on JAWS reader

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
webchick
 
 
Posts: 10
Joined: Fri Jan 07, 2022 1:48 pm

onclick Alert message fails on JAWS reader

Post 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.
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: onclick Alert message fails on JAWS reader

Post 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
webchick
 
 
Posts: 10
Joined: Fri Jan 07, 2022 1:48 pm

Re: onclick Alert message fails on JAWS reader

Post 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
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: onclick Alert message fails on JAWS reader

Post by BaconFries »

This is what I was referring to!
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: onclick Alert message fails on JAWS reader

Post 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;
webchick
 
 
Posts: 10
Joined: Fri Jan 07, 2022 1:48 pm

Re: onclick Alert message fails on JAWS reader

Post 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
webchick
 
 
Posts: 10
Joined: Fri Jan 07, 2022 1:48 pm

Re: onclick Alert message fails on JAWS reader

Post 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>
webchick
 
 
Posts: 10
Joined: Fri Jan 07, 2022 1:48 pm

Re: onclick Alert message fails on JAWS reader

Post 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
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: onclick Alert message fails on JAWS reader

Post 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?
webchick
 
 
Posts: 10
Joined: Fri Jan 07, 2022 1:48 pm

Re: onclick Alert message fails on JAWS reader

Post 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.
wwonderfull
 
 
Posts: 1439
Joined: Fri Aug 21, 2020 8:27 am
Contact:

Re: onclick Alert message fails on JAWS reader

Post 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.
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: onclick Alert message fails on JAWS reader

Post 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.
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: onclick Alert message fails on JAWS reader

Post 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?
Post Reply