Closed
Bug 1121518
Opened 10 years ago
Closed 10 years ago
[ARIA 1.1] Provide mapping for new "searchbox" role
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: MarcoZ, Assigned: MarcoZ)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
We already map the HTML5 input @type="search" to a textbox with an additional AccessibleAttribute "text-input-type": http://mxr.mozilla.org/mozilla-central/source/accessible/html/HTMLFormControlAccessible.cpp#310
We can simply adjust the new role exposure to match that, and everyone who picks up on this will automatically pick up the new role. This may also be feasible for Orca.
Comment 1•10 years ago
|
||
(In reply to Marco Zehe (:MarcoZ) from comment #0)
> We already map the HTML5 input @type="search" to a textbox with an
> additional AccessibleAttribute "text-input-type":
> http://mxr.mozilla.org/mozilla-central/source/accessible/html/
> HTMLFormControlAccessible.cpp#310
agree, makes sense to "searchbox" role too
> We can simply adjust the new role exposure to match that, and everyone who
> picks up on this will automatically pick up the new role. This may also be
> feasible for Orca.
what do you mean by new role?
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to alexander :surkov from comment #1)
> (In reply to Marco Zehe (:MarcoZ) from comment #0)
> > We can simply adjust the new role exposure to match that, and everyone who
> > picks up on this will automatically pick up the new role. This may also be
> > feasible for Orca.
>
> what do you mean by new role?
Sorry, the new ARIA role. It'll just start working for screen readers.
Assignee | ||
Comment 3•10 years ago
|
||
Added role support for searchbox, made it also expose the text-input-type, and in reverse, made input type="search" expose the xml-role of "searchbox". Also added the subrole and role description for Mac. Added tests, and found a few missing closing > in some of the links in files I touched in bug 1136563. Decided to just fix them here.
Assignee: nobody → mzehe
Status: NEW → ASSIGNED
Attachment #8569935 -
Flags: review?(surkov.alexander)
Comment 4•10 years ago
|
||
Comment on attachment 8569935 [details] [diff] [review]
Patch
Review of attachment 8569935 [details] [diff] [review]:
-----------------------------------------------------------------
::: accessible/generic/Accessible.cpp
@@ +865,5 @@
> if (mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::role, xmlRoles)) {
> attributes->SetStringProperty(NS_LITERAL_CSTRING("xml-roles"),
> xmlRoles, unused);
> + if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::role,
> + nsGkAtoms::searchbox, eCaseMatters)) {
it'd be good to move into if (mRoleMapEntry) block below (where live attrs are hosted) and change it to
if (mRoleMapEntry->Is(nsGkAtoms::searchbox)) {
}
@@ +868,5 @@
> + if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::role,
> + nsGkAtoms::searchbox, eCaseMatters)) {
> + nsAccUtils::SetAccAttr(attributes, nsGkAtoms::textInputType,
> + NS_LITERAL_STRING("search"));
> + }
nit: whitespaces
::: accessible/html/HTMLFormControlAccessible.cpp
@@ +310,2 @@
> nsAccUtils::SetAccAttr(attributes, nsGkAtoms::textInputType, type);
> + if (type.Equals(NS_LITERAL_STRING("search"))) {
EqualsLiteral
@@ +310,4 @@
> nsAccUtils::SetAccAttr(attributes, nsGkAtoms::textInputType, type);
> + if (type.Equals(NS_LITERAL_STRING("search"))) {
> + nsAccUtils::SetAccAttr(attributes, nsGkAtoms::xmlroles,
> + NS_LITERAL_STRING("searchbox"));
this overrides ARIA role on the element which is probably unwanted
::: accessible/mac/mozAccessible.mm
@@ +499,5 @@
> return utils::LocalizedString(NS_LITERAL_STRING("term"));
> if ((mRole == roles::PARAGRAPH) && [subrole isEqualToString:@"AXDefinition"])
> return utils::LocalizedString(NS_LITERAL_STRING("definition"));
> + if ((mRole == roles::ENTRY) && [subrole isEqualToString:@"AXSearchField"])
> + return utils::LocalizedString(NS_LITERAL_STRING("searchTextField"));
one day Accessible should provide methods for these
Attachment #8569935 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•