[jawsscripts] Re: Clicking a blank div.

  • From: "Travis Roth" <travis@xxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 8 Jul 2015 11:29:41 -0500

Hi Jonathan,
I once wrote a description of how I did some monitoring on a web page. Some of
the monitoring was inside a frame. Check out this post:
http://www.travisroth.com/2013/10/monitoring-web-page-dynamic-updates-with-jaws-step-by-step/

The relevant part you are probably interested in is
dom = IEGetCurrentDocument () ; JAWS function to get pointer to currently open
and focused page
frame = dom.frames ;retrieves the array of frames on the page
footer = frame(“footer”) ;only need this one
doc = footer.document
quote = doc.getElementById(“tdLast”); the table cell element with the quote


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Jonathan C. Cohn
Sent: Friday, May 22, 2015 6:56 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Clicking a blank div.

What if the div is wrapped in a frame? I tried to get this div but could only
seem to retrieve frame set and frame elements. Any help would be appreciated.


Jonathan Cohn

On May 22, 2015, at 1:56 PM, Bob <temp@xxxxxxxxxxxxxxx> wrote:

Do what Scott said, that’s a much more sensible idea.
Too much travel and not enough sleep this week!


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Scott Huey
(Redacted sender "smartinhuey@xxxxxxxxx" for DMARC)
Sent: 21 May 2015 23:04
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Clicking a blank div.

Better option, I'd say, would be to use similar code to inject attributes
onto the Div themselves. Assign them role="button" and an appropriate
aria-label, and Jaws should treat them appropriately. A button role would be
preferable here, as Jaws will naturally prefer to send Click events rather
than keypress events, which should invoke the handlers on the Divs as
expected.



On May 21, 2015, at 4:08 PM, Bob <temp@xxxxxxxxxxxxxxx> wrote:

This may not work as we are relying on creating a link with the same
onclick value and it having the same effect in the javascript as the
original div.

Note though that the style display:none in the third div in your code
tells jaws that the element isnt to be visible so this method
definately wont help with that one. You could do something similar
though to overwrite the style.

The function below takes the last word of the class as the text to
use for a link that has the same javascript assigned to it as the original
div.
Its also worth trying not assigning the onclick value to the link as
clicking a link inside the div that doesnt do anything may also
trigger the javascript on the parent div.

Void Function WorthAGo ()
Var
Object DOM, Object AllDivs, Object CurrentDiv,
String sClassName, String sOnClick, String sLinkText

Let DOM = IEGetCurrentDocument ()
Let AllDivs = DOM.getElementsByTagName("DIV")

ForEach CurrentDiv in AllDivs

Let sClassname = CurrentDiv.className

If StringContains (sClassName, "moduleListAction") Then

Let sOnClick = CurrentDiv.getAttribute("onclick")
Let sLinkText = StringSegment (sClassName, " ", -1)

Let CurrentDiv.innerHTML = "<a href=\"#\"
onclick=\""+sOnClick+"\">"+sLinkText+"</a>"

EndIf

EndForEach

EndFunction


On 20/05/2015 23:55, Darragh Ó Héiligh wrote:
Hello,
I'm using a web tool at the moment that has cklickable div's with
absolutely nothing inside them.

Is there any way I can get Jaws to firstly see these Divs and secondly,
click them?

The source of the div's is below:

<div class="moduleListAction fa fa-gear popupOpener"
title="Options" onclick="$(this).popUp({ persistence:true, targetAjax:
'/admin_email-notifications/index/options/type/2001',
onSuccess:function(){if($('#select_cc').length >
0){$('#select_cc').multipleSelector();}} })"></div>
<div class="moduleListAction fa fa-edit" title="Edit"
onclick="$.colorbox({scrolling:false,
href:'/admin_email-notifications/index/edit-notification/type/2001',
onComplete: function(){ notificationEditLoad() } });"></div>
<div class="moduleListAction fa fa-times-circle"
style="display:none" title="Disable" onclick="$(this).addClass('fa-spin
fa-spinner');
$.ajax({url:'/admin_email-notifications/index/toggle-status/type/2001',
success:function(html){
$('#admin_email_notifications_list').replaceWith(html); }});"></div>
<div class="moduleListAction fa fa-check-circle"
title="Enable" onclick="$(this).addClass('fa-spin fa-spinner');
$.ajax({url:'/admin_email-notifications/index/toggle-status/type/200
1
', success:function(html){
$('#admin_email_notifications_list').replaceWith(html); }});"></div>

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

__________

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

Other related posts: