[jawsscripts] Re: using GetElementsByClassName in a script

  • From: Doug Lee <doug.lee@xxxxxxxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Mon, 9 May 2016 09:22:09 -0400

The short answer is no: You cannot use the GetDocumentXML() function and an XML 
tree to change an ARIA
attribute on an actual web page. It may look tempting though, for which reason 
I will say more...

When you get an XML tree, as is done in the mentioned SharePoint scripts, you 
may indeed spot some ARIA
attributes - and you can change them! The problem is that you're changing an 
XML tree that is completely
disconnected from the web page itself. Recall that the tree was built from a 
string of XML, and so by the time
you get the tree, there's no connection to the page from which that XML was 
built.

I'm afraid we may be migrating away from the ability to change web pages from a 
JAWS script in general; that
was always an IE-specific ability, and IE is fading as we know.

On Mon, May 09, 2016 at 08:59:02AM -0400, Jason Fayre wrote:
Ok, thanks! I'll take a look.
Can I use those functions to actually change an attribute in the DOM
though? I need to turn off the aria-hidden attribute so that JAWS can
see this particular button.



On 5/9/16, Jonathan Cohn <jon.c.cohn@xxxxxxxxx> wrote:

I believe you are stuck with the getXML and then using XML parsing commands
to get to the element in question. The Sharepoint scripts provided with the
JAWS use XML functions to grab the elements in the SharePoint toolbar and
present them in a dialog, this should give you a good starting point.


Best wishes,

Jonathan



On 9 May 2016, at 08:31, Jason Fayre <jfayre@xxxxxxxxx> wrote:

Hello everyone,
I'm still working on writing scripts for the internal credit card
application I mentioned a while ago.
I've run across a button that has aria-hidden=true set, so JAWS
doesn't see it. This site had another one just like this that I was
able to work around, but this one is giving me trouble. The button has
no ID set, but it does have a class. So, I should be able to use
GetElementsByClassName. The problem is that I'm not sure what type of
value this returns from a JAWS scripting standpoint. I thought it
returned an array, but that either isn't true, or I'm just not
accessing it correctly. Can anyone give me some pointers?
We are trying to reach out to the developers to get this stuff fixed,
but things are moving slower than we might like.
__________???

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


__________???

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


__________???

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

-- 
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:Doug.Lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller
__________�

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

Other related posts: