Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Commit 343aa0b

Browse files
author
Alasdair Baxter
authored
Merge pull request #179 from iZettle/form-view-non-section-accessibility
PLT-2592 Expose the Contents of a `FormView` as Accessibility Elements
2 parents 6876f25 + 5fb57b4 commit 343aa0b

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 3.3.2
2+
3+
- Include all views, not just sections, in the accessibility elements of a FormView.
4+
15
# 3.3.1
26

37
- Improved the accessibility of `FormView` by making it an accessibility container comprising the visible rows from each of its visible sections.

Form/FormView.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,9 @@ public extension FormView {
4242

4343
override var accessibilityElements: [Any]? {
4444
get {
45-
let visibleSections = sections.filter { !$0.isHidden }
45+
let visibleViews = orderedViews.filter { !$0.isHidden }
4646

47-
var elements: [Any] = []
48-
for section in visibleSections {
49-
elements.append(contentsOf: section.accessibilityElements ?? [])
50-
}
51-
52-
return elements
47+
return visibleViews
5348
}
5449

5550
//swiftlint:disable:next unused_setter_value

0 commit comments

Comments
 (0)