Bug 48944 - Ignore children of text field controls in the accessibility tree.
Summary: Ignore children of text field controls in the accessibility tree.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-03 13:00 PDT by Chris Guillory
Modified: 2010-11-04 03:00 PDT (History)
2 users (show)

See Also:


Attachments
Send a value changed notification in contentsChanged. (7.94 KB, patch)
2010-11-03 14:14 PDT, Chris Guillory
cfleizach: review-
Details | Formatted Diff | Diff
Ignore children of text field controls in the accessibility tree. (1.17 KB, patch)
2010-11-03 16:43 PDT, Chris Guillory
no flags Details | Formatted Diff | Diff
Ignore static text children of text field controls in the accessibility tree. (1.53 KB, patch)
2010-11-03 17:24 PDT, Chris Guillory
no flags Details | Formatted Diff | Diff
Using roleValue (1.56 KB, patch)
2010-11-03 18:23 PDT, Chris Guillory
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Guillory 2010-11-03 13:00:24 PDT
Chromium needs to receive an accessibility notification when the RenderText::setText is called. Currently AccessibilityRenderObject::contentChanged doesn't post an accessibility notification.
Comment 1 Chris Guillory 2010-11-03 14:14:51 PDT
Created attachment 72869 [details]
Send a value changed notification in contentsChanged.
Comment 2 chris fleizach 2010-11-03 14:52:06 PDT
Comment on attachment 72869 [details]
Send a value changed notification in contentsChanged.

the value change your looking for should get sent in

RenderTextControl::setInnerTextValue

can you see if that does what you need. 

regardless, i don't think you want to send one in contentsChanged() which can be triggered on things that might not actually be considered contents changed
Comment 3 Chris Guillory 2010-11-03 15:54:12 PDT
RenderTextControl::setInnerTextValue posts an AXValueChanged notification but the control has children:

RenderTextControlSingleLine
  RenderTextControlInnerBlock
    RenderText

Chromium correctly updates the text of the RenderTextControlSingleLine node but not the RenderText node (which has the same text). Does one of these sound like a good approach:
(1) In Chromium, ignore the children of the RenderTextControl in the accessibility tree.
(2) In Chromium, send AXValueChanged from RenderText::setText.
Comment 4 chris fleizach 2010-11-03 15:57:17 PDT
(In reply to comment #3)
> RenderTextControl::setInnerTextValue posts an AXValueChanged notification but the control has children:
> 
> RenderTextControlSingleLine
>   RenderTextControlInnerBlock
>     RenderText
> 
> Chromium correctly updates the text of the RenderTextControlSingleLine node but not the RenderText node (which has the same text). Does one of these sound like a good approach:
> (1) In Chromium, ignore the children of the RenderTextControl in the accessibility tree.

I would say the children of a RenderTextControl should be ignored. usually that info is conveyed through other means

> (2) In Chromium, send AXValueChanged from RenderText::setText.
Comment 5 chris fleizach 2010-11-03 15:57:44 PDT
In Chromium, ignore the children of the RenderTextControl in the accessibility tree.
> 
> I would say the children of a RenderTextControl should be ignored. usually that info is conveyed through other means
> 

for example, NSAccessibilityValueAttribute on Mac
Comment 6 Chris Guillory 2010-11-03 16:43:36 PDT
Created attachment 72884 [details]
Ignore children of text field controls in the accessibility tree.
Comment 7 chris fleizach 2010-11-03 16:47:48 PDT
Comment on attachment 72884 [details]
Ignore children of text field controls in the accessibility tree.

i thought about doing it this way too, but then occasionally text fields have "X" buttons in them for clearing things out. this may not be the case on the web yet, but it seems like a possible future.
it might be better to make the RenderText object inside a RenderTextControl be accessibilityIgnored
Comment 8 Chris Guillory 2010-11-03 17:24:43 PDT
Created attachment 72887 [details]
Ignore static text children of text field controls in the accessibility tree.
Comment 9 chris fleizach 2010-11-03 17:34:55 PDT
Comment on attachment 72887 [details]
Ignore static text children of text field controls in the accessibility tree.

this might be more inclusive with something like

if (parentObjectUnignored()->roleValue() == TextFieldRole)

that way if you're making a text area with aria (<div role='textbox'>) it won't erroneously report the child element either.
Comment 10 Chris Guillory 2010-11-03 18:23:17 PDT
Created attachment 72892 [details]
Using roleValue

For the RenderTextControl case the RenderText's parent is a RenderTextControlInnerBlock which has the Group role so I still have to loop to check additional parents. Maybe we should ignore the RenderTextControlInnerBlock renderer also.
Comment 11 chris fleizach 2010-11-03 18:45:52 PDT
Comment on attachment 72892 [details]
Using roleValue

looks good
Comment 12 chris fleizach 2010-11-03 18:46:22 PDT
(In reply to comment #10)
> Created an attachment (id=72892) [details]
> Using roleValue
> 
> For the RenderTextControl case the RenderText's parent is a RenderTextControlInnerBlock which has the Group role so I still have to loop to check additional parents. Maybe we should ignore the RenderTextControlInnerBlock renderer also.

RenderTextControlInnerBlock should be ignored already i imagine. i've never seen it appear in the AX tree
Comment 13 WebKit Commit Bot 2010-11-04 02:58:55 PDT
The commit-queue encountered the following flaky tests while processing attachment 72892 [details]:

webarchive/test-link-rel-icon.html

Please file bugs against the tests.  These tests were authored by ddkilzer@webkit.org.  The commit-queue is continuing to process your patch.
Comment 14 WebKit Commit Bot 2010-11-04 02:59:57 PDT
Comment on attachment 72892 [details]
Using roleValue

Clearing flags on attachment: 72892

Committed r71317: <http://trac.webkit.org/changeset/71317>
Comment 15 WebKit Commit Bot 2010-11-04 03:00:02 PDT
All reviewed patches have been landed.  Closing bug.