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

Header is not read by TalkBack #73

Open
desamtralized opened this issue Mar 30, 2017 · 4 comments
Open

Header is not read by TalkBack #73

desamtralized opened this issue Mar 30, 2017 · 4 comments

Comments

@desamtralized
Copy link

Hello, I'm using this library in a project that requires accessibility.
When using the TalkBack in a screen with "sticky headers" the headers can't be read or focused by the TalkBack (or accessibility inspector?).

Is there any workaround?

Thanks in advance.

@vr49
Copy link

vr49 commented Jul 5, 2017

Are you able to get the focus ?

@yuvalldb
Copy link

yuvalldb commented Mar 6, 2018

Any solution?

@starkej2
Copy link
Collaborator

starkej2 commented Mar 6, 2018

I haven't had a chance to look into this issue yet, but a pull request would be welcome if you find a solution!

@starkej2
Copy link
Collaborator

starkej2 commented Mar 6, 2018

Until a better solution is determined, a decent workaround would be to implement an item touch listener as described in #38, then when the header is clicked you can manually send an accessibility announcement by doing something like this:

AccessibilityManager accessibilityManager = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE);

if (accessibilityManager != null && accessibilityManager.isEnabled()) {
    AccessibilityEvent event = AccessibilityEvent.obtain(AccessibilityEvent.TYPE_ANNOUNCEMENT);
    event.getText().add("some text");
    view.onInitializeAccessibilityEvent(event);
    view.getParent().requestSendAccessibilityEvent(view, event);
}

It would be really cool if there was also the option to read the headers when they stick to the top of the screen...but I don't think that's possible at the moment.

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

No branches or pull requests

4 participants