Bug 681674 - aria-autocomplete not supported on standard form text input controls. r=tbsaunde,MarcoZ

This commit is contained in:
David Bolter 2011-09-01 11:37:24 -04:00
parent 18d06f2791
commit d31d7c8933
3 changed files with 21 additions and 0 deletions

View File

@ -446,6 +446,15 @@ NS_IMETHODIMP nsHTMLTextFieldAccessible::GetValue(nsAString& _retval)
return NS_ERROR_FAILURE;
}
void
nsHTMLTextFieldAccessible::ApplyARIAState(PRUint64* aState)
{
nsHyperTextAccessibleWrap::ApplyARIAState(aState);
nsStateMapEntry::MapToStates(mContent, aState, eARIAAutoComplete);
}
PRUint64
nsHTMLTextFieldAccessible::NativeState()
{

View File

@ -159,6 +159,7 @@ public:
NS_IMETHOD GetAssociatedEditor(nsIEditor **aEditor);
// nsAccessible
virtual void ApplyARIAState(PRUint64* aState);
virtual nsresult GetNameInternal(nsAString& aName);
virtual PRUint32 NativeRole();
virtual PRUint64 NativeState();

View File

@ -67,6 +67,9 @@
testStates("combobox_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION);
testStates("combobox_autocomplete_both", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION);
testStates("htmltext_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION);
testStates("htmltextarea_autocomplete_list", STATE_HASPOPUP, EXT_STATE_SUPPORTS_AUTOCOMPLETION);
// aria-busy
testStates("textbox_busy_false", 0, 0, STATE_BUSY);
testStates("textbox_busy_true", STATE_BUSY);
@ -152,6 +155,11 @@
title="Unify ARIA state attributes mapping rules">
Mozilla Bug 499653
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=681674"
title="aria-autocomplete not supported on standard form text input controls">
Mozilla Bug 681674
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
@ -164,6 +172,9 @@
<div id="combobox_autocomplete_list" role="combobox" aria-autocomplete="list"></div>
<div id="combobox_autocomplete_both" role="combobox" aria-autocomplete="both"></div>
<input id="htmltext_autocomplete_list" type="text" aria-autocomplete="list" />
<textarea id="htmltextarea_autocomplete_list" aria-autocomplete="list"></textarea>
<div id="textbox_busy_false" role="textbox" aria-busy="false"></div>
<div id="textbox_busy_true" role="textbox" aria-busy="true"></div>
<div id="textbox_busy_error" role="textbox" aria-busy="error"></div>