cashapp / AccessibilitySnapshot

Easy regression testing for iOS accessibility
Apache License 2.0
550 stars 69 forks source link

Check UISwitch state using combination of trait and value #170

Closed NickEntin closed 10 months ago

NickEntin commented 10 months ago
NickEntin commented 10 months ago

Check what happens when the accessibilityValue is a non-0 or 1 numeric value

From what I can tell there are three special cased values:

I'm not sure what the last one is used for, but simple enough to support with the same pattern.

NickEntin commented 10 months ago

Check if the outputted values are localized by numeric script

Nope, looks like it's always 0 and 1

NickEntin commented 10 months ago
NickEntin commented 10 months ago

Check what happens when the accessibilityValue is a non-0 or 1 numeric value

From what I can tell there are three special cased values:

  • 0 => "off"
  • 1 => "on"
  • 2 => "mixed"

I'm not sure what the last one is used for, but simple enough to support with the same pattern.

Oh, VoiceOver probably shares logic with macOS, which has tri-state controls (e.g. checkboxes).