mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 924896 - exposing the text input type in the accessible's attributes. r=surkov
--- accessible/src/html/HTMLFormControlAccessible.cpp | 15 +++++++++++++++ accessible/src/html/HTMLFormControlAccessible.h | 1 + accessible/tests/mochitest/attributes/test_obj.html | 16 ++++++++++++++++ content/base/src/nsGkAtomList.h | 1 + 4 files changed, 33 insertions(+)
This commit is contained in:
parent
2744117b84
commit
45529b8d0b
@ -306,6 +306,21 @@ HTMLTextFieldAccessible::NativeRole()
|
||||
return roles::ENTRY;
|
||||
}
|
||||
|
||||
already_AddRefed<nsIPersistentProperties>
|
||||
HTMLTextFieldAccessible::NativeAttributes()
|
||||
{
|
||||
nsCOMPtr<nsIPersistentProperties> attributes =
|
||||
HyperTextAccessibleWrap::NativeAttributes();
|
||||
|
||||
// Expose type for text input elements as it gives some useful context,
|
||||
// especially for mobile.
|
||||
nsAutoString type;
|
||||
if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, type))
|
||||
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::textInputType, type);
|
||||
|
||||
return attributes.forget();
|
||||
}
|
||||
|
||||
ENameValueFlag
|
||||
HTMLTextFieldAccessible::NativeName(nsString& aName)
|
||||
{
|
||||
|
@ -131,6 +131,7 @@ public:
|
||||
virtual void ApplyARIAState(uint64_t* aState) const;
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
virtual uint64_t NativeState();
|
||||
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
|
||||
|
||||
// ActionAccessible
|
||||
virtual uint8_t ActionCount();
|
||||
|
@ -97,6 +97,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
|
||||
testAttrs("liveGroup", {"container-live-role" : "group"}, true);
|
||||
testAttrs("liveGroupChild", {"container-live-role" : "group"}, true);
|
||||
|
||||
// text input type
|
||||
testAbsentAttrs("button", { "text-input-type": "button"});
|
||||
testAbsentAttrs("checkbox", { "text-input-type": "checkbox"});
|
||||
testAbsentAttrs("radio", { "text-input-type": "radio"});
|
||||
testAttrs("email", {"text-input-type" : "email"}, true);
|
||||
testAttrs("search", {"text-input-type" : "search"}, true);
|
||||
testAttrs("tel", {"text-input-type" : "tel"}, true);
|
||||
testAttrs("url", {"text-input-type" : "url"}, true);
|
||||
|
||||
// html
|
||||
testAttrs("radio", {"checkable" : "true"}, true);
|
||||
testAttrs("checkbox", {"checkable" : "true"}, true);
|
||||
@ -223,6 +232,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
|
||||
excuse <div id="liveGroupChild">me</div>
|
||||
</div>
|
||||
|
||||
<!-- text input type -->
|
||||
<input id="button" type="button"/>
|
||||
<input id="email" type="email"/>
|
||||
<input id="search" type="search"/>
|
||||
<input id="tel" type="tel"/>
|
||||
<input id="url" type="url"/>
|
||||
|
||||
<!-- html -->
|
||||
<input id="radio" type="radio"/>
|
||||
<input id="checkbox" type="checkbox"/>
|
||||
|
@ -2181,6 +2181,7 @@ GK_ATOM(tableCellIndex, "table-cell-index")
|
||||
GK_ATOM(tablist, "tablist")
|
||||
GK_ATOM(textAlign, "text-align")
|
||||
GK_ATOM(textIndent, "text-indent")
|
||||
GK_ATOM(textInputType, "text-input-type")
|
||||
GK_ATOM(textLineThroughColor, "text-line-through-color")
|
||||
GK_ATOM(textLineThroughStyle, "text-line-through-style")
|
||||
GK_ATOM(textPosition, "text-position")
|
||||
|
Loading…
Reference in New Issue
Block a user