Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add accessibilityElements to accessibilityContainer API [UI-6096] #491

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nsillik
Copy link
Contributor

@nsillik nsillik commented Apr 26, 2024

Sometimes we need to change the inclusion, or order, of accessibility elements inside of accessibility containers. This allows overriding the automatically determined accessibility elements with an explicit list.

@nsillik nsillik force-pushed the nsillik/a11y-elements branch 4 times, most recently from 4f75847 to 19a232d Compare April 26, 2024 18:01
@nsillik nsillik marked this pull request as ready for review April 26, 2024 18:03
@nsillik nsillik requested a review from a team as a code owner April 26, 2024 18:03

/// Creates a new `AccessibilityContainer` wrapping the provided element.
public init(identifier: String? = nil, wrapping element: Element) {
public init(identifier: String? = nil, accessibilityElements: [Any]? = nil, wrapping element: Element) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: May be nicer as a result builder?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems reasonable, but a couple questions:

  1. When we're using this in practice, what are the a11y elements here exactly? Are they instances of UIView? Instances of UIAccessibilityElement? Something else?

  2. Are these elements that are already in the view / element hierarchy, or are they additions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm gonna put this on hold for a minute, i think there might be a cleaner way?

@nsillik nsillik marked this pull request as draft May 6, 2024 20:08
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.

None yet

3 participants