Selaa lähdekoodia

Merge pull request #1989 from nextcloud/fix/share-ui-a11y

UI & Accessibility fixes
Marino Faggiana 2 vuotta sitten
vanhempi
commit
aa884c2849
57 muutettua tiedostoa jossa 173 lisäystä ja 238 poistoa
  1. 1 1
      iOSClient/Activity/NCActivity.swift
  2. 1 1
      iOSClient/Extensions/UIApplication+Orientation.swift
  3. 0 15
      iOSClient/Images.xcassets/closeVideo.imageset/Contents.json
  4. BIN
      iOSClient/Images.xcassets/closeVideo.imageset/closeVideo.pdf
  5. 0 15
      iOSClient/Images.xcassets/edit.imageset/Contents.json
  6. BIN
      iOSClient/Images.xcassets/edit.imageset/edit.pdf
  7. 1 1
      iOSClient/Images.xcassets/eye.imageset/Contents.json
  8. 1 0
      iOSClient/Images.xcassets/eye.imageset/eye.svg
  9. 0 23
      iOSClient/Images.xcassets/photoEditorCancel.imageset/Contents.json
  10. BIN
      iOSClient/Images.xcassets/photoEditorCancel.imageset/photoEditorCancel.png
  11. BIN
      iOSClient/Images.xcassets/photoEditorCancel.imageset/photoEditorCancel@2x.png
  12. BIN
      iOSClient/Images.xcassets/photoEditorCancel.imageset/photoEditorCancel@3x.png
  13. 0 23
      iOSClient/Images.xcassets/photoEditorClear.imageset/Contents.json
  14. BIN
      iOSClient/Images.xcassets/photoEditorClear.imageset/photoEditorClear.png
  15. BIN
      iOSClient/Images.xcassets/photoEditorClear.imageset/photoEditorClear@2x.png
  16. BIN
      iOSClient/Images.xcassets/photoEditorClear.imageset/photoEditorClear@3x.png
  17. 0 23
      iOSClient/Images.xcassets/photoEditorCrop.imageset/Contents.json
  18. BIN
      iOSClient/Images.xcassets/photoEditorCrop.imageset/photoEditorCrop.png
  19. BIN
      iOSClient/Images.xcassets/photoEditorCrop.imageset/photoEditorCrop@2x.png
  20. BIN
      iOSClient/Images.xcassets/photoEditorCrop.imageset/photoEditorCrop@3x.png
  21. 0 23
      iOSClient/Images.xcassets/photoEditorDone.imageset/Contents.json
  22. BIN
      iOSClient/Images.xcassets/photoEditorDone.imageset/photoEditorDone.png
  23. BIN
      iOSClient/Images.xcassets/photoEditorDone.imageset/photoEditorDone@2x.png
  24. BIN
      iOSClient/Images.xcassets/photoEditorDone.imageset/photoEditorDone@3x.png
  25. 0 23
      iOSClient/Images.xcassets/photoEditorDraw.imageset/Contents.json
  26. BIN
      iOSClient/Images.xcassets/photoEditorDraw.imageset/photoEditorDraw.png
  27. BIN
      iOSClient/Images.xcassets/photoEditorDraw.imageset/photoEditorDraw@2x.png
  28. BIN
      iOSClient/Images.xcassets/photoEditorDraw.imageset/photoEditorDraw@3x.png
  29. 0 23
      iOSClient/Images.xcassets/photoEditorText.imageset/Contents.json
  30. BIN
      iOSClient/Images.xcassets/photoEditorText.imageset/photoEditorText.png
  31. BIN
      iOSClient/Images.xcassets/photoEditorText.imageset/photoEditorText@2x.png
  32. BIN
      iOSClient/Images.xcassets/photoEditorText.imageset/photoEditorText@3x.png
  33. 0 15
      iOSClient/Images.xcassets/tabBarFavorites.imageset/Contents.json
  34. BIN
      iOSClient/Images.xcassets/tabBarFavorites.imageset/tabBarFavorites.pdf
  35. 0 15
      iOSClient/Images.xcassets/tabBarMedia.imageset/Contents.json
  36. BIN
      iOSClient/Images.xcassets/tabBarMedia.imageset/tabBarMedia.pdf
  37. BIN
      iOSClient/Images.xcassets/userStatusOnline.imageset/online.pdf
  38. 0 23
      iOSClient/Images.xcassets/visiblePassword.imageset/Contents.json
  39. BIN
      iOSClient/Images.xcassets/visiblePassword.imageset/visiblePassword.png
  40. BIN
      iOSClient/Images.xcassets/visiblePassword.imageset/visiblePassword@2x.png
  41. BIN
      iOSClient/Images.xcassets/visiblePassword.imageset/visiblePassword@3x.png
  42. 30 1
      iOSClient/Main/Collection Common/NCCollectionViewCommon.swift
  43. 23 0
      iOSClient/Main/Collection Common/NCGridCell.swift
  44. 27 0
      iOSClient/Main/Collection Common/NCListCell.swift
  45. 2 2
      iOSClient/Main/NCMainTabBar.swift
  46. 13 0
      iOSClient/Menu/NCMenu+FloatingPanel.swift
  47. 3 3
      iOSClient/Menu/NCShare+Menu.swift
  48. 4 0
      iOSClient/Share/Advanced/NCShareCells.swift
  49. 2 0
      iOSClient/Share/NCShare.swift
  50. 3 0
      iOSClient/Share/NCShareLinkCell.swift
  51. 6 0
      iOSClient/Share/NCShareUserCell.swift
  52. 22 3
      iOSClient/Supporting Files/en.lproj/Localizable.strings
  53. 9 0
      iOSClient/Transfers/NCTransferCell.swift
  54. 1 0
      iOSClient/Transfers/NCTransfers.swift
  55. 21 4
      iOSClient/Trash/Cell/NCTrashListCell.swift
  56. 2 0
      iOSClient/Trash/NCTrash+CollectionView.swift
  57. 1 1
      iOSClient/Utility/NCUtility.swift

+ 1 - 1
iOSClient/Activity/NCActivity.swift

@@ -498,7 +498,7 @@ extension NCActivity: NCShareCommentsCellDelegate {
         actions.append(
             NCMenuAction(
                 title: NSLocalizedString("_edit_comment_", comment: ""),
-                icon: UIImage(named: "edit")!.image(color: NCBrandColor.shared.gray, size: 50),
+                icon: UIImage(named: "pencil")!.image(color: NCBrandColor.shared.gray, size: 50),
                 action: { _ in
                     guard let metadata = self.metadata, let tableComments = tableComments else { return }
 

+ 1 - 1
iOSClient/Extensions/UIApplication+Orientation.swift

@@ -20,7 +20,7 @@
 //  You should have received a copy of the GNU General Public License
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //
-import Foundation
+import UIKit
 
 extension UIApplication {
     // indicates if current device is in landscape orientation

+ 0 - 15
iOSClient/Images.xcassets/closeVideo.imageset/Contents.json

@@ -1,15 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "closeVideo.pdf",
-      "idiom" : "universal"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  },
-  "properties" : {
-    "preserves-vector-representation" : true
-  }
-}

BIN
iOSClient/Images.xcassets/closeVideo.imageset/closeVideo.pdf


+ 0 - 15
iOSClient/Images.xcassets/edit.imageset/Contents.json

@@ -1,15 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "filename" : "edit.pdf"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  },
-  "properties" : {
-    "preserves-vector-representation" : true
-  }
-}

BIN
iOSClient/Images.xcassets/edit.imageset/edit.pdf


+ 1 - 1
iOSClient/Images.xcassets/userStatusOnline.imageset/Contents.json → iOSClient/Images.xcassets/eye.imageset/Contents.json

@@ -1,7 +1,7 @@
 {
   "images" : [
     {
-      "filename" : "online.pdf",
+      "filename" : "eye.svg",
       "idiom" : "universal"
     }
   ],

+ 1 - 0
iOSClient/Images.xcassets/eye.imageset/eye.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 15.06"><path d="M12.004 15.06q1.774 0 3.351-.426 1.576-.425 2.911-1.124 1.334-.698 2.393-1.541 1.058-.843 1.804-1.69.747-.848 1.142-1.572Q24 7.982 24 7.535q0-.448-.395-1.173-.395-.724-1.142-1.572-.746-.847-1.804-1.69-1.059-.843-2.398-1.541Q16.922.861 15.346.435 13.769.009 12.004.009q-1.747 0-3.315.426-1.567.426-2.906 1.124-1.34.698-2.406 1.541-1.067.843-1.823 1.69Q.799 5.638.4 6.362 0 7.087 0 7.535q0 .447.4 1.172.399.724 1.154 1.572.756.847 1.818 1.69 1.063.843 2.402 1.541 1.339.699 2.907 1.124 1.567.426 3.323.426Zm0-1.387q-1.449 0-2.783-.36-1.335-.36-2.503-.953-1.168-.593-2.116-1.295-.949-.703-1.638-1.392-.69-.689-1.058-1.26-.369-.571-.369-.878 0-.264.369-.808.368-.545 1.058-1.243.689-.698 1.638-1.409.948-.712 2.116-1.322 1.168-.61 2.503-.984 1.334-.373 2.783-.373 1.441 0 2.771.373 1.33.374 2.498.984 1.168.61 2.121 1.322.953.711 1.638 1.409.685.698 1.058 1.243.373.544.373.808 0 .307-.373.878t-1.058 1.26q-.685.689-1.638 1.392-.953.702-2.121 1.295-1.168.593-2.498.953-1.33.36-2.771.36Zm0-1.221q1.019 0 1.915-.386.895-.387 1.572-1.067.676-.681 1.058-1.572t.382-1.892q0-1.028-.382-1.924-.382-.895-1.058-1.567-.677-.672-1.572-1.049-.896-.378-1.915-.378-1.036 0-1.932.378-.895.377-1.571 1.049-.677.672-1.059 1.567-.382.896-.382 1.924.009 1.001.391 1.892t1.058 1.572q.676.68 1.568 1.067.891.386 1.927.386Zm0-3.284q-.685 0-1.168-.483-.483-.483-.483-1.15 0-.677.483-1.155.483-.479 1.168-.479.677 0 1.16.479.483.478.483 1.155 0 .667-.483 1.15-.483.483-1.16.483Z"/></svg>

+ 0 - 23
iOSClient/Images.xcassets/photoEditorCancel.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorCancel.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorCancel@2x.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorCancel@3x.png",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/photoEditorCancel.imageset/photoEditorCancel.png


BIN
iOSClient/Images.xcassets/photoEditorCancel.imageset/photoEditorCancel@2x.png


BIN
iOSClient/Images.xcassets/photoEditorCancel.imageset/photoEditorCancel@3x.png


+ 0 - 23
iOSClient/Images.xcassets/photoEditorClear.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorClear.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorClear@2x.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorClear@3x.png",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/photoEditorClear.imageset/photoEditorClear.png


BIN
iOSClient/Images.xcassets/photoEditorClear.imageset/photoEditorClear@2x.png


BIN
iOSClient/Images.xcassets/photoEditorClear.imageset/photoEditorClear@3x.png


+ 0 - 23
iOSClient/Images.xcassets/photoEditorCrop.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorCrop.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorCrop@2x.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorCrop@3x.png",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/photoEditorCrop.imageset/photoEditorCrop.png


BIN
iOSClient/Images.xcassets/photoEditorCrop.imageset/photoEditorCrop@2x.png


BIN
iOSClient/Images.xcassets/photoEditorCrop.imageset/photoEditorCrop@3x.png


+ 0 - 23
iOSClient/Images.xcassets/photoEditorDone.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorDone.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorDone@2x.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorDone@3x.png",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/photoEditorDone.imageset/photoEditorDone.png


BIN
iOSClient/Images.xcassets/photoEditorDone.imageset/photoEditorDone@2x.png


BIN
iOSClient/Images.xcassets/photoEditorDone.imageset/photoEditorDone@3x.png


+ 0 - 23
iOSClient/Images.xcassets/photoEditorDraw.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorDraw.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorDraw@2x.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorDraw@3x.png",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/photoEditorDraw.imageset/photoEditorDraw.png


BIN
iOSClient/Images.xcassets/photoEditorDraw.imageset/photoEditorDraw@2x.png


BIN
iOSClient/Images.xcassets/photoEditorDraw.imageset/photoEditorDraw@3x.png


+ 0 - 23
iOSClient/Images.xcassets/photoEditorText.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorText.png",
-      "scale" : "1x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorText@2x.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "photoEditorText@3x.png",
-      "scale" : "3x"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/photoEditorText.imageset/photoEditorText.png


BIN
iOSClient/Images.xcassets/photoEditorText.imageset/photoEditorText@2x.png


BIN
iOSClient/Images.xcassets/photoEditorText.imageset/photoEditorText@3x.png


+ 0 - 15
iOSClient/Images.xcassets/tabBarFavorites.imageset/Contents.json

@@ -1,15 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "tabBarFavorites.pdf",
-      "idiom" : "universal"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  },
-  "properties" : {
-    "preserves-vector-representation" : true
-  }
-}

BIN
iOSClient/Images.xcassets/tabBarFavorites.imageset/tabBarFavorites.pdf


+ 0 - 15
iOSClient/Images.xcassets/tabBarMedia.imageset/Contents.json

@@ -1,15 +0,0 @@
-{
-  "images" : [
-    {
-      "filename" : "tabBarMedia.pdf",
-      "idiom" : "universal"
-    }
-  ],
-  "info" : {
-    "author" : "xcode",
-    "version" : 1
-  },
-  "properties" : {
-    "preserves-vector-representation" : true
-  }
-}

BIN
iOSClient/Images.xcassets/tabBarMedia.imageset/tabBarMedia.pdf


BIN
iOSClient/Images.xcassets/userStatusOnline.imageset/online.pdf


+ 0 - 23
iOSClient/Images.xcassets/visiblePassword.imageset/Contents.json

@@ -1,23 +0,0 @@
-{
-  "images" : [
-    {
-      "idiom" : "universal",
-      "scale" : "1x",
-      "filename" : "visiblePassword.png"
-    },
-    {
-      "idiom" : "universal",
-      "filename" : "visiblePassword@2x.png",
-      "scale" : "2x"
-    },
-    {
-      "idiom" : "universal",
-      "scale" : "3x",
-      "filename" : "visiblePassword@3x.png"
-    }
-  ],
-  "info" : {
-    "version" : 1,
-    "author" : "xcode"
-  }
-}

BIN
iOSClient/Images.xcassets/visiblePassword.imageset/visiblePassword.png


BIN
iOSClient/Images.xcassets/visiblePassword.imageset/visiblePassword@2x.png


BIN
iOSClient/Images.xcassets/visiblePassword.imageset/visiblePassword@3x.png


+ 30 - 1
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -44,7 +44,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
     internal var metadataFolder: tableMetadata?
     internal var dataSource = NCDataSource()
     internal var richWorkspaceText: String?
-    internal var header: UIView?
+    internal var header: NCSectionHeaderMenu?
 
     internal var layoutForView: NCGlobal.layoutForViewType?
 
@@ -741,6 +741,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
 
         if collectionView.collectionViewLayout == gridLayout {
             // list layout
+            header?.buttonSwitch.accessibilityLabel = NSLocalizedString("_grid_view_", comment: "")
             UIView.animate(withDuration: 0.0, animations: {
                 self.collectionView.collectionViewLayout.invalidateLayout()
                 self.collectionView.setCollectionViewLayout(self.listLayout, animated: false, completion: { _ in
@@ -751,6 +752,7 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
             NCUtility.shared.setLayoutForView(key: layoutKey, serverUrl: serverUrl, layout: layoutForView?.layout)
         } else {
             // grid layout
+            header?.buttonSwitch.accessibilityLabel = NSLocalizedString("_list_view_", comment: "")
             UIView.animate(withDuration: 0.0, animations: {
                 self.collectionView.collectionViewLayout.invalidateLayout()
                 self.collectionView.setCollectionViewLayout(self.gridLayout, animated: false, completion: { _ in
@@ -1267,8 +1269,10 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
 
             if collectionView.collectionViewLayout == gridLayout {
                 header.buttonSwitch.setImage(UIImage(named: "switchList")!.image(color: NCBrandColor.shared.gray, size: 50), for: .normal)
+                header.buttonSwitch.accessibilityLabel = NSLocalizedString("_list_view_", comment: "")
             } else {
                 header.buttonSwitch.setImage(UIImage(named: "switchGrid")!.image(color: NCBrandColor.shared.gray, size: 50), for: .normal)
+                header.buttonSwitch.accessibilityLabel = NSLocalizedString("_grid_view_", comment: "")
             }
 
             header.delegate = self
@@ -1388,6 +1392,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 progress = progressType.progress
                 totalBytes = progressType.totalBytes
             }
+
             if metadata.status == NCGlobal.shared.metadataStatusDownloading || metadata.status == NCGlobal.shared.metadataStatusUploading {
                 cell.progressView.isHidden = false
                 cell.progressView.progress = progress
@@ -1396,6 +1401,11 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 cell.progressView.progress = 0.0
             }
 
+            var a11yValues: [String] = []
+            if metadata.ownerId != appDelegate.userId, appDelegate.account == metadata.account {
+                a11yValues.append(NSLocalizedString("_shared_with_you_by_", comment: "") + " " + metadata.ownerDisplayName)
+            }
+
             if metadata.directory {
 
                 if metadata.e2eEncrypted {
@@ -1428,6 +1438,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
 
                 // image local
                 if dataSource.metadataOffLine.contains(metadata.ocId) {
+                    a11yValues.append(NSLocalizedString("_offline_", comment: ""))
                     cell.imageLocal.image = NCBrandColor.cacheImages.offlineFlag
                 } else if CCUtility.fileProviderStorageExists(metadata) {
                     cell.imageLocal.image = NCBrandColor.cacheImages.local
@@ -1437,6 +1448,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             // image Favorite
             if metadata.favorite {
                 cell.imageFavorite.image = NCBrandColor.cacheImages.favorite
+                a11yValues.append(NSLocalizedString("_favorite_", comment: ""))
             }
 
             // Share image
@@ -1490,9 +1502,12 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 break
             }
 
+            cell.accessibilityLabel = metadata.fileNameView + ", " + (cell.labelInfo.text ?? "")
+
             // Live Photo
             if metadata.livePhoto {
                 cell.imageStatus.image = NCBrandColor.cacheImages.livePhoto
+                a11yValues.append(NSLocalizedString("_upload_mov_livephoto_", comment: ""))
             }
 
             // E2EE
@@ -1514,12 +1529,14 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 cell.selectMode(true)
                 if selectOcId.contains(metadata.ocId) {
                     cell.selected(true)
+                    a11yValues.append(NSLocalizedString("_selected_", comment: ""))
                 } else {
                     cell.selected(false)
                 }
             } else {
                 cell.selectMode(false)
             }
+            cell.accessibilityValue = a11yValues.joined(separator: ", ")
 
             // Disable Share Button
             if appDelegate.disableSharesView {
@@ -1559,9 +1576,16 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             if metadata.status == NCGlobal.shared.metadataStatusDownloading || metadata.status == NCGlobal.shared.metadataStatusUploading {
                 cell.progressView.isHidden = false
                 cell.progressView.progress = progress
+                cell.accessibilityLabel = metadata.fileNameView + ", \(Int(progress * 100))%"
             } else {
                 cell.progressView.isHidden = true
                 cell.progressView.progress = 0.0
+                cell.accessibilityLabel = metadata.fileNameView
+            }
+
+            var a11yValues: [String] = []
+            if metadata.ownerId != appDelegate.userId, appDelegate.account == metadata.account {
+                a11yValues.append(NSLocalizedString("_shared_with_you_by_", comment: "") + " " + metadata.ownerDisplayName)
             }
 
             if metadata.directory {
@@ -1597,6 +1621,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 // image Local
                 if dataSource.metadataOffLine.contains(metadata.ocId) {
                     cell.imageLocal.image = NCBrandColor.cacheImages.offlineFlag
+                    a11yValues.append(NSLocalizedString("_offline_", comment: ""))
                 } else if CCUtility.fileProviderStorageExists(metadata) {
                     cell.imageLocal.image = NCBrandColor.cacheImages.local
                 }
@@ -1605,6 +1630,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             // image Favorite
             if metadata.favorite {
                 cell.imageFavorite.image = NCBrandColor.cacheImages.favorite
+                a11yValues.append(NSLocalizedString("_favorite_", comment: ""))
             }
 
             // Transfer
@@ -1617,6 +1643,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
             // Live Photo
             if metadata.livePhoto {
                 cell.imageStatus.image = NCBrandColor.cacheImages.livePhoto
+                a11yValues.append(NSLocalizedString("_upload_mov_livephoto_", comment: ""))
             }
 
             // Edit mode
@@ -1624,12 +1651,14 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
                 cell.selectMode(true)
                 if selectOcId.contains(metadata.ocId) {
                     cell.selected(true)
+                    a11yValues.append(NSLocalizedString("_selected_", comment: ""))
                 } else {
                     cell.selected(false)
                 }
             } else {
                 cell.selectMode(false)
             }
+            cell.accessibilityValue = a11yValues.joined(separator: ", ")
 
             return cell
         }

+ 23 - 0
iOSClient/Main/Collection Common/NCGridCell.swift

@@ -72,6 +72,12 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
     override func awakeFromNib() {
         super.awakeFromNib()
 
+        // use entire cell as accessibility element
+        accessibilityHint = nil
+        accessibilityLabel = nil
+        accessibilityValue = nil
+        isAccessibilityElement = true
+
         imageItem.layer.cornerRadius = 6
         imageItem.layer.masksToBounds = true
 
@@ -99,6 +105,9 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
     override func prepareForReuse() {
         super.prepareForReuse()
         imageItem.backgroundColor = nil
+        accessibilityHint = nil
+        accessibilityLabel = nil
+        accessibilityValue = nil
     }
 
     @IBAction func touchUpInsideMore(_ sender: Any) {
@@ -113,9 +122,21 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
         delegate?.longPressGridItem(with: objectId, gestureRecognizer: gestureRecognizer)
     }
 
+    fileprivate func setA11yActions() {
+        let moreName = namedButtonMore == NCGlobal.shared.buttonMoreStop ? "_cancel_" : "_more_"
+        
+        self.accessibilityCustomActions = [
+            UIAccessibilityCustomAction(
+                name: NSLocalizedString(moreName, comment: ""),
+                target: self,
+                selector: #selector(touchUpInsideMore))
+        ]
+    }
+    
     func setButtonMore(named: String, image: UIImage) {
         namedButtonMore = named
         buttonMore.setImage(image, for: .normal)
+        setA11yActions()
     }
 
     func hideButtonMore(_ status: Bool) {
@@ -125,9 +146,11 @@ class NCGridCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
     func selectMode(_ status: Bool) {
         if status {
             imageSelect.isHidden = false
+            accessibilityCustomActions = nil
         } else {
             imageSelect.isHidden = true
             imageVisualEffect.isHidden = true
+            setA11yActions()
         }
     }
 

+ 27 - 0
iOSClient/Main/Collection Common/NCListCell.swift

@@ -80,6 +80,12 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
         imageItem.layer.cornerRadius = 6
         imageItem.layer.masksToBounds = true
 
+        // use entire cell as accessibility element
+        accessibilityHint = nil
+        accessibilityLabel = nil
+        accessibilityValue = nil
+        isAccessibilityElement = true
+
         progressView.tintColor = NCBrandColor.shared.brandElement
         progressView.transform = CGAffineTransform(scaleX: 1.0, y: 0.5)
         progressView.trackTintColor = .clear
@@ -103,6 +109,9 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
     override func prepareForReuse() {
         super.prepareForReuse()
         imageItem.backgroundColor = nil
+        accessibilityHint = nil
+        accessibilityLabel = nil
+        accessibilityValue = nil
     }
 
     @IBAction func touchUpInsideShare(_ sender: Any) {
@@ -121,9 +130,25 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
         delegate?.longPressListItem(with: objectId, gestureRecognizer: gestureRecognizer)
     }
 
+    fileprivate func setA11yActions() {
+        let moreName = namedButtonMore == NCGlobal.shared.buttonMoreStop ? "_cancel_" : "_more_"
+        self.accessibilityCustomActions = [
+            UIAccessibilityCustomAction(
+                name: NSLocalizedString("_share_", comment: ""),
+                target: self,
+                selector: #selector(touchUpInsideShare)),
+            UIAccessibilityCustomAction(
+                name: NSLocalizedString(moreName, comment: ""),
+                target: self,
+                selector: #selector(touchUpInsideMore))
+        ]
+    }
+    
     func setButtonMore(named: String, image: UIImage) {
         namedButtonMore = named
         imageMore.image = image
+
+        setA11yActions()
     }
 
     func hideButtonMore(_ status: Bool) {
@@ -140,10 +165,12 @@ class NCListCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellProto
         if status {
             imageItemLeftConstraint.constant = 45
             imageSelect.isHidden = false
+            accessibilityCustomActions = nil
         } else {
             imageItemLeftConstraint.constant = 10
             imageSelect.isHidden = true
             backgroundView = nil
+            setA11yActions()
         }
     }
 

+ 2 - 2
iOSClient/Main/NCMainTabBar.swift

@@ -144,7 +144,7 @@ class NCMainTabBar: UITabBar {
         // Favorite
         if let item = items?[1] {
             item.title = NSLocalizedString("_favorites_", comment: "")
-            item.image = UIImage(named: "tabBarFavorites")?.image(color: NCBrandColor.shared.brandElement, size: 25)
+            item.image = UIImage(named: "star.fill")?.image(color: NCBrandColor.shared.brandElement, size: 25)
             item.selectedImage = item.image
         }
 
@@ -158,7 +158,7 @@ class NCMainTabBar: UITabBar {
         // Media
         if let item = items?[3] {
             item.title = NSLocalizedString("_media_", comment: "")
-            item.image = UIImage(named: "tabBarMedia")?.image(color: NCBrandColor.shared.brandElement, size: 25)
+            item.image = UIImage(named: "media")?.image(color: NCBrandColor.shared.brandElement, size: 25)
             item.selectedImage = item.image
         }
 

+ 13 - 0
iOSClient/Menu/NCMenu+FloatingPanel.swift

@@ -23,6 +23,7 @@
 
 import Foundation
 import FloatingPanel
+import UIKit
 
 class NCMenuFloatingPanelLayout: FloatingPanelLayout {
     var position: FloatingPanelPosition = .bottom
@@ -75,5 +76,17 @@ class NCMenuPanelController: FloatingPanelController {
         self.isRemovalInteractionEnabled = true
         self.backdropView.dismissalTapGestureRecognizer.isEnabled = true
         self.surfaceView.layer.cornerRadius = 16
+
+        surfaceView.grabberHandle.accessibilityLabel = NSLocalizedString("_cart_controller_", comment: "")
+
+        let collapseName = NSLocalizedString("_dismiss_menu_", comment: "")
+        let collapseAction = UIAccessibilityCustomAction(name: collapseName, target: self, selector: #selector(accessibilityActionCollapsePanel))
+
+        surfaceView.grabberHandle.accessibilityCustomActions = [collapseAction]
+        surfaceView.grabberHandle.isAccessibilityElement = true
     }
+
+    @objc private func accessibilityActionCollapsePanel() {
+        self.dismiss(animated: true)
+     }
 }

+ 3 - 3
iOSClient/Menu/NCShare+Menu.swift

@@ -43,7 +43,7 @@ extension NCShare {
         actions.append(
             NCMenuAction(
                 title: NSLocalizedString("_details_", comment: ""),
-                icon: NCUtility.shared.loadImage(named: "edit"),
+                icon: NCUtility.shared.loadImage(named: "pencil"),
                 action: { _ in
                     guard
                         let advancePermission = UIStoryboard(name: "NCShare", bundle: nil).instantiateViewController(withIdentifier: "NCShareAdvancePermission") as? NCShareAdvancePermission,
@@ -76,7 +76,7 @@ extension NCShare {
         actions.append(
             NCMenuAction(
                 title: NSLocalizedString("_share_read_only_", comment: ""),
-                icon: UIImage(),
+                icon: NCUtility.shared.loadImage(named: "eye"),
                 selected: tableShare.permissions == (NCGlobal.shared.permissionReadShare + NCGlobal.shared.permissionShareShare) || tableShare.permissions == NCGlobal.shared.permissionReadShare,
                 on: false,
                 action: { _ in
@@ -90,7 +90,7 @@ extension NCShare {
         actions.append(
             NCMenuAction(
                 title: isDirectory ? NSLocalizedString("_share_allow_upload_", comment: "") : NSLocalizedString("_share_editing_", comment: ""),
-                icon: UIImage(),
+                icon: NCUtility.shared.loadImage(named: "pencil"),
                 selected: hasUploadPermission(tableShare: tableShare),
                 on: false,
                 action: { _ in

+ 4 - 0
iOSClient/Share/Advanced/NCShareCells.swift

@@ -243,6 +243,8 @@ class NCShareToggleCell: UITableViewCell {
     typealias CustomToggleIcon = (onIconName: String?, offIconName: String?)
     init(isOn: Bool, customIcons: CustomToggleIcon? = nil) {
         super.init(style: .default, reuseIdentifier: "toggleCell")
+        self.accessibilityValue = isOn ? NSLocalizedString("_on_", comment: "") : NSLocalizedString("_off_", comment: "")
+
         guard let customIcons = customIcons,
               let iconName = isOn ? customIcons.onIconName : customIcons.offIconName else {
             self.accessoryType = isOn ? .checkmark : .none
@@ -286,6 +288,8 @@ class NCShareDateCell: UITableViewCell {
             self.onReload?()
         }
 
+        textField.isAccessibilityElement = false
+        textField.accessibilityElementsHidden = true
         textField.inputAccessoryView = toolbar.wrappedSafeAreaContainer
         textField.inputView = picker
 

+ 2 - 0
iOSClient/Share/NCShare.swift

@@ -128,6 +128,8 @@ class NCShare: UIViewController, NCShareNetworkingDelegate, NCSharePagingContent
             for: metadata.ownerId,
             displayName: metadata.ownerDisplayName,
             userBaseUrl: appDelegate)
+        sharedWithYouByLabel.accessibilityHint = NSLocalizedString("_show_profile_", comment: "")
+
         let shareAction = UITapGestureRecognizer(target: self, action: #selector(openShareProfile))
         sharedWithYouByImage.addGestureRecognizer(shareAction)
         let shareLabelAction = UITapGestureRecognizer(target: self, action: #selector(openShareProfile))

+ 3 - 0
iOSClient/Share/NCShareLinkCell.swift

@@ -48,6 +48,8 @@ class NCShareLinkCell: UITableViewCell {
         menuButton.isHidden = isInternalLink
         descriptionLabel.isHidden = !isInternalLink
         copyButton.isHidden = !isInternalLink && tableShare == nil
+        copyButton.accessibilityLabel = NSLocalizedString("_copy_", comment: "")
+        menuButton.accessibilityLabel = NSLocalizedString("_more_", comment: "")
 
         if isInternalLink {
             imageName = "shareInternalLink"
@@ -62,6 +64,7 @@ class NCShareLinkCell: UITableViewCell {
                 }
             } else {
                 menuImageName = "shareAdd"
+                menuButton.accessibilityLabel = NSLocalizedString("_add_", comment: "")
             }
 
             imageName = "sharebylink"

+ 6 - 0
iOSClient/Share/NCShareUserCell.swift

@@ -47,6 +47,10 @@ class NCShareUserCell: UITableViewCell, NCCellProtocol {
         guard let tableShare = tableShare else {
             return
         }
+        self.accessibilityCustomActions = [UIAccessibilityCustomAction(
+            name: NSLocalizedString("_show_profile_", comment: ""),
+            target: self,
+            selector: #selector(tapAvatarImage))]
 
         labelTitle.text = tableShare.shareWithDisplayname
         labelTitle.textColor = NCBrandColor.shared.label
@@ -54,6 +58,7 @@ class NCShareUserCell: UITableViewCell, NCCellProtocol {
         labelQuickStatus.isHidden = false
         imageDownArrow.isHidden = false
         buttonMenu.isHidden = false
+        buttonMenu.accessibilityLabel = NSLocalizedString("_more_", comment: "")
         imageItem.image = NCShareCommon.shared.getImageShareType(shareType: tableShare.shareType)
 
         let status = NCUtility.shared.getUserStatus(userIcon: tableShare.userIcon, userStatus: tableShare.userStatus, userMessage: tableShare.userMessage)
@@ -68,6 +73,7 @@ class NCShareUserCell: UITableViewCell, NCCellProtocol {
             buttonMenu.isHidden = true
         }
 
+        btnQuickStatus.accessibilityHint = NSLocalizedString("_user_sharee_footer_", comment: "")
         btnQuickStatus.setTitle("", for: .normal)
         btnQuickStatus.contentHorizontalAlignment = .left
 

+ 22 - 3
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -24,7 +24,6 @@
 "_tap_to_cancel_"           = "Tap to cancel";
 "_cancel_request_"          = "Do you want to cancel?";
 "_upload_file_"             = "Upload file";
-"_accessibility_add_upload_" = "Add and upload";
 "_download_file_"           = "Download file";
 "_loading_"                 = "Loading";
 "_loading_with_points_"     = "Loading …";
@@ -207,6 +206,8 @@
 "_default_color_"           = "Use the default color";
 "_as_default_color_"        = "Use as default color";
 
+// MARK: User Status
+
 /* User status */
 "_online_"                  = "Online";
 
@@ -566,6 +567,9 @@
 "_insert_password_pfd_"         = "Secured PDF. Enter password";
 "_password_pdf_error_"          = "Wrong password";
 "_error_download_photobrowser_" = "Error: Unable to download photo";
+
+// MARK: Share
+
 "_share_link_"                  = "Share link";
 "_share_link_button_"           = "Send link to …";
 "_share_link_name_"             = "Link name";
@@ -729,8 +733,8 @@
 "_go_online_"                       = "Go online to see the document";
 "_intro_1_title_"                   = "Keep your data secure and under your control";
 "_intro_2_title_"                   = "Secure collaboration & file exchange";
-"_intro_3_title_"                   = "Easy-to-use web mail, calendering & contacts";
-"_intro_4_title_"                   = "Screensharing, online meetings & web conferences";
+"_intro_3_title_"                   = "Easy-to-use web mail, calendaring & contacts";
+"_intro_4_title_"                   = "Screen sharing, online meetings & web conferences";
 "_log_in_"                          = "Log in";
 "_sign_up_"                         = "Sign up with provider";
 "_host_your_own_server"             = "Host your own server";
@@ -857,5 +861,20 @@
 "_subtitle_not_found_"      = "Subtitle not found";
 "_disable_"                 = "Disable";
 "_subtitle_not_dowloaded_"  = "There are subtitles not downloaded locally";
+
 // Tip
 "_tip_pdf_thumbnails_"      = "Swipe left from the right edge of the screen to show the thumbnails.";
+
+// MARK: Accessibility
+
+// Accessibility, floating panel top element
+"_cart_controller_"             = "Card controller";
+"_accessibility_add_upload_"    = "Add and upload";
+"_dismiss_menu_"                = "Dismiss the menu";
+"_show_profile_"                = "Show profile";
+// a11y: On/Off
+"_on_"                          = "On";
+// a11y: On/Off
+"_off_"                         = "Off";
+"_grid_view_"                   = "Show grid view";
+"_list_view_"                   = "Show list view";

+ 9 - 0
iOSClient/Transfers/NCTransferCell.swift

@@ -73,6 +73,8 @@ class NCTransferCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellP
     override func awakeFromNib() {
         super.awakeFromNib()
 
+        isAccessibilityElement = true
+
         imageItem.layer.cornerRadius = 6
         imageItem.layer.masksToBounds = true
 
@@ -120,6 +122,13 @@ class NCTransferCell: UICollectionViewCell, UIGestureRecognizerDelegate, NCCellP
     func setButtonMore(named: String, image: UIImage) {
         namedButtonMore = named
         imageMore.image = image
+        self.accessibilityCustomActions = [
+            UIAccessibilityCustomAction(
+                name: NSLocalizedString("_cancel_", comment: ""),
+                target: self,
+                selector: #selector(touchUpInsideMore))
+        ]
+
     }
 }
 

+ 1 - 0
iOSClient/Transfers/NCTransfers.swift

@@ -252,6 +252,7 @@ class NCTransfers: NCCollectionViewCommon, NCTransferCellDelegate {
             cell.labelInfo.text = ""
             break
         }
+        cell.accessibilityLabel = metadata.fileNameView + ", " + (cell.labelInfo.text ?? "")
 
         // Remove last separator
         if collectionView.numberOfItems(inSection: indexPath.section) == indexPath.row + 1 {

+ 21 - 4
iOSClient/Trash/Cell/NCTrashListCell.swift

@@ -50,6 +50,20 @@ class NCTrashListCell: UICollectionViewCell, NCTrashCell {
     override func awakeFromNib() {
         super.awakeFromNib()
 
+        isAccessibilityElement = true
+
+        self.accessibilityCustomActions = [
+            UIAccessibilityCustomAction(
+                name: NSLocalizedString("_restore_", comment: ""),
+                target: self,
+                selector: #selector(touchUpInsideRestore)),
+            UIAccessibilityCustomAction(
+                name: NSLocalizedString("_delete_", comment: ""),
+                target: self,
+                selector: #selector(touchUpInsideMore))
+
+        ]
+
         imageRestore.image = NCBrandColor.cacheImages.buttonRestore
         imageMore.image = NCUtility.shared.loadImage(named: "trash")
 
@@ -119,18 +133,21 @@ protocol NCTrashCell {
     func selectMode(_ status: Bool)
     func selected(_ status: Bool)
 }
-extension NCTrashCell {
+
+extension NCTrashCell where Self: UICollectionViewCell {
     mutating func setupCellUI(tableTrash: tableTrash, image: UIImage?) {
         self.objectId = tableTrash.fileId
         self.labelTitle.text = tableTrash.trashbinFileName
         self.labelTitle.textColor = NCBrandColor.shared.label
-
+        let infoText: String
         if tableTrash.directory {
             self.imageItem.image = NCBrandColor.cacheImages.folder
-            self.labelInfo?.text = CCUtility.dateDiff(tableTrash.date as Date)
+            infoText = CCUtility.dateDiff(tableTrash.date as Date)
         } else {
             self.imageItem.image = image
-            self.labelInfo?.text = CCUtility.dateDiff(tableTrash.date as Date) + ", " + CCUtility.transformedSize(tableTrash.size)
+            infoText = CCUtility.dateDiff(tableTrash.date as Date) + ", " + CCUtility.transformedSize(tableTrash.size)
         }
+        self.labelInfo?.text = infoText
+        self.accessibilityLabel = tableTrash.trashbinFileName + ", " + infoText
     }
 }

+ 2 - 0
iOSClient/Trash/NCTrash+CollectionView.swift

@@ -62,8 +62,10 @@ extension NCTrash: UICollectionViewDataSource {
 
             if collectionView.collectionViewLayout == gridLayout {
                 trashHeader.buttonSwitch.setImage(UIImage(named: "switchList")?.image(color: NCBrandColor.shared.gray, size: 25), for: .normal)
+                trashHeader.buttonSwitch.accessibilityLabel = NSLocalizedString("_list_view_", comment: "")
             } else {
                 trashHeader.buttonSwitch.setImage(UIImage(named: "switchGrid")?.image(color: NCBrandColor.shared.gray, size: 25), for: .normal)
+                trashHeader.buttonSwitch.accessibilityLabel = NSLocalizedString("_grid_view_", comment: "")
             }
 
             trashHeader.delegate = self

+ 1 - 1
iOSClient/Utility/NCUtility.swift

@@ -366,7 +366,7 @@ class NCUtility: NSObject {
         var messageUserDefined: String = ""
 
         if userStatus?.lowercased() == "online" {
-            onlineStatus = UIImage(named: "userStatusOnline")!.image(color: UIColor(red: 103.0/255.0, green: 176.0/255.0, blue: 134.0/255.0, alpha: 1.0), size: 50)
+            onlineStatus = UIImage(named: "circle_fill")!.image(color: UIColor(red: 103.0/255.0, green: 176.0/255.0, blue: 134.0/255.0, alpha: 1.0), size: 50)
             messageUserDefined = NSLocalizedString("_online_", comment: "")
         }
         if userStatus?.lowercased() == "away" {