With the attribute accessibilitySpeechPunctuation, you can ask VoiceOver to speak any punctuation marks in your attributed accessibility label, if that is what you want. Good for code snippets?

App with some Swift code showing how to assign the string “Hello World” to a string constant. VoiceOver announces it by default as “let myString String Hello World”. With the speech punctuation attribute it will be announced instead as “let myString colon String equals quotation mark Hello World quotation mark”