Skip to content

Commit

Permalink
Update PosterButton.swift | Adding accessibility support to media pos…
Browse files Browse the repository at this point in the history
…ters in media section of TVOS app (jellyfin#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 <[email protected]>
  • Loading branch information
Pa1yn-dev and LePips authored Oct 8, 2024
1 parent b44ad79 commit c5d6539
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Swiftfin tvOS/Components/PosterButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ struct PosterButton<Item: Poster>: View {
onFocusChanged(newValue)
}
}
.accessibilityLabel(item.displayTitle)

content()
.eraseToAnyView()
Expand Down Expand Up @@ -142,6 +143,7 @@ extension PosterButton {
Text(item.displayTitle)
.font(.footnote.weight(.regular))
.foregroundColor(.primary)
.accessibilityLabel(item.displayTitle)
}
}

Expand Down

0 comments on commit c5d6539

Please sign in to comment.