menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Phones News

>

Support Ti...
source image

Dev

1w

read

16

img
dot

Image Credit: Dev

Support Time to Take Action with Compose

  • Time to take action is an accessibility setting that controls the minimum time in which temporary messages asking a user to take action are shown.
  • The setting has different options and can be found from Settings -> Accessibility Settings -> Timing controls -> Time to take action (Accessibility timeout).
  • Some users may need extra time to review the controls, or to reach them, or to activate assistive technology to activate the controls automatically.
  • When building a custom component, developers need to separately add support for the time to take action setting, which is not automatically supported.
  • We can add support for time to take action in two steps: calculate the delay for hiding the tooltip and hide the tooltip after the calculated time has passed.
  • The first thing is to calculate the delay using the LocalAccessibilityManager composition.
  • The second step is to use freshly calculated timeout with the LaunchedEffect function.
  • In conclusion, developers should know about the time to take action setting, and how to respect it while building custom UI components.
  • This setting provides extra time to users who may need more time to interact with the element controls.
  • The Accessible developer community can use this setting to make the app more accessible to users with different needs.

Read Full Article

like

1 Like

For uninterrupted reading, download the app