Skip to content
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

Add TalkBack accessibility actions #964

Open
codeofdusk opened this issue Mar 20, 2022 · 15 comments · May be fixed by #1053
Open

Add TalkBack accessibility actions #964

codeofdusk opened this issue Mar 20, 2022 · 15 comments · May be fixed by #1053

Comments

@codeofdusk
Copy link
Contributor

codeofdusk commented Mar 20, 2022

RedReader should have custom accessibility actions to allow TalkBack users to quickly up/downvote posts, collapse threads, etc. similar to the assignable swipe gesture actions for sighted users. Ideally, the order of the actions would be customizable and users can choose which actions they'd like to have enabled, again similar to the already existing support for swipe gestures. The lack of an efficient, accessible Reddit client is one of the major things keeping me on iOS, so solving this would really mean a lot to me!

@QuantumBadger
Copy link
Owner

Thank you for the suggestion, I'll look into this. Am I right in thinking that the swipe accessibility actions (ACTION_SWIPE_DOWN etc) are only supported on Android 13 onwards?

@codeofdusk
Copy link
Contributor Author

codeofdusk commented Mar 22, 2022

I'm not too sure and haven't heard of those before, but I imagine they'll be really useful when 13 launches! Thanks for looking into this though, it could be the thing that makes Android a viable daily driver for me!

@QuantumBadger
Copy link
Owner

I've had a look into this. It seems to be possible add accessibility actions using ViewCompat.addAccessibilityAction(). The actions are accessible with TalkBack by:

  • First, swiping up and right in an "upside-down-L" motion
  • Selecting "Actions" from the menu that appears
  • Selecting the specific action you want to perform from the next menu

Unfortunately this seems like a lot more work that the current double-tap-and-press to open the context menu. As far as I can see there isn't a way to add custom accessibility gestures for items.

@codeofdusk If there are any other apps which implement what you're looking for, could you send me a link please?

@codeofdusk
Copy link
Contributor Author

Yes, you found the actions menu I'm talking about.

You can assign a custom gesture to open the "actions" menu without having to find it in the LCM.

@QuantumBadger
Copy link
Owner

@codeofdusk Thanks. I'm happy to add this, but just wanted to check first why the normal long click menu is inadequate. I'm guessing because (1) you can't change the order of the items, and (2) removing rarely-used items from it means they are totally unavailable.

@codeofdusk
Copy link
Contributor Author

@QuantumBadger If nothing else, I think we should have accessibility actions for moving to the previous/next parent comment. Those commands currently don't work from an accessibility perspective as, to activate them, it's necessary to move from the currently focused comment so focus doesn't know where to land (unless I'm missing something).

@codeofdusk
Copy link
Contributor Author

According to @devinprater, the latest TalkBack update includes a much faster mechanism for invoking actions similar to iOS's built-in screen reader. Implementing accessibility actions would now make a significant difference in efficiency of navigation! CC @QuantumBadger

@devinprater
Copy link

devinprater commented Jan 15, 2023 via email

@QuantumBadger
Copy link
Owner

Thanks both, I'll look into this!

@QuantumBadger
Copy link
Owner

I've made an initial prototype of this, which adds actions for upvoting/downvoting comments and posts. I'm planning to add more options and some level of customisation.

@codeofdusk Before I continue work on this, would you be able to test it please and confirm that it's what you want? It's available as Alpha 323, and also as the latest master if you'd like to build it yourself.

@codeofdusk
Copy link
Contributor Author

@QuantumBadger Thanks so much for your work on this, it's greatly appreciated!

I've opened #1045 to add a few more actions. Customization of actions would be great! I'd also like to add actions to the body of posts (the text of a selfpost/the header of a link post), but I'm not sure where to do that. Could you point me in the right direction?

@QuantumBadger
Copy link
Owner

Thank you for the PR @codeofdusk, I've merged it in!

I've done some refactoring and added the same actions to the link post header here: ad64d4f

The self text view is created in CommentListingFragment.onCommentListingRequestPostDownloaded() if you'd like to add the actions there as well.

I'll keep this ticket open until we have actions for jumping between top-level comments, which will be a bit trickier.

@devinprater
Copy link

devinprater commented Jan 30, 2023 via email

@QuantumBadger
Copy link
Owner

The top level comment jumping logic is currently located in CommentListingFragment, triggered by nextButton and previousButton. It should be possible to refactor that logic and pass the necessary functions to the RedditCommentView.

@codeofdusk
Copy link
Contributor Author

Thanks @QuantumBadger, I'll take a look and let you know if I have questions.

As an aside, you're getting noticed on r/blind!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants