-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributedLabel Link Accessibility #459
base: main
Are you sure you want to change the base?
Conversation
8a97a0e
to
0344a7f
Compare
bc23c22
to
e6457d0
Compare
BlueprintUI/Sources/Environment/Keys/AccessibilityLinkKey.swift
Outdated
Show resolved
Hide resolved
0859d99
to
bf6ac37
Compare
bf6ac37
to
cff4341
Compare
It looks like there's some failing tests:
|
let localizedLinkString = linkAccessibilityLabel, | ||
!links.isEmpty else { return } | ||
|
||
let insertionString = "[\(localizedLinkString)] " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the [ ]
have any special meaning here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its really only for the case where the string would be printed. e.g. the accessibility inspector. I wanted to be clear that it's not a part of the displayed text. and that it's explicitly associated with the link string (it doesn't have a preceding space).
I chose the square brackets because
- Voiceover doesn't read the
[]
characters, but does realize the contained word is distinct from the preceding word. - They aren't often used in prose, unlike parenthesis. They're unlikely to be confused with the actual content
- They look like markdown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! It might be good to capture that in a comment inline
ec73157
to
736cd9e
Compare
736cd9e
to
b8acc6f
Compare
e4b2c34
to
4fc6b4b
Compare
4fc6b4b
to
800c72b
Compare
7bfd79a
to
88a7dca
Compare
|
aa9b363
to
d12564c
Compare
@RoyalPineapple Moving to draft because I think this was addressed elsewhere but feel free to reopen if needed! |
Updating attributed label's links to more closely mirror the SwiftUI accessibility experience
SwiftUI.Link.mp4
This is our current implementation, which doesn't announce links properly.
WithoutLinks.mov
Here is the new version, announcing links as they are read.
WithLinks.mp4