Closed alexbell closed 6 years ago
Thanks for this!
I did a little bit of looking into accessibility elements just now, but it seems like you probably have more experience - so I'd like to run this by you. The way you've set it up here is such that when isAccessibilityElement
is set to true
on a MarqueeLabel instance, the value of that property for both the ML instance itself and the underlying UILabel instance both are set to true
.
To avoid a nested element situation, would it be better to just pass the setting to the underlying UILabel?
Checking in on this one again - @alexbell did you have any thoughts on my comments above?
@cbpowell sorry for the latency! i tried setting the flag on only the underlying label, in my test Voiceover still shows it as a tappable accessibility element due to this though. i think the flag needs to be set on both to get the effect of Voiceover ignoring the Marquee label completely.
I totally missed that you were interesting it making non-accessible, which is what was confusing me with this change because the UILabel subview is accessible by default (without any modification to MarqueeLabel). But I played around with it a bit and the change looks good, I'll incorporate!
@cbpowell thanks, ya it's kind of a non standard use of a label. we're using MarqueeLabel to animate glyphs which make up the background of our onboarding screen.
…essibilityElement to be set to same
useful when using MarqueeLabel to display content that is not text.
thanks for your work on this!