Skip to content

Commit

Permalink
Add missing accessibility labels on All Chats buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Oct 3, 2022
1 parent 26665fd commit b3e9b83
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,7 @@ Tap the + to start adding people.";

"room_recents_recently_viewed_section" = "Recently viewed";

"all_chats_user_menu_accessibility_label" = "User menu";
"all_chats_user_menu_settings" = "User settings";

"all_chats_edit_menu_leave_space" = "Leave %@";
Expand Down
4 changes: 4 additions & 0 deletions Riot/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ public class VectorL10n: NSObject {
public static var allChatsTitle: String {
return VectorL10n.tr("Vector", "all_chats_title")
}
/// User menu
public static var allChatsUserMenuAccessibilityLabel: String {
return VectorL10n.tr("Vector", "all_chats_user_menu_accessibility_label")
}
/// User settings
public static var allChatsUserMenuSettings: String {
return VectorL10n.tr("Vector", "all_chats_user_menu_settings")
Expand Down
1 change: 1 addition & 0 deletions Riot/Modules/Home/AllChats/AllChatsCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ class AllChatsCoordinator: NSObject, SplitViewMasterCoordinatorProtocol {
button.menu = menu
button.showsMenuAsPrimaryAction = true
button.autoresizingMask = [.flexibleHeight, .flexibleWidth]
button.accessibilityLabel = VectorL10n.allChatsUserMenuAccessibilityLabel
view.addSubview(button)
self.avatarMenuButton = button

Expand Down
6 changes: 5 additions & 1 deletion Riot/Modules/Home/AllChats/AllChatsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,12 @@ class AllChatsViewController: HomeViewController {

self.isToolbarHidden = false
self.update(with: ThemeService.shared().theme)

let spacesButton = UIBarButtonItem(image: Asset.Images.allChatsSpacesIcon.image, style: .done, target: self, action: #selector(self.showSpaceSelectorAction(sender: )))
spacesButton.accessibilityLabel = VectorL10n.spaceSelectorTitle

self.toolbar.items = [
UIBarButtonItem(image: Asset.Images.allChatsSpacesIcon.image, style: .done, target: self, action: #selector(self.showSpaceSelectorAction(sender: ))),
spacesButton,
UIBarButtonItem.flexibleSpace(),
UIBarButtonItem(image: Asset.Images.allChatsEditIcon.image, menu: menu)
]
Expand Down
1 change: 1 addition & 0 deletions changelog.d/6580.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Voiceover: Add labels to User Menu and My Spaces buttons on the All Chats view.

0 comments on commit b3e9b83

Please sign in to comment.