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

Introduce AutomationProperties.ExcludedWithChildren #1815

Merged
merged 4 commits into from
Jul 28, 2021

Conversation

rachelkang
Copy link
Member

Description of Change

Introduce AutomationProperties.ExcludedWithChildren property,

AutomationProperties.ExcludedWithChildren supplements the existing AutomationProperties.IsInaccessibleTree by enabling developers to remove the specified control and all its children from the accessibility tree. The two properties together match up to what the XCT SemanticInclusion property offers.

It maps to ImportantForAccessibility.NoHideDescendants on Android, and to AccessibilityElementsHidden on iOS.

Additions made

  • Adds AutomationProperties.ExcludedWithChildren

AutomationProperties still needs to be wired up for proper testing. For now, comment out Button and Label handler registration in AppHostBuilderExtensions
@@ -25,7 +25,7 @@ public static string SetContentDescription(this global::Android.Views.View Contr
return _defaultContentDescription;
}

public static void SetFocusable(this global::Android.Views.View Control, Element Element, ImportantForAccessibility? _defaultImportantForAccessibility = null)
public static void SetImportantForAccessibility(this global::Android.Views.View Control, Element Element, ImportantForAccessibility? _defaultImportantForAccessibility = null)
Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed to SetImportantForAccessibility because (1) focusable was a misleading name, and referred to the native focusable property that was formerly misused and (2) has since been removed. (3) The new name better reflects the method and aligns better with the naming pattern that related methods follow on both Android and iOS (of using the name of the relevant native api affected)

@rachelkang rachelkang requested a review from PureWeen July 26, 2021 21:09
@Redth Redth added this to the 6.0.100-preview.7 milestone Jul 26, 2021
Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

The name ExcludedWithChildren is a bit iffy as it is a bit confusing, but it is what it is doing, soooo LGTM?

@PureWeen PureWeen merged commit 068b60e into main Jul 28, 2021
@PureWeen PureWeen deleted the automationproperties_excludewithchildren branch July 28, 2021 02:55
@rachelkang rachelkang added the legacy-area-a11y Relates to accessibility label Aug 9, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@Eilon Eilon added the t/a11y Relates to accessibility label May 13, 2024
@samhouts samhouts added the fixed-in-6.0.100-preview.7.3 Look for this fix in 6.0.100-preview.7.3! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.100-preview.7.3 Look for this fix in 6.0.100-preview.7.3! legacy-area-a11y Relates to accessibility t/a11y Relates to accessibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants