diff options
author | Cynthia <cynthia@cynthia.dev> | 2024-11-03 18:18:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-03 09:18:27 -0800 |
commit | ac9d910e1e77c559eff8b32cd8412335f41074f1 (patch) | |
tree | 9963b37b460fb3b8e585268bdfb78734c80d4bc4 /src/view/com/util/post-ctrls/PostCtrls.tsx | |
parent | c580f20b5311914c3ecdd3a84f7ae13f8881f3a7 (diff) | |
download | voidsky-ac9d910e1e77c559eff8b32cd8412335f41074f1.tar.zst |
fix(a11y): avoid plain `div`s as button or tabs (#6084)
Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/view/com/util/post-ctrls/PostCtrls.tsx')
-rw-r--r-- | src/view/com/util/post-ctrls/PostCtrls.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/view/com/util/post-ctrls/PostCtrls.tsx b/src/view/com/util/post-ctrls/PostCtrls.tsx index 0972c17cc..2cc45617f 100644 --- a/src/view/com/util/post-ctrls/PostCtrls.tsx +++ b/src/view/com/util/post-ctrls/PostCtrls.tsx @@ -256,6 +256,7 @@ let PostCtrls = ({ requireAuth(() => onPressReply()) } }} + accessibilityRole="button" accessibilityLabel={plural(post.replyCount || 0, { one: 'Reply (# reply)', other: 'Reply (# replies)', @@ -293,6 +294,7 @@ let PostCtrls = ({ testID="likeBtn" style={btnStyle} onPress={() => requireAuth(() => onPressToggleLike())} + accessibilityRole="button" accessibilityLabel={ post.viewer?.like ? plural(post.likeCount || 0, { @@ -332,6 +334,7 @@ let PostCtrls = ({ onShare() } }} + accessibilityRole="button" accessibilityLabel={_(msg`Share`)} accessibilityHint="" hitSlop={POST_CTRL_HITSLOP}> |