cloud-sdk-ios-fiori icon indicating copy to clipboard operation
cloud-sdk-ios-fiori copied to clipboard

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

Open dzmitry-antonenka-sap opened this issue 2 years ago • 1 comments

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 https://github.com/SAP/cloud-sdk-ios-fiori/commit/a82de93715b34e0b834f1993c85e3488018f41bc 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.

dzmitry-antonenka-sap avatar Jun 01 '22 05:06 dzmitry-antonenka-sap

Thanks for your comment. We will check with our design experts and get back to you later.

billzhou0223 avatar Jun 13 '22 19:06 billzhou0223