Post

Replies

Boosts

Views

Activity

Reply to UILabel with pattern image textColor can't be made accessible
Hi, thanks for the answer! Its just a standard UILabel where I did override the layoutSubviews function to generate the gradient for the views frame. It does occur with any patternImage UIColor, not only with the gradient. So for testing, you can even use a SFSymbol as the image. Here is everything you need: class BGStyledLabel : UILabel { override func layoutSubviews() { super.layoutSubviews() self.textColor = UIColor(patternImage: UIImage.init(systemName: "folder.fill")!) // This will break VoiceOver for this label // self.textColor = UIColor.white // VoiceOver would work just fine if this is all you do } } Checked the accessibilityContainerType property, which always stays on none. Can you reproduce that? Best, Klemens
Apr ’22