Skip to content

Commit 81c9d2e

Browse files
committed
Allow More button accessibilityLabel configuration
1 parent dc3253b commit 81c9d2e

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

Aztec/Classes/GUI/FormatBar/FormatBar.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,21 @@ extension FormatBar: UIScrollViewDelegate {
859859
}
860860
}
861861

862+
// MARK: - Accessibility
863+
864+
extension FormatBar {
865+
/// The accessibility label of the overflow toggle button
866+
///
867+
public var overflowToggleAccessibilityLabel: String? {
868+
set {
869+
overflowToggleItem.accessibilityLabel = newValue
870+
}
871+
get {
872+
return overflowToggleItem.accessibilityLabel
873+
}
874+
}
875+
}
876+
862877
// MARK: - Constants
863878
extension FormatBar {
864879
struct Constants {

Example/Example/EditorDemoController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,8 @@ extension EditorDemoController {
993993
}
994994

995995
toolbar.overflowToggleIcon = Gridicon.iconOfType(.ellipsis)
996+
toolbar.overflowToggleAccessibilityLabel = NSLocalizedString("More", comment: "Accessibility label for the More button on formatting toolbar.")
997+
996998
toolbar.frame = CGRect(x: 0, y: 0, width: view.frame.width, height: 44.0)
997999
toolbar.autoresizingMask = [ .flexibleHeight ]
9981000
toolbar.formatter = self

0 commit comments

Comments
 (0)