mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Expose room cells to voiceover on Home tab.
This commit is contained in:
@@ -52,6 +52,8 @@
|
||||
[path closePath]; // arrow top side
|
||||
arrowMaskLayer.path = path.CGPath;
|
||||
self.editionArrowView.layer.mask = arrowMaskLayer;
|
||||
|
||||
self.isAccessibilityElement = YES;
|
||||
}
|
||||
|
||||
- (void)customizeCollectionViewCellRendering
|
||||
@@ -86,6 +88,8 @@
|
||||
self.roomTitle1.hidden = YES;
|
||||
self.roomTitle2.hidden = YES;
|
||||
|
||||
NSMutableString *accessibilityLabel = [self.roomTitle.text mutableCopy];
|
||||
|
||||
// Check whether the room display name is an alias to keep visible the HS.
|
||||
if ([MXTools isMatrixRoomAlias:roomCellData.roomDisplayname])
|
||||
{
|
||||
@@ -97,6 +101,7 @@
|
||||
self.roomTitle1.text = [roomCellData.roomDisplayname substringToIndex:range.location + 1];
|
||||
self.roomTitle2.hidden = NO;
|
||||
self.roomTitle2.text = [roomCellData.roomDisplayname substringFromIndex:range.location + 1];
|
||||
accessibilityLabel = [[NSString stringWithFormat:@"%@, %@", self.roomTitle1.text, self.roomTitle2.text] mutableCopy];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +123,10 @@
|
||||
self.badgeLabel.hidden = NO;
|
||||
self.badgeLabel.badgeColor = roomCellData.highlightCount ? ThemeService.shared.theme.noticeColor : ThemeService.shared.theme.noticeSecondaryColor;
|
||||
self.badgeLabel.text = roomCellData.notificationCountStringValue;
|
||||
|
||||
NSUInteger count = roomCellData.notificationCount;
|
||||
NSString *newMessagesLabel = count == 1 ? [VectorL10n roomNewMessageNotification:count] : [VectorL10n roomNewMessagesNotification:count];
|
||||
[accessibilityLabel appendFormat:@", %@", newMessagesLabel];
|
||||
}
|
||||
|
||||
// Use bold font for the room title
|
||||
@@ -130,6 +139,8 @@
|
||||
|
||||
}
|
||||
|
||||
self.accessibilityLabel = accessibilityLabel;
|
||||
|
||||
[self.roomAvatar vc_setRoomAvatarImageWith:roomCellData.avatarUrl
|
||||
roomId:roomCellData.roomIdentifier
|
||||
displayName:roomCellData.roomDisplayname
|
||||
|
||||
Reference in New Issue
Block a user