Bug 108596

Summary: AX: when aria-activedescendant is used with a ComboBox role, focus should not be changed
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, dmazzoni, jdiggs, rniwa, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch rniwa: review+

Description chris fleizach 2013-02-01 01:04:44 PST
Normally, an aria-activedescendant change causes a focus change to be triggered.

However, when used in conjunction with a combo box, this causes problems for Screen readers.

The problem is that the user expects focus to remain in the text field so that the user can keep typing. If it moves to an item in the combobox list, it is not possible to keep typing
Comment 1 chris fleizach 2013-02-01 01:04:55 PST
rdar://13093327
Comment 2 chris fleizach 2013-02-01 01:07:05 PST
The solution I think is to not allow focus changes on aria-activedescendant changes for combo boxes.

on the mac, we think we should send a selected children changed notification instead
Comment 3 chris fleizach 2013-02-01 01:10:26 PST
Created attachment 185973 [details]
patch
Comment 4 Ryosuke Niwa 2013-02-01 01:17:20 PST
Comment on attachment 185973 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=185973&action=review

> LayoutTests/platform/mac/accessibility/combobox-activedescendant-notifications.html:21
> +        window.jsTestIsAsync = true;
> +        window.testRunner.waitUntilDone();

You don't need "window.".

> LayoutTests/platform/mac/accessibility/combobox-activedescendant-notifications-expected.txt:2
> +item1

Could you hide this before the test finishes so that the expected result will have less noise?

> LayoutTests/platform/mac/accessibility/combobox-activedescendant-notifications-expected.txt:9
> +PASS combo.isEqual(accessibilityController.focusedElement) is true
> +PASS combo.isEqual(accessibilityController.focusedElement) is true

It's not obvious to me what has been tested. It would have been better if comments in the tests were inside debug or they were wrapped in some inline functions, which are then called in evalAndLog.
Comment 5 chris fleizach 2013-02-01 01:28:30 PST
(In reply to comment #4)
> (From update of attachment 185973 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=185973&action=review
> 
> > LayoutTests/platform/mac/accessibility/combobox-activedescendant-notifications.html:21
> > +        window.jsTestIsAsync = true;
> > +        window.testRunner.waitUntilDone();
> 
> You don't need "window.".
> 
> > LayoutTests/platform/mac/accessibility/combobox-activedescendant-notifications-expected.txt:2
> > +item1
> 
> Could you hide this before the test finishes so that the expected result will have less noise?
> 
> > LayoutTests/platform/mac/accessibility/combobox-activedescendant-notifications-expected.txt:9
> > +PASS combo.isEqual(accessibilityController.focusedElement) is true
> > +PASS combo.isEqual(accessibilityController.focusedElement) is true
> 
> It's not obvious to me what has been tested. It would have been better if comments in the tests were inside debug or they were wrapped in some inline functions, which are then called in evalAndLog.

Thanks for the feedback. Will update these
Comment 6 chris fleizach 2013-02-01 01:38:49 PST
http://trac.webkit.org/changeset/141560