From 9de464d3c4863f495ae6cc62a370776ac5675ad0 Mon Sep 17 00:00:00 2001 From: "Takuto NAKAMURA (Kyome)" Date: Tue, 10 Sep 2024 16:33:34 +0900 Subject: [PATCH] Added accessibility identifier to View element. --- Sources/LicenseList/LicenseListView.swift | 1 + Sources/LicenseList/LicenseView.swift | 1 + Sources/LicenseList/View+Extensions.swift | 1 + 3 files changed, 3 insertions(+) diff --git a/Sources/LicenseList/LicenseListView.swift b/Sources/LicenseList/LicenseListView.swift index 1d43c55..9792b4a 100644 --- a/Sources/LicenseList/LicenseListView.swift +++ b/Sources/LicenseList/LicenseListView.swift @@ -23,5 +23,6 @@ public struct LicenseListView: View { navigationHandler: navigationHandler, licenseViewStyle: _licenseViewStyle ))) + .accessibilityIdentifier("license_list_view") } } diff --git a/Sources/LicenseList/LicenseView.swift b/Sources/LicenseList/LicenseView.swift index d55d8c7..7c3e78d 100644 --- a/Sources/LicenseList/LicenseView.swift +++ b/Sources/LicenseList/LicenseView.swift @@ -26,6 +26,7 @@ public struct LicenseView: View { .onAppear { attributedLicenseBody = attribute(library.licenseBody) } + .accessibilityIdentifier("license_view") } private func attribute(_ inputText: String) -> AttributedString { diff --git a/Sources/LicenseList/View+Extensions.swift b/Sources/LicenseList/View+Extensions.swift index 7cf36b8..f561f66 100644 --- a/Sources/LicenseList/View+Extensions.swift +++ b/Sources/LicenseList/View+Extensions.swift @@ -34,6 +34,7 @@ extension View { } label: { Image(systemName: "link") } + .accessibilityIdentifier("repository_anchor_link") } } }