浏览代码

AddToPlaylistViewController: newPlaylistButton: Add accessibility

Soomin Lee 6 年之前
父节点
当前提交
1bcd87910b
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2 0
      Resources/en.lproj/Localizable.strings
  2. 2 0
      Sources/AddToPlaylistViewController.swift

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

@@ -306,6 +306,8 @@
 
 "PLAYLIST_PLACEHOLDER" = "Playlist title";
 "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_TRACKS" = "Failed to retrieve tracks";
 

+ 2 - 0
Sources/AddToPlaylistViewController.swift

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