Skip to content

Add hooks for reporting accessibility scroll status#100

Merged
alinebee merged 2 commits intomasterfrom
accessibility-scroll-hooks
Jun 19, 2018
Merged

Add hooks for reporting accessibility scroll status#100
alinebee merged 2 commits intomasterfrom
accessibility-scroll-hooks

Conversation

@alinebee
Copy link
Copy Markdown
Contributor

This PR adds an optional callback for UIAccessibilityScrollViewDelegate.accessibilityScrollStatus, which can be used to report the current scroll position of the table in an accessible way: e.g. "Page 2 of 3" (for general screen content), "Aardvark to Marmoset" (for alphabetised lists), "15th January to 23rd March" (for chronological lists) etc. This is a useful navigational aid for VoiceOver users.

This PR also adds a helper method to get all currently-visible cells, which proved useful for constructing these accessibility descriptions.

@alinebee alinebee requested review from raulriera and robinsenior and removed request for raulriera June 14, 2018 16:38
Copy link
Copy Markdown
Contributor

@raulriera raulriera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FunctionalCollectionData is completely missing in this PR.

}

return visibleIndexPaths.compactMap { sections[$0] }
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What value are you getting out of the CellConfigType? are you then casting those to their actual types? I think this bit property be outside of the library tho

Copy link
Copy Markdown
Contributor

@raulriera raulriera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would love for public var visibleRows: [CellConfigType] to be an extension on the actual app we would be using this instead. The rest is 👨‍🍳👌

Copy link
Copy Markdown
Contributor

@robinsenior robinsenior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool, do we have plans to incorporate it for accessibility work internally?

@alinebee
Copy link
Copy Markdown
Contributor Author

This is cool, do we have plans to incorporate it for accessibility work internally?

Yup, once this is merged to FTD I have a Polaris PR ready to go up that'll implement accessible scroll descriptions.

@alinebee alinebee force-pushed the accessibility-scroll-hooks branch from eef37a0 to ca08719 Compare June 19, 2018 18:35
@alinebee
Copy link
Copy Markdown
Contributor Author

I've rebased, removed the visibleRows helper, and added the equivalent callback to FunctionalCollectionData. Will merge on 🍏.

@alinebee alinebee merged commit 9a33039 into master Jun 19, 2018
@alinebee alinebee deleted the accessibility-scroll-hooks branch June 19, 2018 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants