Skip to content

ObjectHeader doesn't support .accessibilityElement(children: .combine) modifier #434

Open
@dzmitry-antonenka-sap

Description

@dzmitry-antonenka-sap

Describe the bug
When add .accessibilityElement(children: .combine) modifier VoiceOver doesn't pronounce grouped children elements, only visually selects them.

To Reproduce
For Examples.xcodeproj replace content of the ContentView.swift with following code:
`
import FioriCharts
import SwiftUI
import FioriCharts
import FioriSwiftUICore
import FioriCharts
import FioriSwiftUICore
import SwiftUI

struct ContentView: View {
var body: some View {
ObjectHeader {
Text("Some title text explaining something")
.font(.fiori(forTextStyle: .title3))
.foregroundColor(.preferredColor(.primaryLabel))
.fontWeight(.black)
} subtitle: {
Text("Some author name")
.font(.fiori(forTextStyle: .body))
.foregroundColor(.preferredColor(.secondaryLabel))
.fontWeight(.regular)
} footnote: {
Text("2 days ago")
.font(.fiori(forTextStyle: .subheadline))
.foregroundColor(.preferredColor(.tertiaryLabel))
.fontWeight(.regular)
}
.padding()
.accessibilityElement(children: .combine)
}
}
`

  1. Enable Accessibility -> Voice Over
  2. Launch the app
  3. Observe that header children text is not pronounced when .accessibilityElement(children: .combine) added, only visual grouping is visible.
    Note: when no .accessibilityElement(children: .combine) added elements pronounced separately, but I need .accessibilityElement(children: .combine) so they are grouped.

Expected behavior
Expected all grouped elements are pronounced by VoiceOver with this modifier.

Screenshots
IMG_9A1916D3DE39-1

Mobile (please complete the following information):

Device: iPhone 8
OS: iOS 15.5
Swift Package Product: FioriSwiftUICore
Swift Package Version: 2.1.0, main branch, commit a82de93
Xcode Version: Version 13.4 (13F17a), toolchain Xcode Version 13.4 (13F17a)
FioriSwiftUI / cloud-sdk-ios-fiori 2.1.0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions