* Combine `joinedAtView` into one accessibility element
Previously, the calendar image was visible with a nonsensical label.
We use the `.combine` operator here to maintain the proper string formatting of the date.
* Improve the accessibility of the AccountDetailHeaderView
Previously, this image had no description and no indication that it had an associated interaction. Now, we wrap it in a button that performs the tap gesture action, and remove the element altogether if there is no avatar image set.
This commit also handles the checkmark for supporter users
* Tweak accessibility of Profile CustomInfoLabels
This commit:
- Reverses the order of title and value
- Sets the value as an `accessibilityValue`
- Adds a hint indicating what the button does, as they perform slightly different actions
* Make Profile tab header image into a Button
This element has an action associated with it (quicklook), so it makes more sense to have it as a button, and hide it if the user does not have an image set.
Without the action it would have been considered decorative and should be hidden.
* Change accessibilityLabel of Profile tab nav bar item to ‘Options’
“More” is considered overly generic.
This commit also adds two additional user input label options
* Add accessibility labels for the Profile tab `Picker`
Previously, these labels were the default accessibility label provided by the SF symbol, that almost, but not quite, made sense
* Remove StatusRowView swipe actions if VoiceOver is running
These swipe actions are automagically added to the accessibility element’s custom actions, in addition to the ones already there, which means that there is a significant (and confusing) amount of doubling up going on.
* Fix typo in StatusRowView.accessibilityActions
* Add accessibilityLabels to all StatusRowActionsView actions
* Provide explicit combined accessibility label for unfocused StatusRowView
Previously, this was a synthesized label, which read the elements in their traversal order, and didn’t provide any context for which of the three numbers corresponded to replies, boosts or favourites.
Now, we create an explicit combined label when the post isn’t being viewed by itself.
* Improve accessibility of StatusRow(Reblog|Reply)View
They are now combined elements and don’t vend the icon as its own element.
* Add missing punctuation to accessibility hints
* Remove interaction from Profile tab @username and profile note elements
These elements open the profile photo url, which is already provided explicitly through the profile photo
* Prefer spoiler warning for StatusRowView accessibility label
…but place the full, unredacted content in an `AccessibilityCustomContent` field for easy access.
Additionally, if VoiceOver is running, an action to expand the warning is also available.
* Represent `FollowButton` elements as Toggles to accessibility
Since these buttons have two states (though arguable in the case of following, but handled here by not changing the representation if a request is pending), it makes sense to handle them as toggles, so they will be read as “Following, On, <Trait>”
* Remove errant comment
* Add “Verified” accessibilityValue to profile fields
* Fix bug StatusRowView default action bug affecting VoiceOver users
Previously, the default (‘Activate’) action for VoiceOver users would be to share a link to the toot, rather than navigate to its detail. It’s hard to say exactly what caused this, but the root was the inclusion of the `contextMenu` in the `accessibilityActions`.
Now, double-tapping on a a non-focused `StatusRowView` will take you to the toot detail.
* Add header trait to Profile tab display name and familiar followers
These stand out as being header-like in presentation and represent the beginning of specific parts of the screen.
* Add conditional accessibility modifier to Profile tab user-defined fields that opens the correct link
* Add accessibility container that contextualises the user-defined fields
When VoiceOver users first enter a user-defined field, the container label will be read out before the element’s spoken description.
* Improve StatusRowView combined accessibility label
It will now start with:
“X boosted Y”, “X replied to @Y”, or “X…” depending on the context of the toot.
* Change familiar follows thumbnail to a Button; add display name as accessibility label
Previously, this button had no context, and would just be a series of images with nothing to allow users to disambiguate them.
* Revert changes from ZStack with tap gesture to Button
Using a Button for this purpose caused high weirdness in tap zones. Basically everything down to the familiar followers triggered both image buttons.
* Add image alt text to StatusRowView and StatusRowMediaPreviewView
Previously, there was no way for the intended audience for the alt text to find said text. There is a tap gesture on each image in the focused status row, but this is not advertised to the user.
Now, the first image’s alt text is read as part of the non-focused, combined representation, and each image has its own alt text attributed in the focused representation.
* Add Profile tab accessibility labels to indicate private/bot/muted/blocked accounts
Previously, the icon did not have any accessible representation (an empty text string).
* Add header trait to Profile “pinned post”
* Use the Account.Field.name for the user input label
* Replace spaces with commas in StatusRowView.combinedAccessibilityLabel