🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

Role

The type of user interface element.

Source set: Common
public class Role private constructor(@Suppress("unused") private val value: Int)

The type of user interface element. Accessibility services might use this to describe the element or do customizations. Most roles can be automatically resolved by the semantics properties of this element. But some elements with subtle differences need an exact role. If an exact role is not listed, SemanticsPropertyReceiver.role should not be set and the framework will automatically resolve it.

Members

Companion

Source set: Common
public companion object

Properties

Button

Source set: Common
public val Button: Role

This element is a button control. Associated semantics properties for accessibility: SemanticsProperties.Disabled, SemanticsActions.OnClick

Checkbox

Source set: Common
public val Checkbox: Role

This element is a Checkbox which is a component that represents two states (checked / unchecked). Associated semantics properties for accessibility: SemanticsProperties.Disabled, SemanticsProperties.StateDescription, SemanticsActions.OnClick

Switch

Source set: Common
public val Switch: Role

This element is a Switch which is a two state toggleable component that provides on/off like options. Associated semantics properties for accessibility: SemanticsProperties.Disabled, SemanticsProperties.StateDescription, SemanticsActions.OnClick

RadioButton

Source set: Common
public val RadioButton: Role

This element is a RadioButton which is a component to represent two states, selected and not selected. Associated semantics properties for accessibility: SemanticsProperties.Disabled, SemanticsProperties.StateDescription, SemanticsActions.OnClick

Tab

Source set: Common
public val Tab: Role

This element is a Tab which represents a single page of content using a text label and/or icon. A Tab also has two states: selected and not selected. Associated semantics properties for accessibility: SemanticsProperties.Disabled, SemanticsProperties.StateDescription, SemanticsActions.OnClick

Image

Source set: Common
public val Image: Role

This element is an image. Associated semantics properties for accessibility: SemanticsProperties.ContentDescription

Source set: Common
public val DropdownList: Role

This element is associated with a drop down menu. Associated semantics properties for accessibility: SemanticsActions.OnClick

ValuePicker

Source set: Common
public val ValuePicker: Role

This element is a value picker. It should support the following accessibility actions to enable selection of the next and previous values:

android.view.accessibility.AccessibilityNodeInfo.ACTION_SCROLL_FORWARD: Select the next value.

android.view.accessibility.AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD: Select the previous value.

These actions allow accessibility services to interact with this node programmatically on behalf of users, facilitating navigation within sets of selectable values.

Source set: Common
public val Carousel: Role

This element is a Carousel. This means that even if Pager actions are added, this element will behave like a regular List collection.

Associated semantics properties for Pager accessibility actions: SemanticsActions.PageUp,SemanticsActions.PageDown,SemanticsActions.PageLeft, SemanticsActions.PageRight

Content updated: