cashapp / cashapp/AccessibilitySnapshot

Data table descriptions are incorrect on iOS 13 and later

Open
#7 2 comments 0 reactions 0 assignees View on GitHub
bug P1: High Priority VoiceOver parity
Dominant language
Swift
Stars
743
Forks
98
PR merge metrics
No merged PRs in 30d

Description

The accessibility description for elements in a data table appears to have subtly changed on iOS 13. The differences can be seen in the following tests:

[`testDataTable`](https://github.com/cashapp/AccessibilitySnapshot/blob/9b1a71d30bd8e1df7d18ceb98a108cadb3841e26/Example/SnapshotTests/ReferenceImages/_64/SnapshotTests.AccessibilityContainersTests/testDataTable_13_3_375x812%403x.png)
* The final element now reads as "B5: Value. Row 5. Column 2. Dimmed. Button. Heading. Link. Adjustable. Image. Search Field. 5 of 1." / "Hint"

The most obvious change here is that the `accessibilityValue` comes before the row and column numbers. I'm not sure where the "5 of 1" came from.

[`testDataTableWithHeaders`](https://github.com/cashapp/AccessibilitySnapshot/blob/9b1a71d30bd8e1df7d18ceb98a108cadb3841e26/Example/SnapshotTests/ReferenceImages/_64/SnapshotTests.AccessibilityContainersTests/testDataTableWithHeaders_13_3_375x812%403x.png)
* The first element in the table now reads as "B1: B1 Value. C1: C1 Value. A2: A2 Value. A3: A3 Value. A1: A1 Value. Row Header. Column Header. Row 1. Column 1."
* The addition of the "Row Header" label is applied to all cells the first three columns.
* The addition of the "Column Header" label is applied to all cells the first three rows.
* The movement of `accessibilityValue` from before is applied to all cells.

[`testDataTableWithUndefinedRows`](https://github.com/cashapp/AccessibilitySnapshot/blob/9b1a71d30bd8e1df7d18ceb98a108cadb3841e26/Example/SnapshotTests/ReferenceImages/_64/SnapshotTests.AccessibilityContainersTests/testDataTableWithUndefinedRows_13_3_375x812%403x.png)
* The first element in the table now reads as "A2: A2 Value. A3: A3 Value. A1: A1 Value. Column Header. Row -9223372036854775808. Column 1"
* The second element in the table now reads as "B2: B2 Value. B3: B3 Value. B1: B1 Value. Column Header. Column 2."
* The addition of the "Column Header" label is applied to all cells the first three rows.
* The movement of `accessibilityValue` from before is applied to all cells.

I think the row number in the first cell is coming from an overflow of `NSNotFound + 1`. This feels like a regression in VoiceOver, but we should try to match the behavior of VoiceOver in our descriptions as close as possible.

Contributor guide

Open the contributing guide

Research direction

Start with the referenced testDataTable, testDataTableWithHeaders, and testDataTableWithUndefinedRows cases and compare their iOS 13 reference images in Example/SnapshotTests/ReferenceImages/_64/SnapshotTests.AccessibilityContainersTests. Trace how the accessibility descriptions are generated, then update the behavior and coverage so the descriptions match the documented VoiceOver output.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
accessibility, mobile, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.