Closed Bug 1832228 Opened 2 years ago Closed 1 year ago

[CTW] Remove ARIA table classes

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox-esr115 --- fixed
firefox116 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ctw-postship])

Attachments

(3 files, 1 obsolete file)

Now that Cache the World is enabled by default everywhere, we always use CachedTableAccessible for ARIA tables. This means we no longer need ARIAGridAccessible, ARIARowAccessible or ARIAGridCellAccessible. This will require changes to nsAccessibilityService::CreateAccessible and friends. We will also want to change Accessible::IsTable* to use HasGenericType instead of checking mGenericTypes directly.

Depends on: 1832261
Assignee: nobody → jteh
Status: NEW → ASSIGNED

We now use CachedTableAccessible for ARIA tables and grids, so most of the code in the ARIA table classes was unused.

  1. Remove ARIAGridAccessible and ARIARowAccessible completely.
  2. ARIAGridCellAccessible no longer derives from TableCellAccessible.
  3. Remove most of ARIAGridCellAccessible.
  4. We still use ARIAGridCellAccessible to differentiate between valid and invalid cells. Valid cells create an ARIAGridCellAccessible and ARIAGridCellAccessible::IsTableCell() returns true due to mGenericTypes. Invalid cells don't get an ARIAGridCellAccessible, so IsTableCell() returns false on those.
  5. We also keep the code in ARIAGridCellAccessible to expose some states and attributes.
  6. The code for creating ARIAGridCellAccessible in CreateAccessible has been refactored, both for simplification and to fix bugs. display: contents tables now properly get the table and table cell interfaces; i.e. IsTable() and IsTableCell() return true when appropriate. Walking non-generic ancestors should fix ARIA tables with intervening generics, though this will be dealt with fully in a separate bug.

These classes are no longer used.
The remaining XUL subclasses now derive from Table*AccessibleBase.
XULTreeGridAccessible depended on some methods in TableAccessible which are no longer used by anything else, so these have been moved into XULTreeGridAccessible itself.

Now that the local-only TableAccessible and TableCellAccessible have been removed, we no longer need this Base suffix for the unified classes.
Aside from renaming the header files, the rest of this was done with the following script:

function replace {
  sed -i 's/'$1'/'$2'/g' `git grep -l $1`
}
replace TableAccessibleBase TableAccessible
replace TableCellAccessibleBase TableCellAccessible
replace AsTableBase AsTable
replace AsTableCellBase AsTableCell
Type: task → defect
Keywords: regression
Regressed by: tablea11y, a11y-ctw, 1723195
Blocks: 1723195
Keywords: regression
No longer regressed by: tablea11y, a11y-ctw, 1723195
Type: defect → task
Depends on: 1837105

Comment on attachment 9337202 [details]
Bug 1832228 part 1: Add methods for determining generic Accessibles and getting the nearest non-generic ancestor.

Revision D179800 was moved to bug 1837105. Setting attachment 9337202 [details] to obsolete.

Attachment #9337202 - Attachment is obsolete: true
Attachment #9337203 - Attachment description: Bug 1832228 part 2: Remove ARIAGridAccessible, ARIARowAccessible and most of ARIAGridCellAccessible. → Bug 1832228 part 1: Remove ARIAGridAccessible, ARIARowAccessible and most of ARIAGridCellAccessible.
Attachment #9337204 - Attachment description: Bug 1832228 part 3: Remove TableAccessible and TableCellAccessible. → Bug 1832228 part 2: Remove TableAccessible and TableCellAccessible.
Attachment #9337205 - Attachment description: Bug 1832228 part 4: Rename TableAccessibleBase to TableAccessible and TableCellAccessibleBase to TableCellAccessible. → Bug 1832228 part 3: Rename TableAccessibleBase to TableAccessible and TableCellAccessibleBase to TableCellAccessible.
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ad1d1cc9a2b8 part 1: Remove ARIAGridAccessible, ARIARowAccessible and most of ARIAGridCellAccessible. r=nlapre https://hg.mozilla.org/integration/autoland/rev/094e8ca370f7 part 2: Remove TableAccessible and TableCellAccessible. r=nlapre https://hg.mozilla.org/integration/autoland/rev/2bc9b7e916d8 part 3: Rename TableAccessibleBase to TableAccessible and TableCellAccessibleBase to TableCellAccessible. r=nlapre
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Blocks: 1728676
Blocks: 1838151
Regressions: 1838540
Blocks: 1838718
Blocks: 1534843
Blocks: 1842053

Comment on attachment 9337203 [details]
Bug 1832228 part 1: Remove ARIAGridAccessible, ARIARowAccessible and most of ARIAGridCellAccessible.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Needed to fix various accessibility regressions introduced by the Cache the World project which shipped in 115.
  • User impact if declined: Table accessibility bugs which impact popular sites (Google Calendar, Facebook Messenger) once other necessary fixes in other areas are uplifted.
  • Fix Landed on Version: 116
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a significant refactor. However, this is well covered by automated tests and has been baking on release since 116 without problems.
Attachment #9337203 - Flags: approval-mozilla-esr115?
Attachment #9337204 - Flags: approval-mozilla-esr115?
Attachment #9337205 - Flags: approval-mozilla-esr115?

Comment on attachment 9337203 [details]
Bug 1832228 part 1: Remove ARIAGridAccessible, ARIARowAccessible and most of ARIAGridCellAccessible.

Approved for 115.4esr.

Attachment #9337203 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+

Comment on attachment 9337204 [details]
Bug 1832228 part 2: Remove TableAccessible and TableCellAccessible.

Approved for 115.4esr.

Attachment #9337204 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+

Comment on attachment 9337205 [details]
Bug 1832228 part 3: Rename TableAccessibleBase to TableAccessible and TableCellAccessibleBase to TableCellAccessible.

Approved for 115.4esr.

Attachment #9337205 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: