Skip to content

Commit 0176ab5

Browse files
Remove VoiceOver references from doc comments
Describe the behavior without referencing accessibility internals.
1 parent 6f633a5 commit 0176ab5

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

‎Example/UnitTests/AccessibilityHierarchyParserTests.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,8 +1066,8 @@ final class AccessibilityHierarchyParserTests: XCTestCase {
10661066

10671067
/// A `UIView` that implements `accessibilityElementCount()` / `accessibilityElement(at:)` but
10681068
/// leaves `accessibilityElements` nil is traversed via its subview hierarchy, not the index APIs.
1069-
/// VoiceOver walks the subview tree for UIView-backed containers — the index-API fallback only
1070-
/// applies to non-UIView containers (e.g. `UIAccessibilityElement` subclasses).
1069+
/// UIView-backed containers are walked via subviews — the index-API fallback only applies to
1070+
/// non-UIView containers (e.g. `UIAccessibilityElement` subclasses).
10711071
func testViewContainerWalksSubviewsNotIndexAPIs() {
10721072
let rootView = IndexAPIView(frame: .init(x: 0, y: 0, width: 200, height: 100))
10731073

‎Sources/AccessibilitySnapshot/Parser/Swift/Classes/AccessibilityHierarchyParser.swift‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -889,10 +889,9 @@ private extension NSObject {
889889
/// UIKit containers such as `UISegmentedControl`, which populate `accessibilityElements` with
890890
/// their internal elements. When it is `nil`, this falls back to the `accessibilityElementCount()`
891891
/// / `accessibilityElement(at:)` container APIs for non-UIView containers only (see
892-
/// `shouldUseAccessibilityContainerElements`), mirroring how VoiceOver resolves elements — it
893-
/// walks UIView subview hierarchies directly but uses the index-based API for non-UIView
894-
/// accessibility containers. Returns `nil` when the object does not act as an explicit
895-
/// accessibility container.
892+
/// `shouldUseAccessibilityContainerElements`), mirroring the behavior where UIView subview
893+
/// hierarchies are walked directly while non-UIView containers use the index-based API. Returns
894+
/// `nil` when the object does not act as an explicit accessibility container.
896895
private func resolvedAccessibilityElements() -> [NSObject]? {
897896
if let elements = accessibilityElements as? [NSObject] {
898897
return elements
@@ -927,9 +926,9 @@ private extension NSObject {
927926

928927
/// Whether this object should be queried via the `accessibilityElementCount()` /
929928
/// `accessibilityElement(at:)` container APIs. UIView-backed objects are excluded because
930-
/// VoiceOver walks their subview hierarchy directly rather than using the index-based container
931-
/// API. Accessibility elements are excluded because they are leaves, not containers. This
932-
/// ensures the index API fallback only activates for non-UIView accessibility containers (e.g.
929+
/// their subview hierarchy is walked directly rather than using the index-based container API.
930+
/// Accessibility elements are excluded because they are leaves, not containers. This ensures
931+
/// the index API fallback only activates for non-UIView accessibility containers (e.g.
933932
/// `UIAccessibilityElement` subclasses that implement the dynamic container methods).
934933
private var shouldUseAccessibilityContainerElements: Bool {
935934
if self is UIView {

0 commit comments

Comments
 (0)