[jawsscripts] Re: Help with DOM traversing?

  • From: "Donald Marang" <donald.marang@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 20 Jul 2009 02:08:20 -0400

I got your answer, at least partially.  Internet Explorer uses <object> tags 
while Firefox and the rest of the world use the <embed> tag!  Try:

let embeds = dom.getElementsByTagName("object")



I remember putting examples of embedded Flash objects together when I was 
playing around with Flash accessibility last year.  To properly code the 
Flash page I had to write almost duplicate code for embed and object tags to 
support all browsers.  I included the code below.  If this page works in 
both IE and Firefox, they must be checking which browser is running to 
generating the appropriate tags.


I currently do not have BX installed.  When I attempted to install a copy I 
had around, it claimed my JAWS installation was corrupted.  I have had 
something wrong with my main account for months.  I have had to revert to 
version 10.0.512.  I have not used BX to explore the DOM.  Is doing this 
obvious?  It is explained in the documentation?  Are there any slick tricks 
or hints?

--- Start off Flash HTML code
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/G07tK-5Vj-w&hl=en&fs=1";>
</param>
<param name="allowFullScreen" value="true"></param>
<embed
src="http://www.youtube.com/v/G07tK-5Vj-w&hl=en&fs=1"; 
type="application/x-shockwave-flash" allowfullscreen="true" width="425" 
height="344"></embed></object>

Don Marang


----- Original Message ----- 
From: "Bryan Garaventa" <bgaraventa11@xxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Saturday, July 18, 2009 2:47 PM
Subject: [jawsscripts] Re: Help with DOM traversing?


> No, the home page has them, they are dynamically added though, so you 
> won't
> see them in the source.
>
> If you run the sample code though, you should hear 30 for the param tags,
> and 0 for the embed tags. If you use BX, you can capture the live DOM and
> see the dynamically added tags then.
>
> Thanks for the input, I may be able to find a work around, but it would be
> good to know why this method works on some elements, but not others.
> It's a bit strange.
>
> ----- Original Message ----- 
> From: "Donald Marang" <donald.marang@xxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Saturday, July 18, 2009 10:01 AM
> Subject: [jawsscripts] Re: Help with DOM traversing?
>
>
>> Hi Brian,
>>
>> I went to that site and searched the HTML source for those Tags.  I could
>> not find any instances of either.  Do you need to log in before you will
>> get
>> a page with embeds?
>>
>> I am still attempting to get similar JavaScript calls to create
>> collections
>> for edit boxes and buttons.  I have not been completely successful yet.
>> Apparently, these elements are not as simple as links, which I can
>> traverse
>> well.  Does capitalization of the tag matter?  I know HTML standards
>> prefer
>> all caps, but is not case sensitive.  JavaScript seems to prefer all 
>> lower
>> case.  My results in my tests are inconclusive yet.  Perhaps, because I
>> have
>> too many variables in the equation (unknown conditions, not script
>> variables).
>>
>> Don Marang
>>
>>
>> ----- Original Message ----- 
>> From: "Bryan Garaventa" <bgaraventa11@xxxxxxxxxxxxxx>
>> To: <jawsscripts@xxxxxxxxxxxxx>
>> Sent: Saturday, July 18, 2009 3:56 AM
>> Subject: [jawsscripts] Help with DOM traversing?
>>
>>
>>> Any JAWS scripters know what the problem with this script is? For some
>>> reason, I can't get an array of embed tags, though other tags work
>>> fine...
>>>
>>> var object params, object embeds, object dom, int count
>>> let dom = IEGetCurrentDocument ()
>>>
>>> ; The following returns the correct array
>>>
>>> let params = dom.getElementsByTagName("param")
>>> let count = params.length
>>> SayInteger (count) ; Shows correct number of param tags
>>>
>>> ; Yet the following does not work, even though the syntax is the same
>>> let embeds = dom.getElementsByTagName("embed")
>>>
>>> let count = embeds.length
>>> SayInteger (count) ; Always returns 0
>>>
>>>
>>>
>>> This can be tested at
>>>
>>> http://www.weightwatchers.com
>>>
>>> Which has approximately 30 param tags, and several embed tags.
>>>
>>>
>>>
>>> Any idea why this is happening?
>>>
>>>
>>>
>>> __________
>>> Visit and contribute to The JAWS Script Repository 
>>> http://jawsscripts.com
>>>
>>> View the list's information and change your settings at
>>> //www.freelists.org/list/jawsscripts
>>>
>>
>> __________
>> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>>
>> View the list's information and change your settings at
>> //www.freelists.org/list/jawsscripts
>>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
> 

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

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

Other related posts: