Closed Bug 1714390 Opened 3 years ago Closed 3 years ago

Slim accessibility attributes

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

Attachments

(7 files)

Our current Attributes implementation is very string heavy even though most of the keys are known and most of the values are non-strings like integers and booleans. This causes a lot of malloc/free churn when sending attributes over IPC, and is very inefficient for storage.

In addition platforms like Mac and Android parse attributes in order to translate them to OS APIs. The parsing of strings is expensive and error prone.

We should transition away from a string value/key container to an atom key container with variant values that minimize the usage of strings whenever possible.

ATK, Windows and XPCOM expect aria attribute keys to be stripped of
their aria- prefix. We should still store the item using the aria_ atom
and then strip the prefix when converting the key to a string.

Depends on D116785

Keys should be static atoms whenever possible.

Depends on D116786

Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/72a777be6fc9
P1: Introduce AccAttributes with string values. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/feb0084b0516
P2: Use AccAttributes for accessible and text attributes. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/6cb25bd53234
P3: Add variant values to AccAttributes. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/9d3bd0953170
P4: Set non-string values in AccAttributes when possible. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/70b2a36dcba5
P5: Use static aria_* atoms for aria attributes. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/21dbd7977236
P6: Make more attribute keys static atoms. r=Jamie
https://hg.mozilla.org/integration/autoland/rev/898f0910781b
P7: Add custom de/serializer for AccAttributes. r=Jamie
Regressions: 1837163
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: