Closed Bug 995064 Opened 11 years ago Closed 2 years ago

role="radio" elements do not receive accurate grouping position info when descendants (but not direct children) of a role="radiogroup"

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: mick, Assigned: nlapre)

References

(Blocks 5 open bugs)

Details

(Keywords: papercut)

Attachments

(2 files)

Attached file aria radioGroup.html (deleted) —
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140314220517 Steps to reproduce: Create a html document where there is a div with role="radiogroup" and inside that 2 or more divs each containing a div with role="radio". See attached testcase. Actual results: When looking at IAccessible2::groupPosition on the radio buttons, they all expose 1 of 1, rather than correctly reflecting the true amount of radio buttons in the group and the index of the current radio button within the radio buttons in the group. This works fine if the intermediate divs are taken out and the role="radio" divs are direct children of the role="radiogroup" div. It also seems to work if the intermediate divs are given role="presentation". But, it also does not work if the radiogroup has an aria-owns specifically referencing each of the radio buttons. Expected results: In theory, any radio button inside a radiogroup should be considered when calculating group position. However, the ARIA spec for radio and radiogroup is a little unclear. It may suggest only children. It also suggests that aria-owns should be used if it is impossible to have the radio buttons as children of the radiogroup. But this does not seem to work either. I would think that role="presentation" on the intermediate divs would be suitable enough in most cases. Though I guess its healthy to have the conversation as to what the correct behaviour actually is.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: aria
OS: Windows 8.1 → All
Hardware: x86_64 → All
for aria-owns we have bug 964494, I'm not sure how much is correct to use aria-owns to point at grandchildren though
(In reply to alexander :surkov from comment #1) > for aria-owns we have bug 964494, I'm not sure how much is correct to use > aria-owns to point at grandchildren though It'd certainly make a mess of the hierarchy, but that applies to aria-owns in general.
Blocks: groupa11y

This will work if aria-owns is used now that aria-owns mutates the tree. So we only need to cover the non-owns case here.

The spec notes that required owned elements (radio is a required owned element of radiogroup) can be descendants, not just children:

Any element that will be owned by the element with this role. For example, an element with the role list will own at least one element with the role listitem.

https://w3c.github.io/aria/#mustContain

An 'owned element' is any DOM descendant of the element, any element specified as a child via aria-owns, or any DOM descendant of the owned child.

https://w3c.github.io/aria/#terms

IMO, this vagueness around descendant is problematic. For example, what if the intervening div had a role of button? Maybe we could ignore intervening generic HyperTextAccessibles with non-presentation ARIA roles?

This also applies to other ARIA compound widgets. For example:

<div role="tree">
  <div tabindex="-1">
    <div role="treeitem">1</div>
  </div>
  <div tabindex="-1">
    <div role="treeitem">2</div>
  </div>
</div>

We special cased table rows in bug 1619383, but that was done in the table code, not in AccGroupInfo.

I think we can fix this by tweaking AccGroupInfo to walk siblings and parents such that it skips generic HyperTexts. We could write some helper functions and just call those instead of getting siblings/parents directly.

Keywords: papercut
Blocks: 1762999
Blocks: 1671669
Severity: normal → S3
Assignee: nobody → nlapre

Transition the group position calculation - specifically the code in Update -
to Pivot such that we can handle finding siblings across intervening generic
container accessibles, such as SECTIONs. This fixes issues with finding the
values of "pos in set" and "set size" for descendant owned elements in compound
ARIA widgets. This revision also updates and adds tests for this functionality.

Blocks: 1809257
Pushed by nlapre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/41bb66709957 Rework group position calculation to allow intervening accs in compound ARIA widgets, r=Jamie
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Duplicate of this bug: 1721979
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: