Created
December 19, 2023 11:21
-
-
Save lucianoschillagi/5e78121d4b2a7631461f3eba28674dcf to your computer and use it in GitHub Desktop.
Voice Over will read the Text "Hello Accesibility"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct AccesibilityText: View { | |
var body: some View { | |
ZStack { | |
Color.mint.opacity(0.7).ignoresSafeArea() | |
VStack { | |
Text("Hello, Accessibility!") | |
.font(.largeTitle) | |
.padding() | |
.foregroundColor(.white) | |
.background(Color.black) | |
.cornerRadius(10) | |
// Voice Over will read this text 🗣️ | |
.accessibilityValue("Hello, Accessibility!") | |
} | |
.padding() | |
} | |
} | |
} | |
#Preview { | |
AccesibilityText() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment