Monday, January 8, 2024
HomeiOS Developmentios - How does accessibilityTextContentType modifications Texts in SwiftUI utilizing VoiceOver

ios – How does accessibilityTextContentType modifications Texts in SwiftUI utilizing VoiceOver


The Textual content in Swift has the accessibilityTextContentType occasion methodology. I am unable to appear to determine or discover what it modifications if I am utilizing my app with VoiceOver.

The documentation says:

Assistive applied sciences can use this property to decide on an applicable option to output the textual content. For instance, when encountering a supply coding context, VoiceOver may select to talk all punctuation.

That is loads of mays and cans… Sadly, I couldn’t provide you with any textual content that resulted in numerous output in VoiceOver with completely different accessibility textual content content material varieties.

For instance, I attempted these under, and lots of others, anticipating a change:

Textual content("/house/consumer/paperwork/images/2024/trip/vacation spot/").accessibilityTextContentType(.fileSystem)
Textual content("/house/consumer/paperwork/images/2024/trip/vacation spot/").accessibilityTextContentType(.plain)

Textual content("void principal(Record<String> arguments) { print('Hey $args'); }").accessibilityTextContentType(.sourceCode)
Textual content("void principal(Record<String> arguments) { print('Hey $args'); }").accessibilityTextContentType(.plain)

I would like to higher perceive how the accessibility content material sort modifications the output of the textual content in assistive applied sciences, however thus far, I couldn’t even provide you with a single instance that resulted in a distinct output.

If you happen to may enlighten me with some examples, or perhaps level out what I am doing flawed, that might be appreciated.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments