Open Bug 1794780 Opened 2 years ago Updated 1 year ago

Consider removing group pos attributes from Accessible::Attributes()

Categories

(Core :: Disability Access APIs, enhancement)

enhancement

Tracking

()

People

(Reporter: Jamie, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Accessible::Attributes currently includes group position attributes, retrieved using GroupPosition(). However:

  1. IAccessible2 has its own groupPosition method. This means group pos info is unnecessarily calculated when an IA2 client fetches attributes.
  2. Mac sometimes calls Attributes, again causing unnecessary group pos calculation.
  3. Even though some group pos info is cached, not all of it is; e.g. level. Calculating that can be expensive in large containers, which is why 1) and 2) matter.

If we do this:

  1. ATK doesn't have a dedicated function for this, so it still needs to be exposed in attributes there.
  2. We probably want to keep exposing it under attributes for Dev Tools to keep things simple.
  3. Android code will need to be tweaked to call GroupPosition() itself.

We have a similar situation for valuetext, which has a native method on Windows but requires an object attribute for ATK. See bug 1803041.

See Also: → 1803041

Some APIs (e.g. IAccessible2) have dedicated methods for group position and value text, so including these in attributes is redundant and wasteful.
This is especially true for group position, which can be expensive to calculate in large containers/hierarchies.
This is most noticeable when there are a lot of show or text inserted events, since IA2 clients have to query attributes for these events in order to work out whether something is a live region, for which group position is completely irrelevant.

I implemented this to see if it would help the Treeherder case in bug 1794747 comment 0, since group position attributes were showing up in profiles for that case. It doesn't help significantly, so I'm not going to finish this for now, but I've attached the patch in case it's useful in future.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: