Closed Bug 1737944 Opened 3 years ago Closed 2 years ago

Implement GroupPosition for cached RemoteAccessibles

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: Jamie, Assigned: eeejay)

References

Details

(Whiteboard: [ctw-m1])

Attachments

(12 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

We need to support GroupPosition for RemoteAccessible when the cache is enabled. Ideally, we'd calculate this on-demand in the parent process (probably caching when we do), as we don't want to send potentially huge cache updates from content every time an item is added or removed.

While this seems quite feasible for most cases, HTML radio inputs are more complicated, as they depend on looking at the name attribute, scanning for other elements with the same name, etc. I guess we'll have a similar problem with relations, so perhaps we can figure this out as part of that.

See Also: → 1737946

Interestingly, Chrome doesn't look at the name attribute at all.

data:text/html,<input type="radio" name="foo"><input type="radio" name="bar">

Firefox correctly reports 1 of 1 and 1 of 1. Chrome reports 1 of 2 and 2 of 2.

While Firefox is more correct here, this does make me wonder how much this really happens (or matters) in the real world. If it's not hugely important, we could (at least initially) just do what Chrome does and use generic group position calculation even for HTML radio inputs.

Whiteboard: [ctw-m1]

(In reply to James Teh [:Jamie] from comment #1)

Interestingly, Chrome doesn't look at the name attribute at all.

data:text/html,<input type="radio" name="foo"><input type="radio" name="bar">

Firefox correctly reports 1 of 1 and 1 of 1. Chrome reports 1 of 2 and 2 of 2.

While Firefox is more correct here, this does make me wonder how much this really happens (or matters) in the real world. If it's not hugely important, we could (at least initially) just do what Chrome does and use generic group position calculation even for HTML radio inputs.

Fly-by comment: Both browsers have separate tabstops, and arrow keys don't do anything in Chrome, while in Firefox, the previously unchecked radio button becomes checked. Firefox is definitely more correct in that it indicates that the two radio buttons are clearly not related from a keyboard UX standpoint.

Assignee: nobody → eitan

The nsAccUtils method was a "fast" one for calculating set sizes and
conceptual parents. Unified it with
LocalAccessible::GetLevelInternal in Accessible::GetLevel with an
argument.

I also fixed select->optgroup->option group attributes.

Depends on D134207

Changed the methods a bit, instead of a HasDirty boolean method, I went
with a getter and a get-and-creator. This will lend better to remote
accessibles where we won't have a dirty flag.

Depends on D134208

Now that the AccGroupInfo getter is in Accessible, the position and size
getter could go there too.

Depends on D134209

Now that GroupPosition and GetGroupInfo are in Accessible, we can make
AccGroupInfo use the Accessible base class.

With one exception: Tables are still local only. That should be
addressed in bug 1735970.

Depends on D134211

Now that an AccGroupInfo can be constructed with an Accessible, we can
support its getter in remote accessibles.

Depends on D134212

Attachment #9256001 - Attachment description: Bug 1737944 - P1: Port HTML group position test to browser. r?morgan → Bug 1737944 - P1: Port HTML group position test to browser. r?Jamie
Attachment #9256002 - Attachment description: Bug 1737944 - P2: Allow AccAttributes to store a UniquePtr of AccGroupInfo. r?morgan → Bug 1737944 - P2: Allow AccAttributes to store a UniquePtr of AccGroupInfo. r?Jamie
Attachment #9256003 - Attachment description: Bug 1737944 - P3: Introduce Accessible::TagName getter for retrieving HTML tags. r?morgan → Bug 1737944 - P3: Introduce Accessible::TagName getter for retrieving HTML tags. r?Jamie
Attachment #9256004 - Attachment description: Bug 1737944 - P4: Cache aria group attributes and introduce Accessible getter. r?morgan → Bug 1737944 - P4: Cache aria group attributes and introduce Accessible getter. r?Jamie
Attachment #9256005 - Attachment description: Bug 1737944 - P5: Unify GetLevelInternal and GetDefaultLevel as Accessible::GetLevel. r?morgan → Bug 1737944 - P5: Unify GetLevelInternal and GetDefaultLevel as Accessible::GetLevel. r?Jamie
Attachment #9256006 - Attachment description: Bug 1737944 - P6: Put AccGroupInfo getter/creator in Accessible. r?morgan → Bug 1737944 - P6: Put AccGroupInfo getter/creator in Accessible. r?Jamie
Attachment #9256007 - Attachment description: Bug 1737944 - P7: Move and rename GetPositionAndSizeInternal to Accessible. r?morgan → Bug 1737944 - P7: Move and rename GetPositionAndSizeInternal to Accessible. r?Jamie
Attachment #9256008 - Attachment description: Bug 1737944 - P8: Move GetGroupPosition to Accessible. r?morgan → Bug 1737944 - P8: Move GetGroupPosition to Accessible. r?Jamie
Attachment #9256009 - Attachment description: Bug 1737944 - P9: Make AccGroupInfo use Accessible. r?morgan → Bug 1737944 - P9: Make AccGroupInfo use Accessible. r?Jamie
Attachment #9256010 - Attachment description: Bug 1737944 - P10: Store AccGroupInfo in remote accessible cache. r?morgan → Bug 1737944 - P10: Store AccGroupInfo in remote accessible cache. r?Jamie
Attachment #9256011 - Attachment description: Bug 1737944 - P11: When cache is enabled, calculate group info remotely and add it to attributes. r?morgan → Bug 1737944 - P11: When cache is enabled, calculate group info remotely and add it to attributes. r?Jamie
Depends on: 1747749

Changed how our attributes tests work a bit to be single "is" test
instead of comparing each attribute separately. This allows passing a
todo option without it failing on attributes that are identical.

Depends on D134214

Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e8f4be204683
P1: Port HTML group position test to browser. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/7e586e1f7892
P2: Allow AccAttributes to store a UniquePtr of AccGroupInfo. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/afea577be988
P3: Introduce Accessible::TagName getter for retrieving HTML tags. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/f6ce0e05c92e
P4: Cache aria group attributes and introduce Accessible getter. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/c0a7fdc4bfca
P5: Unify GetLevelInternal and GetDefaultLevel as Accessible::GetLevel. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/fca1ff7eabf4
P6: Put AccGroupInfo getter/creator in Accessible. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/5d76535b47fc
P7: Move and rename GetPositionAndSizeInternal to Accessible. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/ac04b727a98b
P8: Move GetGroupPosition to Accessible. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/d46f0bd36d7e
P9: Make AccGroupInfo use Accessible. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/c893643ce094
P10: Store AccGroupInfo in remote accessible cache. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/40c4b363441a
P11: When cache is enabled, calculate group info remotely and add it to attributes. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/3f2580279026
P12: Add better todo support to attribute tests, and todo failing cache tests. r=Jamie
Depends on: 1749828
Regressions: 1749736
Depends on: 1758190
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: