cashapp / AccessibilitySnapshot

Easy regression testing for iOS accessibility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should it consider userInputLabels in addition (if available) ?

jhneves opened this issue · comments

var accessibilityDescription = accessibilityLabelOverride(for: context) ?? accessibilityLabel ?? ""

Would it make sense to consider the userInputLabels when parsing for the accessibilityLabel? ie:

        if #available(iOS 13.0, *) {
            var userInputLabelsTagged: String = ""
            for i in 0..<accessibilityUserInputLabels.count {
                if i > 0 {
                    userInputLabelsTagged += " "
                }
                userInputLabelsTagged += "[\(i)]"
                userInputLabelsTagged += accessibilityUserInputLabels[i]
            }
            if !userInputLabelsTagged.isEmpty {
                accessibilityDescription = userInputLabelsTagged
            }
        }

That would produce something like:
"[0]some primary label text [1]some secondary explanation of the label text"

closing, since this is a dup of: #59