Skip to content

Commit

Permalink
expose string elsewhere (microsoft#2013)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderboswell authored Apr 30, 2024
1 parent 2bf7785 commit c27f451
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 6 additions & 1 deletion ios/FluentUI/BarButtonItems/BarButtonItems.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
import UIKit

public final class BarButtonItems: NSObject {

/// The accessibility label that should be applied for the done bar button.
/// A temporary change so that consumers who use SwiftUI for a toolbar can avoid duplicated resources until support of a swiftUI control is available.
@objc public static let doneButtonAccessibilityLabel: String = "Accessibility.Done.Label".localized

/// When adding this barButtonItem to the view, tint it with appropriate app color UIColor(light: Colors.primary(for: window), dark: Colors.textDominant)
@objc static func confirm(target: Any?, action: Selector?) -> UIBarButtonItem {
let image = UIImage.staticImageNamed("checkmark-24x24")
let landscapeImage = UIImage.staticImageNamed("checkmark-thin-20x20")

let button = UIBarButtonItem(image: image, landscapeImagePhone: landscapeImage, style: .plain, target: target, action: action)
button.accessibilityLabel = "Accessibility.Done.Label".localized
button.accessibilityLabel = doneButtonAccessibilityLabel
return button
}

Expand Down
4 changes: 0 additions & 4 deletions ios/FluentUI/Navigation/NavigationBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ open class NavigationBar: UINavigationBar, TokenizedControlInternal, TwoLineTitl
/// A temporary change so that consumers who use SwiftUI for navigation can avoid duplicated resources until support of a swiftUI control is available.
@objc public static let backButtonAccessibilityLabel: String = "Accessibility.NavigationBar.BackLabel".localized

/// The accessibility label that should be applied for the done button for when navigation bar is shown in a modal view.
/// A temporary change so that consumers who use SwiftUI for navigation can avoid duplicated resources until support of a swiftUI control is available.
@objc public static let doneButtonAccessibilityLabel: String = "Accessibility.Done.Label".localized

/// An element size to describe the behavior of large title's avatar. If `.automatic`, avatar will resize when `expand(animated:)` and `contract(animated:)` are called.
@objc open var avatarSize: ElementSize = .automatic {
didSet {
Expand Down

0 comments on commit c27f451

Please sign in to comment.