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

View File

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

View File

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

View File

@ -8,6 +8,7 @@
// Accessibility // 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."; "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"; "AccCloseButton" = "Cerrar";
// Tab // Tab

View File

@ -8,6 +8,7 @@
// Accessibility // 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."; "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"; "AccCloseButton" = "Cerrar";
// Tab // Tab