cloudbearings / ez-access-web

Automatically exported from code.google.com/p/ez-access-web
0 stars 0 forks source link

Thoughts about parsing DOM for navigable nodes. #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This post is for discussion and should not be acted on just yet... In HTML 
4.01, there was a concept of block-level and inline-level elements. Basically, 
block-level elements create larger structures (and often begin on new lines) 
while inline-level elements are sections or phrases within the larger 
structure. HTML 5 seems to have partially done away with these concepts and 
instead has a different content model (see 
http://www.vanseodesign.com/web-design/html5-content-models/). In a sense, HTML 
4 was more restrictive than HTML 5 is--this makes parsing the DOM for EZ 
Access-navigable nodes a little bit more tricky.

Interactive end/leaf nodes--these are always the final navigable node 
regardless of content that it contains. If developers put weird content in 
here, it is their problem!
See the list of interactive elements at: 
http://www.w3.org/TR/html5/dom.html#interactive-content

- Also <area> (a hyperlink area of an image map)
- Also <command> (at risk in HTML5)
- Note that <a> without an href are not considered interactive (at least by 
me). (Really old school <a name="...">)
- Note that explicit and implicit <label>s are to be removed from the 
navigation order. I'm unsure what to do with an "orphaned" label. 

We could also make any element with the onclick attribute an end/leaf note by 
default. This would allow a person to interact with it using EZ Access. The 
problem I see with this are nested elements that have onclick behaviors. How 
does the person interact with both the parent and with its children using EZ 
Access? Do we automatically navigate to the onclick parent, then allow 
DOM-order navigation through its interactive/onclick children? From what I 
gather, this bubbling/capturing of nested onclicks is not used all that often 
these days, so we might just be safe making any onclick element the end/leaf 
node.

Note: Parsing, navigating, and reading tables is out of scope of this 
discussion. We will have that discussion later.

For reading on block- & inline-level elements see:
http://www.w3.org/TR/html401/struct/global.html#h-7.5.3
http://www.w3resource.com/html/HTML-block-level-and-inline-elements.php

Original issue reported on code.google.com by jbjor...@gmail.com on 6 May 2013 at 4:24

GoogleCodeExporter commented 9 years ago
List of all HTML 5 tags from http://www.html-5-tutorial.com/all-html-tags.htm.

These are my gut feelings for the "navigability" of each HTML 5 element. Note 
that some elements in the list are deprecated and others are at risk, but are 
included here for completeness (and it forces me to think about them).

LEGEND
I = Interactive--must be a leaf node.
I* = may be interactive--is a leaf node if interactive.
NN = non-navigable by default, the parent (grand-parent) should be navigated to 
as appropriate
G = Grouping/structural element, not navigable by default, it's children may be 
navigable. If there are no child elements (just text, images), then perhaps 
these elements should be navigable.
T = Typically navigable as long as it does not contain interactive (I, I*) or 
other typically navigable elements (T).
V = Void element contains no content and isn't usually displayed or interacted 
with.

<a> I (if href, otherwise NN)
<abbr> NN
<acronym> NN (deprecated)
<address> T
<applet> I (deprecated)
<area> I
<article> G
<aside> G
<audio> I*
 NN
<base> V
<basefont> V (deprecated)
<bdi> NN
<bdo> NN
<big> NN (deprecated)
<blockquote> T (b/c it is kind of like a paragraph)
<body> G
<br> V
<button> I
<canvas> I???
<caption> table
<center> NN (deprecated)
<cite> NN
<code> NN
<col> table
<colgroup> table
<command> I (at risk?)
<datalist> NN (typically used in conjunction with text input fields)
<dd> T
<del> NN
<details> I (at risk)
<dfn> NN
<dir> NN (deprecated)
<div> G/T (this is tricky because it could be used like a <p> or just as a 
container)
<dl> G
<dt> T
<em> NN
<embed> I
<fieldset> G
<figcaption> NN (ideally should be read as part of a <figure>)
<figure> T
<font> NN (deprecated)
<footer> G
<form> G
<frame> G (deprecated)
<frameset> G (deprecated)
<h1> - <h6> T
<head> V
<header> G
<hgroup> G
<hr> V
<html> G
<i> NN
<iframe> I
<img> I*/NN??? (this we need to discuss more)
<input> I (except hidden)
<ins> NN
<kbd> NN
<keygen> I
<label> I (but grouped with associated control)
<legend> T (but I have suggested behavior for prepending the legend on controls 
if a special attribute is used)
<li> T
<link> V
<map> G
<mark> NN
<menu> I*/G
<meta> V
<meter> NN
<nav> G
<noframes> G (deprecated)
<noscript> V
<object> I*
<ol> G
<optgroup> G
<option> (part of <select>, navigable when select is "active")
<output> NN
<p> T
<param> NN
<pre> T
<progress> NN
<q> NN
<rp> ruby
<rt> ruby
<ruby> ruby
<s> NN
<samp> NN
<script> V
<section> G
<select> I
<small> T (when used correctly as a section of fine print)
<source> V
<span> NN (except for ones EZ Access creates as wrappers)
<strike> NN (deprecated)
<strong> NN
<style> V
<sub> NN
<summary> I? (at risk, associated with <details>)
<sup> NN
<table> table
<tbody> table
<td> table
<textarea> I
<tfoot> table
<th> table
<thead> table
<time> NN
<title> V
<tr> table
<track> V
<tt> NN (deprecated)
<u> NN
<ul> G
<var> NN
<video> I*
<wbr> V

Original comment by jbjor...@gmail.com on 6 May 2013 at 5:02

GoogleCodeExporter commented 9 years ago
ARIA roles that are interactive and should be the end/leaf node.

button
checkbox
combobox
command (abstract)
input (abstract)
link
listbox
-- option
menu
-- menuitem
-- menuitemcheckbox
-- menuitemradio
progressbar??
radio
range (abstract)
scrollbar
select (abstract)
slider
spinbutton
tab
textbox
timer??
widget?? (abstract)

Groups of interactive controls
grid (similar to a table)
menubar
radiogroup
tablist
toolbar
tree
treegrid

Original comment by jbjor...@gmail.com on 7 May 2013 at 2:36

GoogleCodeExporter commented 9 years ago
I've started on this -- The latest revision does not parse past buttons or 
inputs.

You can see this here:
https://mywebspace.wisc.edu/jbjordan/web/ez/images.htm

Original comment by aeharding on 28 May 2013 at 8:59

GoogleCodeExporter commented 9 years ago

Original comment by aeharding on 27 Aug 2013 at 6:21

GoogleCodeExporter commented 9 years ago
Navigation has been addressed through numerous code changes.

Original comment by jbjor...@gmail.com on 17 Sep 2013 at 3:48