Closed Bug 690199 Opened 13 years ago Closed 11 years ago

ARIA select widget should expose focusable state regardless the way they manage its children

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: surkov, Assigned: maxli)

References

(Blocks 2 open bugs, Regressed 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

Historically widgets like listboxes, trees never take a focus (while they have focusable items) but expose focusable state. ARIA widgets can be manage the focus by two ways: aria-activedescendant approach and focusable children approach. The former approach makes the widget focusable, the second one makes it non focusable by default. So the suggestion is expose focusable state on ARIA widget not depending on the way the widget manages it children. That makes ARIA widget consistent each with other and with native widget.
Summary: ARIA select widget should expose foucsable state regardless the way they manage its children → ARIA select widget should expose focusable state regardless the way they manage its children
Assignee: nobody → maxli
Actually these roles should be covered:
* listbox
* grid
* tree
* treegrid

Perhaps I would add ARIA state map item like FocusableIfHasFocusableItem to handle all of them rather than hacking into Accessible class
Attached patch PatchSplinter Review
Attachment #781181 - Flags: review?(surkov.alexander)
Comment on attachment 781181 [details] [diff] [review]
Patch

Review of attachment 781181 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/src/base/ARIAStateMap.cpp
@@ +331,5 @@
> +    {
> +      if (aElement->HasAttr(kNameSpaceID_None, nsGkAtoms::aria_disabled) &&
> +          aElement->AttrValueIs(kNameSpaceID_None, nsGkAtoms::aria_disabled,
> +                                nsGkAtoms::_true, eCaseMatters))
> +        *aState &= ~states::FOCUSABLE;

to stay on safe side I wouldn't remove FOCUSABLE state (for example when this state goes from native markup)

It seems you should do
if (aElement->HasDefinedARIAToken() && !aElemnet->AttrValueIs("false"))

::: accessible/tests/mochitest/states/test_aria.html
@@ +275,5 @@
> +  <a target="_blank"
> +     href="https://bugzilla.mozilla.org/show_bug.cgi?id=690199"
> +     title="ARIA select widget should expose focusable state regardless the way they manage its children">
> +    Mozilla Bug 690199
> +  </a>

pls keep bug numbers sorted
Attachment #781181 - Flags: review?(surkov.alexander) → review+
https://hg.mozilla.org/mozilla-central/rev/35f1055fd217
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Regressions: 1692933
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: