diff --git a/Sources/ICCery/LicenseWindowView.swift b/Sources/ICCery/LicenseWindowView.swift index 531ada4..f578c38 100644 --- a/Sources/ICCery/LicenseWindowView.swift +++ b/Sources/ICCery/LicenseWindowView.swift @@ -117,6 +117,7 @@ See: https://git.i3omb.com/gronod/argyllcms/releases .accessibilityIdentifier("agplIsolationNote") } .padding(.horizontal, 4) + .accessibilityElement(children: .contain) .accessibilityIdentifier("attributionSection") } .padding(24) @@ -124,6 +125,7 @@ See: https://git.i3omb.com/gronod/argyllcms/releases .frame(minWidth: 600, minHeight: 500) .background(Theme.panel) } + .accessibilityElement(children: .contain) .accessibilityIdentifier("licenseWindow") } diff --git a/Tests/ICCeryUITests/AboutHelpUITests.swift b/Tests/ICCeryUITests/AboutHelpUITests.swift index a842abd..17a6522 100644 --- a/Tests/ICCeryUITests/AboutHelpUITests.swift +++ b/Tests/ICCeryUITests/AboutHelpUITests.swift @@ -20,6 +20,13 @@ final class AboutHelpUITests: XCTestCase { private func element(_ id: String) -> XCUIElement { let inApp = app.descendants(matching: .any)[id].firstMatch if inApp.exists { return inApp } + // Search all sheets (including nested sheets) for the element. + // The license window is a nested sheet (sheet presented from AboutView). + for sheet in app.sheets.allElementsBoundByIndex { + let inSheet = sheet.descendants(matching: .any)[id].firstMatch + if inSheet.exists { return inSheet } + } + // Fallback to original behavior return app.sheets.firstMatch.descendants(matching: .any)[id].firstMatch }