Last Comment Bug 681674 - aria-autocomplete not supported on standard form text input controls
: aria-autocomplete not supported on standard form text input controls
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: 6 Branch
: All All
: -- normal (vote)
: mozilla9
Assigned To: David Bolter [:davidb]
:
Mentors:
Depends on:
Blocks: aria 499653
  Show dependency treegraph
 
Reported: 2011-08-24 09:41 PDT by Todd Kloots
Modified: 2011-09-01 13:54 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch 1 (4.16 KB, patch)
2011-08-24 12:35 PDT, David Bolter [:davidb]
tbsaunde+mozbugs: review+
mzehe: review+
Details | Diff | Review

Description Todd Kloots 2011-08-24 09:41:24 PDT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0) Gecko/20100101 Firefox/6.0
Build ID: 20110811165603

Steps to reproduce:

I added the aria-autocomplete attribute to a standard HTML form text input control (tried both <input type="text"> and <textarea>).


Actual results:

When I focused the control, the NVDA screen reader did not announce the text box as having autocomplete.

Here's a link to an example to reproduce the bug:
http://public.yahoo.com/kloots/aria/autocomplete-2.html


Expected results:

The NVDA screen reader should have announced the text box has having autocomplete.

One additional note: I discovered adding the ARIA role of "textbox" to the input fixes the issue.  But that ARIA role seems redundant in this case.
Comment 1 David Bolter [:davidb] 2011-08-24 10:03:50 PDT
Looks like we have ApplyARIAState in nsXULFormControlAccessible but not in nsHTMLFormControlAccessible?

Trev, Alex are you guys currently refactoring nsHTML* or nsHypertext*?
Comment 2 David Bolter [:davidb] 2011-08-24 12:35:47 PDT
Created attachment 555494 [details] [diff] [review]
patch 1

Trivial really - we just need to do what we do for xul text fields. This would all have worked automagically if aria-autocomplete was a universal property, but it isn't so we special case for native html and xul text fields.
Comment 3 David Bolter [:davidb] 2011-08-24 12:36:50 PDT
Comment on attachment 555494 [details] [diff] [review]
patch 1

Adding r? Marco since Trevor is supposed to be relaxing :)
Comment 4 Trevor Saunders (:tbsaunde) 2011-08-24 14:26:09 PDT
Comment on attachment 555494 [details] [diff] [review]
patch 1


>+nsHTMLTextFieldAccessible::ApplyARIAState(PRUint64* aState)
>+{
>+  nsHyperTextAccessibleWrap::ApplyARIAState(aState);
>+
>+  nsStateMapEntry::MapToStates(mContent, aState, eARIAAutoComplete);
>+
>+}

I'd probably kill that last blank line.

Also, duplicating this logic sort of sucks, but the only reasonable approach I can think of here is a helper text field class for both the xul and html ones to dirive from.


>+      testStates("htmltext_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION);
>+      testStates("htmltextarea_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION);

I'd like to be sure we cover the other possible cases here, but I'll leave the decision if we need more tests  up to Marco

also, add bug link?
Comment 5 David Bolter [:davidb] 2011-08-24 15:13:44 PDT
(In reply to Trevor Saunders (:tbsaunde) from comment #4)

> Also, duplicating this logic sort of sucks

Agreed.
Comment 6 alexander :surkov 2011-08-26 02:14:36 PDT
regression from bug 499653. Note, comboboxes are affected too (though I'm not sure it makes sense for non ARIA comboboxes, needs to dig through history deeply).

I don't like the virtual ApplyARIAState approach (though it's better than it was prior bug 499653). ARIA map should be extended to catch ARIA roles for native roles and that will be correct fix.
Comment 7 alexander :surkov 2011-08-26 02:16:14 PDT
But you can go ahead and land it since the patch doesn't make things more worth than they were.
Comment 8 Marco Zehe (:MarcoZ) 2011-08-29 00:57:53 PDT
Comment on attachment 555494 [details] [diff] [review]
patch 1

Please add a link to this bug in the proper section of /accessible/tests/mochitest/states/test_aria.html. r=me with that fixed. Thanks!
Comment 9 David Bolter [:davidb] 2011-09-01 07:27:43 PDT
(In reply to alexander surkov from comment #7)
> But you can go ahead and land it since the patch doesn't make things more
> worth than they were.

Alright. Do we have a bug for the right fix?
Comment 10 alexander :surkov 2011-09-01 08:25:27 PDT
(In reply to David Bolter [:davidb] from comment #9)
> (In reply to alexander surkov from comment #7)
> > But you can go ahead and land it since the patch doesn't make things more
> > worth than they were.
> 
> Alright. Do we have a bug for the right fix?

yep, bug 499892
Comment 12 Ed Morley [:emorley] 2011-09-01 13:54:02 PDT
http://hg.mozilla.org/mozilla-central/rev/7a50f9697fb2

Note You need to log in before you can comment on or make changes to this bug.