Apply empty accessibility traits to AttributedLabel if supplied traits is nil#590
Conversation
4e9fd89 to
a80849e
Compare
a80849e to
57a851c
Compare
kyleve
left a comment
There was a problem hiding this comment.
Makes sense – just confirm, this fixes an issue where we'd move from non-empty to empty traits, but not apply those empty traits?
Indeed, that's exactly what was happening before this fix. |
|
|
||
| private func updateAccessibilityTraits(with model: AttributedLabel) { | ||
| guard let traits = model.accessibilityTraits else { | ||
| accessibilityTraits = [] |
There was a problem hiding this comment.
Do you think there'd be any benefit by only setting them if they aren't already empty? Not sure if there's any overhead when poking this property.
There was a problem hiding this comment.
There shouldn't be any additional overhead in setting this property. This function is being called only when we're setting a number of other accessibility properties so it gets bundled into a larger set of changes.
…Label (#597) This reverts #590. During integration testing, the original change caused KIF failures while searching for labels with the `staticText` trait. The work to audit the failures and make necessary code changes has been ticketed [here](https://block.atlassian.net/browse/UI-9567). This revert allows the changes in #596 to be fully tested.
No description provided.