Has anyone been able to test the `ClickableText` c...
# compose
m
Has anyone been able to test the
ClickableText
component? I’m using it in my layout to present the text when there’s 2 or more inline tappable links specified. However, the semantics present viritually nothing that lets me identify it, or click on things. There’s no OnClick action or anything else that would allow me to click on a certain subregion of the text either. I’m also not sure why it’s width is only 11px. That doesn’t seem right. This however seems to be consistent with the Text element as well under a Robolectric test.
Copy code
Node #1 at (l=0.0, t=56.0, r=11.0, b=97.0)px
 |-Node #2 at (l=0.0, t=56.0, r=11.0, b=97.0)px, Tag: 'Body'
   Text = '[Lorem ipsum]'
   Actions = [GetTextLayoutResult]
b
Somewhat offtopic, but just realized this means none of our CliackableText usages supports clicks via TalkBack. Already reported at: https://issuetracker.google.com/issues/206630109 https://issuetracker.google.com/issues/274486643 https://issuetracker.google.com/issues/253292081 https://issuetracker.google.com/issues/231495122 but I guess it could be solved via customActions semantics until it's fixed (see in https://bryanherbst.com/2020/11/03/compose-semantics-talkback/)
m
Yeah, that's problematic at best. I've added the custom actions on my own as suggested in that article. The discoverability is not great through talkback, but it's better than nothing I suppose.
185 Views