How to disable talkback action on a clickable composable item

90
May 03, 2022, at 07:50 AM

I have a composable function that displays some text. The talkback is working great as it reads the text. but how can I disable the clickable notification in accessibility for that composable so that I can have a secret click listener to send analytics.

any time I try to add a clickable like this

Column(
        modifier = Modifier.fillMaxWidth().clickable { 
                                                     
        },
        verticalArrangement = Arrangement.Center,
        horizontalAlignment = Alignment.CenterHorizontally,
    )

When this column is on focus it says 'Double click to activate', and I want to avoid that as there is no user-facing feature on that click.

Answer 1

As described in the accessibility doc you can use the semantics properties. Use the invisibleToUser property to mark an element to be invisible to the user.

Column(
    modifier = Modifier.semantics {
        this.invisibleToUser()}
){}
Rent Charter Buses Company
READ ALSO
SuperController of Getx Package in Flutter causing a problem

SuperController of Getx Package in Flutter causing a problem

I am facing a problem when I extends a class with SuperController of Getx PAckage in FlutterPlease go through my code and let me know the solution

102
Access the Bundle from navDeepLinkBuilder.setArguments(bundle)

Access the Bundle from navDeepLinkBuilder.setArguments(bundle)

There is a Service that at some point creates a Notification that always leads to the same FragmentThe Service wants to send the Fragment some Key-Value Data

88
TextView Marquee is not working in linearlayout

TextView Marquee is not working in linearlayout

Unfortunately, I cannot deal with this problemMore precisely, the marque function does not work for me after adding a TextView to LinearLayout

101
How can I expand a short URL, so I can get the full expanded URL in a variable?

How can I expand a short URL, so I can get the full expanded URL in a variable?

I want to expand a short URL and store the long URL in a variable without accessing that link with the browserAny ideas how I can do that in kotlin?

95