From c5d65390189c614a0f54088d981be2a603bc89ae Mon Sep 17 00:00:00 2001 From: Peter Hamilton Date: Wed, 9 Oct 2024 00:07:59 +0100 Subject: [PATCH] Update PosterButton.swift | Adding accessibility support to media posters in media section of TVOS app (#1153) * Update PosterButton.swift Added accessibility labels to enable voice over on TVOS to read film titles on posters in media. * lint --------- Co-authored-by: Ethan Pippin --- Swiftfin tvOS/Components/PosterButton.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Swiftfin tvOS/Components/PosterButton.swift b/Swiftfin tvOS/Components/PosterButton.swift index 60761e85..1b977d7d 100644 --- a/Swiftfin tvOS/Components/PosterButton.swift +++ b/Swiftfin tvOS/Components/PosterButton.swift @@ -76,6 +76,7 @@ struct PosterButton: View { onFocusChanged(newValue) } } + .accessibilityLabel(item.displayTitle) content() .eraseToAnyView() @@ -142,6 +143,7 @@ extension PosterButton { Text(item.displayTitle) .font(.footnote.weight(.regular)) .foregroundColor(.primary) + .accessibilityLabel(item.displayTitle) } }