Merge pull request #544 from j-f1/account-header-a11y
Add accessibility labels to the profile navigation bar
This commit is contained in:
commit
7a3039570a
|
@ -51,6 +51,7 @@ final class ProfileViewController: UIViewController, NeedsDependency, MediaPrevi
|
||||||
action: #selector(ProfileViewController.settingBarButtonItemPressed(_:))
|
action: #selector(ProfileViewController.settingBarButtonItemPressed(_:))
|
||||||
)
|
)
|
||||||
barButtonItem.tintColor = .white
|
barButtonItem.tintColor = .white
|
||||||
|
barButtonItem.accessibilityLabel = L10n.Common.Controls.Actions.settings
|
||||||
return barButtonItem
|
return barButtonItem
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -62,6 +63,7 @@ final class ProfileViewController: UIViewController, NeedsDependency, MediaPrevi
|
||||||
action: #selector(ProfileViewController.shareBarButtonItemPressed(_:))
|
action: #selector(ProfileViewController.shareBarButtonItemPressed(_:))
|
||||||
)
|
)
|
||||||
barButtonItem.tintColor = .white
|
barButtonItem.tintColor = .white
|
||||||
|
barButtonItem.accessibilityLabel = L10n.Common.Controls.Actions.share
|
||||||
return barButtonItem
|
return barButtonItem
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -73,6 +75,7 @@ final class ProfileViewController: UIViewController, NeedsDependency, MediaPrevi
|
||||||
action: #selector(ProfileViewController.favoriteBarButtonItemPressed(_:))
|
action: #selector(ProfileViewController.favoriteBarButtonItemPressed(_:))
|
||||||
)
|
)
|
||||||
barButtonItem.tintColor = .white
|
barButtonItem.tintColor = .white
|
||||||
|
barButtonItem.accessibilityLabel = L10n.Scene.Favorite.title
|
||||||
return barButtonItem
|
return barButtonItem
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
@ -84,18 +87,21 @@ final class ProfileViewController: UIViewController, NeedsDependency, MediaPrevi
|
||||||
action: #selector(ProfileViewController.bookmarkBarButtonItemPressed(_:))
|
action: #selector(ProfileViewController.bookmarkBarButtonItemPressed(_:))
|
||||||
)
|
)
|
||||||
barButtonItem.tintColor = .white
|
barButtonItem.tintColor = .white
|
||||||
|
barButtonItem.accessibilityLabel = L10n.Scene.Bookmark.title
|
||||||
return barButtonItem
|
return barButtonItem
|
||||||
}()
|
}()
|
||||||
|
|
||||||
private(set) lazy var replyBarButtonItem: UIBarButtonItem = {
|
private(set) lazy var replyBarButtonItem: UIBarButtonItem = {
|
||||||
let barButtonItem = UIBarButtonItem(image: UIImage(systemName: "arrowshape.turn.up.left"), style: .plain, target: self, action: #selector(ProfileViewController.replyBarButtonItemPressed(_:)))
|
let barButtonItem = UIBarButtonItem(image: UIImage(systemName: "arrowshape.turn.up.left"), style: .plain, target: self, action: #selector(ProfileViewController.replyBarButtonItemPressed(_:)))
|
||||||
barButtonItem.tintColor = .white
|
barButtonItem.tintColor = .white
|
||||||
|
barButtonItem.accessibilityLabel = L10n.Common.Controls.Actions.reply
|
||||||
return barButtonItem
|
return barButtonItem
|
||||||
}()
|
}()
|
||||||
|
|
||||||
let moreMenuBarButtonItem: UIBarButtonItem = {
|
let moreMenuBarButtonItem: UIBarButtonItem = {
|
||||||
let barButtonItem = UIBarButtonItem(image: UIImage(systemName: "ellipsis.circle"), style: .plain, target: nil, action: nil)
|
let barButtonItem = UIBarButtonItem(image: UIImage(systemName: "ellipsis.circle"), style: .plain, target: nil, action: nil)
|
||||||
barButtonItem.tintColor = .white
|
barButtonItem.tintColor = .white
|
||||||
|
barButtonItem.accessibilityLabel = L10n.Common.Controls.Actions.seeMore
|
||||||
return barButtonItem
|
return barButtonItem
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue