-
Notifications
You must be signed in to change notification settings - Fork 383
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
Making class TokenImageSpan public #271
base: master
Are you sure you want to change the base?
Conversation
- Made class TokenImageSpan public so that it can be accessed from outside. - We need this class public so that we can call getSpans() on the EditText. - Right now, this class is accessible, but crashes at runtime on devices with API less than lollipop and which have multidex enabled.
I'm happy to consider making this class public, but relying on the behavior of |
I want to add accessibility support to TokenCompleteTextView. Right now, when we enable TalkBack we see that the added Token's are not read out. So, we have added a ExploreByTouchHelper AccessibilityDelegate to the derived class of TokenCompleteTextView. We need the TokenImageSpan to be accessible in the ExploreByTouchHelper methods - getVisibleVirtualViews, onPopulateNodeForVirtualView etc. |
I would love to have better accessibility support in TokenCompleteTextView. I did a first pass using |
bdb918d
to
6bc7cd4
Compare
+1 for this, re: needing accessibility. Even just making the view public would help. |
I think we really need to bake accessibility into the library rather than make I'm kind of out of my depth on this, but I'm really hesitant to make it seem like public access to |
Without getting too lost in the weeds, I'll try to describe the example I see in the code base I'm referencing. They added a Then when it comes to token click events, we would need to plug in accessibility events from the
It's definitely not easy code to implement. If baking it in is too much, I think there are alternative API hooks that could help with customizing accessibility. For me the biggest challenges to finding a work around have been not being able to check if the |
Thanks for the feedback. I do want to make better accessibility support at least possible even if baking it into the library doesn't wind up making sense. I can see how you would need access to the selected state of the view to implement this. I can easily see exposing that publicly in some useful way. From looking at the docs, it seems like the core reason to need access to the view other than selected state is to use it for the The main reason I don't want to expose the view more is that the views are not actually part of the view hierarchy, they are only used for drawing. If you had access to view, I assume you would use something like |
I hadn't realized that about the view, but it makes sense! I'm still new to |
with API less than lollipop and which have multidex enabled.