Merge branch 'feature/right_toggle' into 'develop'

Feature/right toggle

See merge request BPHV_MIPS/mvm_core_ui!513
This commit is contained in:
Pfeil, Scott Robert 2020-06-25 13:50:18 -04:00
commit a00a1fc3d1
5 changed files with 7 additions and 3 deletions

View File

@ -63,6 +63,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
isUserInteractionEnabled = isEnabled
changeStateNoAnimation(isEnabled ? isOn : false)
setToggleAppearanceFromState()
accessibilityHint = MVMCoreUIUtility.hardcodedString(withKey: isEnabled ? "AccToggleHint" : "AccDisabled")
}
}
@ -304,6 +305,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
override open func accessibilityActivate() -> Bool {
// Hold state in case User wanted isAnimated to remain off.
guard isUserInteractionEnabled else { return false }
let isAnimatedState = isAnimated
isAnimated = false
sendActions(for: .touchUpInside)

View File

@ -46,8 +46,6 @@ import Foundation
super.setupView()
addMolecule(stack)
stack.restack()
accessibilityHint = toggle.accessibilityHint
accessibilityTraits = toggle.accessibilityTraits
}
//-----------------------------------------------------
@ -81,6 +79,8 @@ import Foundation
}
func updateAccessibilityLabel() {
accessibilityHint = toggle.accessibilityHint
accessibilityTraits = toggle.accessibilityTraits
accessibilityValue = toggle.accessibilityValue
let linkShowing = eyebrowHeadlineBodyLink.link.titleLabel?.text?.count ?? 0 > 0
if !linkShowing && accessoryView == nil {

View File

@ -9,7 +9,7 @@
// MARK: Accessibility
"AccCloseButton" = "Close";
"swipe_to_select_with_action_hint" = "swipe up or down to select action, then double tap to select.";
"AccDisabled" = "Disabled";
// MARK: Tab
"AccTab" = ", tab";

View File

@ -8,6 +8,7 @@
// Accessibility
"swipe_to_select_with_action_hint" = "deslízate hacia arriba o hacia abajo para seleccionar la acción, luego toca dos veces para seleccionar.";
"AccDisabled" = "desactivado";
"AccCloseButton" = "Cerrar";
// Tab

View File

@ -8,6 +8,7 @@
// Accessibility
"swipe_to_select_with_action_hint" = "deslízate hacia arriba o hacia abajo para seleccionar la acción, luego toca dos veces para seleccionar.";
"AccDisabled" = "desactivado";
"AccCloseButton" = "Cerrar";
// Tab