Accessibility/DOMTreeMapping

< Accessibility
Revision as of 06:41, 28 October 2011 by Surkov.alexander (talk | contribs) (Created page with "=What is this= This document describes the mapping between DOM and accessibles trees. =Current state= Existing problems are: #Tree update bugs ##imagemap ##listbox #Unoptimal tr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

What is this

This document describes the mapping between DOM and accessibles trees.

Current state

Existing problems are:

  1. Tree update bugs
    1. imagemap
    2. listbox
  2. Unoptimal tree update.

What we need that for?

We need to map DOM tree to accessible for following proposes:

  1. content insertion
  2. content removal
  3. DOM point to offset

Thoughts Heap

content insertion:

 walker: find insertion point (walker move forward within container accessible subtree starting _after_ anchor,
                                              first accessible, if no entry then append as container child)
 bulder: find accessible from inserted content subtree including root (creator, walk anchor subtree)

content removal:

 walker: find removal point (walker move forward within anchor subtree, all accessible siblings within DOM subtree)

GetFirstAvailableAccessible

 walker: root, anchor, move forward

DOM point to offset

 node, offset pair to DOMWalker anchor,position, (forward/backward walker within hypertext subtree)

image map: insertion/removal insertion point when accessibles with altered insertion point relative DOM are encountered

 (within accessible or children of another accessible)

fire alert/menupopup events on insertion/removal shutdown the subtree (not after coalescence!)

insertion algorithm: 1) insertion notification: ignore if parent/container was changed (what about visibility changes?) 2) traverse subtree of insertion, get (assert)/create an accessible 3) where to insert? 3.1) parent accessible 3.1.1) child is adopted by other container (map element, checking tag name - area and primary frame - image) 3.1.2) child is kept by direct container 3.2) insertion point within parent accessible

if child is adopted then look for adopted sibling relative DOM tree otherwise get sibling relative DOM tree no sibling then insertion into the end

binding to parent

  1. if sibling is adopted

3.2.1) is insertion point altered 3.2.2) original insertion point