This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13214 - ACTION-850 Clarify text on node changes where the node is not an element or does not have an accessible object
Summary: ACTION-850 Clarify text on node changes where the node is not an element or d...
Status: RESOLVED FIXED
Alias: None
Product: ARIA
Classification: Unclassified
Component: Core AAM (show other bugs)
Version: 1.0
Hardware: PC Windows XP
: P1 normal
Target Milestone: ---
Assignee: Andi Snow-Weaver
QA Contact: ARIA UA Implementors
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-11 14:17 UTC by Andi Snow-Weaver
Modified: 2012-04-24 13:39 UTC (History)
1 user (show)

See Also:


Attachments

Description Andi Snow-Weaver 2011-07-11 14:17:21 UTC
UAIG contains this text after the table on changes to document content or node visibility:

For node changes where the node is not an element or has no accessible object:
	This will likely affect the text output by the IAccessibleText interface. Compute and fire relevant text change events as described above.
	There may be accessible descendants. The appropriate children_changed events MUST be fired for the first-line descendants with accessible objects.

How can it happen that the element does not have an accessible object. This is original text from Aarons document. RS: Probably has to do with nodes that have been deleted.
Comment 1 Andi Snow-Weaver 2011-07-11 15:58:22 UTC
http://www.w3.org/WAI/PF/Group/track/actions/850
Comment 2 Andi Snow-Weaver 2011-07-14 14:08:34 UTC
Text is after the table in this section:

http://www.w3.org/WAI/PF/aria-implementation/#mapping_events_visibility

For node changes where the node is not an element or has no accessible object:

    This will likely affect the text output by the IAccessibleText interface. Compute and fire relevant text change events as described above.
    There may be accessible descendants. The appropriate children_changed events MUST be fired for the first-line descendants with accessible objects.
Comment 3 Aaron Leventhal 2011-07-14 19:13:16 UTC
This was poorly written, probably by me :)

> For node changes where the node is not an element or has no accessible object:

A. Some accessible nodes don't have a DOM node, like the accessible node for a list bullet "12. " or the accessible node for :before or :after text.
B. Some DOM node don't have accessible nodes, such as <p>Hello here is some <strong>text</strong> okay</p>. In this case the <strong> doesn't get an accessible object if its own, but is part of the ROLE_PARAGRAPH parent and the strong "text" is just a text range within that. 

In both cases, if anything happens within that content, the "right thing" needs to happen:
1. Text change events on the ancestor which uses the AccessibleText interface
2. Children changed events on any accessible object descendants of that text.

> 
>     This will likely affect the text output by the IAccessibleText interface.
> Compute and fire relevant text change events as described above.
>     There may be accessible descendants. The appropriate children_changed
> events MUST be fired for the first-line descendants with accessible objects.
Comment 4 Andi Snow-Weaver 2011-07-14 20:38:59 UTC
Is this scenario only relevant to Firefox? If so, then do we really need the text? If not, then do we need to define what happens for the other APIs?

Here's some proposed text that reflects what I understand you to be saying:

"In some cases, node changes may occur where the node is not an element or has no accessible object. For example, a numbered list bullet ("12.") has an accessible node but not a DOM node. Text within a paragraph marked in HTML as <strong> has a DOM node but not an accessible node. It is part of the parent paragraph and the "strong" text is identified as a range within the paragraph text."

I'm lost on the rest of it though. When you say "if anything happens", do you mean "anything" or only the subtree hide/show/add/remove/move scenarios described in the table above the text?
Comment 5 Aaron Leventhal 2011-07-14 21:01:39 UTC
(In reply to comment #4)
> Is this scenario only relevant to Firefox? 
No, it applies to anything that implements AccessibleText from ATK or IA2, which would include WebKit. I don't enough about know how the other APIs deal with text, but there is probably an analagous situation

> If so, then do we really need the
> text? If not, then do we need to define what happens for the other APIs?
I would say we need to define what happens for the other APIs.

> 
> Here's some proposed text that reflects what I understand you to be saying:
> 
> "In some cases, node changes may occur where the node is not an element or has
> no accessible object. For example, a numbered list bullet ("12.") has an
> accessible node but not a DOM node. 
Good.

> Text within a paragraph marked in HTML as
> <strong> has a DOM node but not an accessible node. 
It's actually the <strong> DOM node that has no accessible node. (Background: it's not important enough to get it's own accessible node. The node of accessible objects is kept to the minimum necessary to convey accessibility in order for faster cross-process communication, and text formatting is exposed via text ranges in the AccessibleText interface).


> It is part of the parent
> paragraph and the "strong" text is identified as a range within the paragraph
> text."
> 
> I'm lost on the rest of it though. When you say "if anything happens", do you
> mean "anything" or only the subtree hide/show/add/remove/move scenarios
> described in the table above the text?
Right, only those secnarios. Actually, there are some text removal/change/insertion methods in JavaScript that might also be relevant.
Comment 6 David Bolter 2011-07-22 18:39:14 UTC
The important distinction here is that the concept of node and element. You can have text node(s) inside an element, but the text nodes are not themselves elements.

Text is always stored in text nodes.

Browsers don't need to necessarily create an accessible object for each node, and can instead expose the text in others ways (e.g. advanced text interfaces).

I think if you read the text in this light it might make sense.
Comment 7 Andi Snow-Weaver 2011-07-28 12:22:34 UTC
<current>

For node changes where the node is not an element or has no accessible object:

    This will likely affect the text output by the IAccessibleText interface. Compute and fire relevant text change events as described above.
    There may be accessible descendants. The appropriate children_changed events MUST be fired for the first-line descendants with accessible objects.

</current>

<proposed>

In some cases, node changes may occur where the node is not an element or has
no accessible object. For example, a numbered list bullet ("12.") has a
node in the accessibility tree but not in the DOM tree. Text within a paragraph marked in HTML as <strong> has a node in the DOM tree but not in the accessibility tree. It is part of the parent paragraph and the "strong" text is identified as a range within the paragraph text. If any of the changes described in the table above occur on such a node, user agents MUST/SHOULD? compute and fire relevant text change events as described above.

</proposed>

David's comment talks about the difference between elements and nodes. Do we need a definition of "node"?
Comment 8 Andi Snow-Weaver 2011-10-04 17:18:55 UTC
Need OS X behavior from James
Comment 9 Andi Snow-Weaver 2011-10-18 16:30:04 UTC
Need to find out what IE and Safari do for text marked as <strong> or <span>. 

Firefox does not create an accessible object for these. It uses IAccessibleText to convey additional information about the text (strong, color, etc.)

Don't necessarily retain DOM structure in the accessibility tree. Common use case is formatting.

The text itself will be in the accessibility tree but the element wrapping it (<strong> or <span>) will not have an element in the accessibility tree.

<change>

Text within a paragraph
marked in HTML as <strong> has a node in the DOM tree but not in the
accessibility tree.

</change>

to

<to>

For text within a paragraph marked in HTML as <strong>, the <strong> element has its own node in the DOM tree but may not have its own element in the accessibility tree.

</to>
Comment 10 Andi Snow-Weaver 2011-10-25 19:07:28 UTC
Waiting on input from James.
Comment 11 Andi Snow-Weaver 2012-04-24 13:39:01 UTC
Closed per comments in ACTION-850