Hi Rick,
My Breaking News app uses the web page for the ability to use all links,
exposing the title, text or header for each link. Yes, you can not use the
buttons, but that option is the hotkey, Ctrl G to go to the web page from
the Tree View, or if downloaded the page into the editbox then you can use
the enter key, which you can also use when listing the page links.
Now Rick, if you get the window object of the web page being displayed in
your browser then just use the window.document object creation for any web
page objects.
I had mentioned the W3 school web page for it explains all the
properties and methods you would be using once you get the window.document
object
http://www.w3schools.com/jsref/dom_obj_document.asp
Now all you have to do is write a script with hotkeys to do what you
would like to do on that page yourself, but many would be duplicated by
Windoweyes.
When going to that link the properties and such are listed in
alphabetical order and the one at the top of the list is the action which
tells you what has focus on the page.
You can get the list of your choice of elements on the page and your app
would have to decide on what you are really interested in, but that is your
choice.
My Breaking News app at least allows you to read off line anything, most
of everything that gets displayed, but there are dynamic things, events
triggered by key and mouse movements you use while on the page. You can even
monitor those events and maybe get more information using the property and
methods of the window.document.
So, an app that fetches the window object of that page is where you
start. Then get the object for the web page document as you described below
and that is: window.document and then you can use all the properties and
methods described at the W3 school web site:
http://www.w3schools.com/jsref/dom_obj_document.asp
So, write a simple app that captures the web page window and play with
it. Have fun doing specific things, since all web pages are different. I am
sure based on what web page gets displayed you could have a specific app
utility to do what you want just for that web site, for you can get the data
off of the Title Bar and any element on that page.
So, I will mention what I download from the HTML page into my Breaking
News Editbox and let you decide on what to use.
Snap Shot Of W3 School downloaded HTML page:
The document itself is a document node
All HTML elements are element nodes
All HTML attributes are attribute nodes
Text inside HTML elements are text nodes
Comments are comment nodes
Heading Two:
The Document Object
When an HTML document is loaded into a web browser, it becomes a document
object.
The document object is the root node of the HTML document and the "owner" of
all other nodes:
(element nodes, text nodes, attribute nodes, and comment nodes).
The document object provides properties and methods to access all node
objects, from within
JavaScript.
Tip:
The document is a part of the Window object and can be accessed as
window.document.
Heading Two:
Browser Support
Object
Document
The Document Object is supported in all major browsers.
Heading Two:
Document Object Properties and Methods
The following properties and methods can be used on HTML documents:
Property / Method
Description
document.activeElement
Link=160: prop_document_activeelement.asp
Returns the currently focused element in the document
document.addEventListener()
Link=161: met_document_addeventlistener.asp
Attaches an event handler to the document
document.adoptNode()
Link=162: met_document_adoptnode.asp
Adopts a node from another document
document.anchors
Link=163: coll_doc_anchors.asp
Returns a collection of all <a> elements in the document that have a
name attribute
Bruce
Sent: Saturday, March 19, 2016 5:39 AM
Subject: RE: Learning How To Dig Into A Web Page To Make It Accessible
Hi Guys:
To get an answer to this question we need to do a little analysis and answer
a few questions me thinks.
First, a Website is really just a text document like you type into notepad
and it can do nothing unless that text file is read into a computer program
that will parse the text and take actions against the operating system on
the contents, keywords it finds in the text we call things like html and
java script and all those names for the various outline structures. The html
and other tags and methods are all just like if you created an outline for a
text document in this respect.
To get this text document to do something it is read as input into a
computer program called a browser like Internet Explorer created by
Microsoft.
Thus the web pages are just text documents and when you fire up one in
Internet Explorer the browser reads this text document and parses the html
tags and other structures like methods and then tells the operating system
what the text document wants it to do and you get a working web site. The
browser handles any keystrokes and processes them using the tags and methods
defined in the web page source code - the text document as it were.
When you download the source code, like Bruce does I think, you are just
downloading a snapshot of the text document that the browser is using so you
get just a text document with a simple http download.
So, just using the text tocument there is little you can do about impacting
the currently running web page in the browser without some way to tell the
browser, Internet Explorer for example, what you want it to do.
That is you have to tell the browser to move to some item or to click on
something or even to click on some list item where it currently is not
working due perhaps to the web page not enabling a link other than via java
script or something worse.
Now, there is software, computer programs built into the Windows Platform
and developed by third party software that will allow for interacting with
the browser but it has been a long time since I did anything with web sites
and even longer since I did any scripting for WindowEyes.
The text document is made available as a Document Object Model and there may
be a accessibility document object model provided by Microsoft when working
in Internet Explorer since this is some type of standard.
Using a browser control, for example, in visual studio I can work with the
document object to do things like search for objects, click things and even
add or remove objects from a web page created by anyone out there on the
internet for the most part - that is the html, I am not sure about java
script and methods but I think that should be doable as well.
If I remember, Microsoft allows scriptors to interact with a web page via
the use of UIA document object model objects and methods but I forget almost
everything about using the native UIA to interact with a web page while the
browser is running.
This is the overview as I understand it, at least as I sort of remember it,
that we have to understand before considering scripting a web page.
Now, Aaron or Chip or others, clean up this overview and add or correct my
understanding or even add the correct tool names for working with the native
or managed version of the UIA dom from within WindowEyes scripting model or
even a external script if you can since this is really a new leg in creating
scripts and way diferent from a desktop app script most scriptors are
familiar with and wee need to have a common set of terms if we are going to
look at scripting web pages, we need objects, tools and names of things so
we can communicate.
Finally, we need the url to the web page with the list of links in the menu
or whatever so we can test it out on our various platforms just in case
there is an easy work-around and we don’t have to slog through learning how
to script a web page using WindowEyes which is really not setup to make this
easy.
Rick USA
-----Original Message-----
From: Scripting
[mailto:[email protected]] On
Behalf Of Chip Orange via Scripting
Sent: Friday, March 18, 2016 4:21 PM
To: 'Joseph LaFauci' <[email protected]>; 'Window-Eyes Scripting List'
<[email protected]>
Subject: RE: Learning How To Dig Into A Web Page To Make It Accessible
Hi Joe,
Are you familiar with HTML?
The only example script which I've ever seen, which was written to improve
the accessibility of a web page, was written by an author who was familiar
with xml/html.
It used the .NativeObjectModel property to get to the IE document object
model so that it could examine the html elements of a page, once it had
determined that the page in question was the one for which further info was
being saught. It then worked its way down through frames and tables and TD
elements to find the one containing the information being desired, it
extracted the information, and spoke it.
This was designed to give the user some needed information very quickly for
an employment situation. I've not seen an example of any scripting which
tried to manipulate the page to change focus, activate controls, etc.
If you're familiar enough with the IE DOM perhaps you know if this can be
done through it (I would think so), but I don't know enough to be of much
help. I have only a slight reading ability with xml and html, and as I
understand things, you'd have to be able to accomplish whatever you need via
the IE DOM; I don't think the WE scripting object gives you much in the way
of page contents or manipulation abilities.
Sorry I can't be of more help, but if you're expertese does lie in the
xml/html arina, then perhaps you can move forward.
Good luck,
Chip
Chip Orange
Florida Public Service Commission
Computer Systems Analyst
850-413-6314
-----Original Message-----
From: Scripting
[mailto:[email protected]] On
Behalf Of Joseph LaFauci via Scripting
Sent: Tuesday, March 15, 2016 9:53 PM
To: Window-Eyes Scripting
Subject: Learning How To Dig Into A Web Page To Make It Accessible
Greetings everyone!
Can anyone suggest a place to start in learning about the browse objects and
other necessary info in order to be able to figure out how to make a
stubborn web page more accessible?
I have a particular one which has three (sort of) menu drop-downs but they
show up as lists and are not clickable in any way. I am not even able to
route the mouse pointer to them. Actually, I have succeeded in routing to
the items once or twice but it is certainly not consistent.
If a sighted person clicks one of the list items for me, the menu expands
and the resulting menu items are clickable.
My goal is to accurately get the mouse to the desired list item and click it
so the menus can be accessed.
I am working with the web page designers to make it accessible, but in the
interim (how ever long that may be), I thought I’d try to tackle it with
scripting. So far that is quite a challenge for me as I haven’t done much
with web pages in scripts.
One of these days I will have to take a script class for Window-Eyes.
Meanwhile, I wish we had a really good scripting book.
Does anyone have any ideas?
Thanks.
Joe
Joseph LaFauci
Web: http://www.joeleah.com
Blog: http://www.understandingscripture.com
Feed: http://feeds.feedburner.com/wantedinhellnamedinheaven
Twitter: http://www.twitter.com/ka9opl
Skype: ka9opl
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com/attachments/20160315/d576f78c/attachment.htm>
_______________________________________________
Any views or opinions presented in this email are solely those of the author
and do not necessarily represent those of Ai Squared.
For membership options, visit
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/corange%40psc.state.fl.us.
For subscription options, visit
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com
_______________________________________________
Any views or opinions presented in this email are solely those of the author
and do not necessarily represent those of Ai Squared.
For membership options, visit
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/ofbgmail%40mi.rr.com.
For subscription options, visit
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com
_______________________________________________
Any views or opinions presented in this email are solely those of the author
and do not necessarily represent those of Ai Squared.
For membership options, visit
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/lab4me%40fltg.net.
For subscription options, visit
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
_______________________________________________
Any views or opinions presented in this email are solely those of the author
and do not necessarily represent those of Ai Squared.
For membership options, visit
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com