Browse Source

AddToPlaylistViewController: newPlaylistButton: Add accessibility

Soomin Lee 6 years ago
parent
commit
1bcd87910b

+ 2 - 0
Resources/en.lproj/Localizable.strings

@@ -306,6 +306,8 @@
 
 
 "PLAYLIST_PLACEHOLDER" = "Playlist title";
 "PLAYLIST_PLACEHOLDER" = "Playlist title";
 "PLAYLIST_DESCRIPTION" = "Choose a title for your new playlist";
 "PLAYLIST_DESCRIPTION" = "Choose a title for your new playlist";
+"PLAYLIST_CREATION" = "Create a new playlist";
+"PLAYLIST_CREATION_HINT" = "Show an interactive action to create a playlist";
 "ERROR_PLAYLIST_CREATION" = "Failed to create a playlist";
 "ERROR_PLAYLIST_CREATION" = "Failed to create a playlist";
 "ERROR_PLAYLIST_TRACKS" = "Failed to retrieve tracks";
 "ERROR_PLAYLIST_TRACKS" = "Failed to retrieve tracks";
 
 

+ 2 - 0
Sources/AddToPlaylistViewController.swift

@@ -135,6 +135,8 @@ private extension AddToPlaylistViewController {
         newPlaylistButton.layer.masksToBounds = true
         newPlaylistButton.layer.masksToBounds = true
         newPlaylistButton.layer.cornerRadius = 10
         newPlaylistButton.layer.cornerRadius = 10
         newPlaylistButton.backgroundColor = PresentationTheme.current.colors.orangeUI
         newPlaylistButton.backgroundColor = PresentationTheme.current.colors.orangeUI
+        newPlaylistButton.accessibilityLabel = NSLocalizedString("PLAYLIST_CREATION", comment: "")
+        newPlaylistButton.accessibilityHint = NSLocalizedString("PLAYLIST_CREATION_HINT", comment: "")
     }
     }
 
 
     private func setupPlaylistCollectionView() {
     private func setupPlaylistCollectionView() {