|
@@ -1388,6 +1388,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 +1397,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 +1434,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 +1444,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
|
|
|
// image Favorite
|
|
|
if metadata.favorite {
|
|
|
cell.imageFavorite.image = NCBrandColor.cacheImages.favorite
|
|
|
+ a11yValues.append(NSLocalizedString("_favorite_", comment: ""))
|
|
|
}
|
|
|
|
|
|
// Share image
|
|
@@ -1490,10 +1498,14 @@ 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: ""))
|
|
|
}
|
|
|
+ cell.accessibilityValue = a11yValues.joined(separator: ", ")
|
|
|
|
|
|
// E2EE
|
|
|
if metadata.e2eEncrypted || isEncryptedFolder {
|
|
@@ -1559,9 +1571,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 +1616,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 +1625,7 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
|
|
|
// image Favorite
|
|
|
if metadata.favorite {
|
|
|
cell.imageFavorite.image = NCBrandColor.cacheImages.favorite
|
|
|
+ a11yValues.append(NSLocalizedString("_favorite_", comment: ""))
|
|
|
}
|
|
|
|
|
|
// Transfer
|
|
@@ -1617,7 +1638,9 @@ extension NCCollectionViewCommon: UICollectionViewDataSource {
|
|
|
// Live Photo
|
|
|
if metadata.livePhoto {
|
|
|
cell.imageStatus.image = NCBrandColor.cacheImages.livePhoto
|
|
|
+ a11yValues.append(NSLocalizedString("_upload_mov_livephoto_", comment: ""))
|
|
|
}
|
|
|
+ cell.accessibilityValue = a11yValues.joined(separator: ", ")
|
|
|
|
|
|
// Edit mode
|
|
|
if isEditMode {
|