Accessibility improvements

This commit is contained in:
Ilya Laktyushin
2023-02-06 19:58:06 +04:00
parent 78b02192cf
commit 7b746eb9b2
9 changed files with 55 additions and 6 deletions

View File

@@ -91,6 +91,7 @@ final class InstantPageNavigationBar: ASDisplayNode {
self.moreButton = HighlightableButtonNode()
self.actionButton = HighlightableButtonNode()
self.scrollToTopButton = HighlightableButtonNode()
self.scrollToTopButton.isAccessibilityElement = false
self.actionButton.setImage(actionImage, for: [])
self.intrinsicActionSize = CGSize(width: 44.0, height: 44.0)
@@ -128,6 +129,9 @@ final class InstantPageNavigationBar: ASDisplayNode {
self.addSubnode(self.titleNode)
self.addSubnode(self.progressNode)
self.actionButton.accessibilityLabel = strings.KeyCommand_Share
self.backButton.accessibilityLabel = strings.Common_Back
self.backButton.addTarget(self, action: #selector(self.backPressed), forControlEvents: .touchUpInside)
self.actionButton.addTarget(self, action: #selector(self.actionPressed), forControlEvents: .touchUpInside)
self.moreButton.addTarget(self, action: #selector(self.morePressed), forControlEvents: .touchUpInside)