diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-07-03 15:57:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 15:57:53 -0500 |
commit | bc55241c9ae731f633f8b93a9b7eac7635070148 (patch) | |
tree | 2f75cf5fc31bb8214f848a4326c1af731000b842 /src/view/com/util/post-ctrls/RepostButton.tsx | |
parent | 0163ba0af8cd42e2a76b3ae66efc0777afdc2544 (diff) | |
download | voidsky-bc55241c9ae731f633f8b93a9b7eac7635070148.tar.zst |
[APP-724] Collection of accessibility fixes (#949)
* Fix: include alt text on the web lightbox image * a11y: Dont read the 'ALT' label * a11y: remove a wrapper behavior from posts This appears to have been introduced with the goal of creating meta actions on posts, but the behavior seems counter-productive. The accessibility inspector was unable to access individual items within the post and therefore most content was simply skipped. There may be a way to support the post actions without losing the ability to access the inner elements but I couldnt find it. -prf * a11y: apply alt tags to image wrappers so they get read * a11y: set Link accessibilityLabel to the title if none set * a11y: skip the SANDBOX watermark * a11y: improve post meta to not read UI and give a useful date * ally: improve post controls * a11y: add labels to lightbox images on mobile * fix types
Diffstat (limited to 'src/view/com/util/post-ctrls/RepostButton.tsx')
-rw-r--r-- | src/view/com/util/post-ctrls/RepostButton.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/view/com/util/post-ctrls/RepostButton.tsx b/src/view/com/util/post-ctrls/RepostButton.tsx index 59f7f6ee1..4338e4c59 100644 --- a/src/view/com/util/post-ctrls/RepostButton.tsx +++ b/src/view/com/util/post-ctrls/RepostButton.tsx @@ -4,6 +4,7 @@ import {RepostIcon} from 'lib/icons' import {s, colors} from 'lib/styles' import {useTheme} from 'lib/ThemeContext' import {Text} from '../text/Text' +import {pluralize} from 'lib/strings/helpers' import {useStores} from 'state/index' const HITSLOP = {top: 5, left: 5, bottom: 5, right: 5} @@ -49,7 +50,9 @@ export const RepostButton = ({ onPress={onPressToggleRepostWrapper} style={styles.control} accessibilityRole="button" - accessibilityLabel={isReposted ? 'Undo repost' : 'Repost'} + accessibilityLabel={`${ + isReposted ? 'Undo repost' : 'Repost' + } (${repostCount} ${pluralize(repostCount || 0, 'repost')})`} accessibilityHint=""> <RepostIcon style={ |