zacwest / ZSWTappableLabel

UILabel subclass for links which are tappable, long-pressable, 3D Touchable, and VoiceOverable.
MIT License
169 stars 37 forks source link

Improve generation of accessibility elements #39

Closed ken-broadsheet closed 4 years ago

ken-broadsheet commented 4 years ago

When enumerating over the attributed string to generate accessibility elements, require "longest effective range" so that runs of characters outside of links are unbroken.

When the LongestEffectiveRangeNotRequired option is set, the enumeration separates runs when any attribute changes. For example, if part of the string is italicized, it'll be a separate element.

By not setting the option, separate accessibility elements are only generated for links.

zacwest commented 4 years ago

Thanks!