Conversation
| } | ||
|
|
||
| private fun updateContentDescription(parentForAccessibility: View, lineOffset: Int) { | ||
| // we can't use announceForAccessibility(..) as the announcement doesn't get interrupted as we move to another element |
There was a problem hiding this comment.
Not sure if this will change anything, but accessibilityManager has interrupt() method :)
… of setContentDescription()
Thanks @khaykov, I wasn't aware of the interrupt() method. I've replaced the View.setContentDescription() call with AccessibilityManager.interrupt() followed by View.announceForAccessibility(). I was a bit worried that the interrupt() method would interrupt announcements from other applications - new email notifications etc. But as it turned out announcements from other applications are getting interrupted whenever the AccessibilityFocus is changed. So we are ok, I guess. |
… of setContentDescription()
khaykov
left a comment
There was a problem hiding this comment.
Thank you for the fixes! Amazing improvement over what we had before, and a step in right direction. I believe there are still things that we can do, but It should probably be a separate project, with input from designers and accessibility experts. 👍
Adds support for Touch Exploration to the AztecText and SourceViewEditText.
Test
Issues
When we want to move the cursor to the new position, we need to remove the cursor first, otherwise the TalkBack reads the text between old and new cursor position.
The issues is that on SDK 27, TalkBack announces "selection cleared" when the ".removeSelection(...)" method is invoked.
It reads raw text ignoring spans. I wanted to add support for spans, but I run out of time. Some spans (eg. Comment, More, PageBreak) are in different modules, so I'm not even sure it's doable.
Note: The app sometimes crashed when I changed TalkBack navigation granularity (characters, words, lines, default etc..). So I added if check into the getAppliedStyles(..) method, but tbh I'm not sure if it doesn't break something else. I've tested it and it seemed ok.... I just wanted to point it out.
Steps to reproduce (before the fix)