---
title: "role"
description: "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 in [Role], this property should not be set and the framework will automatically
resolve it."
type: "property"
---

<div class='type'>Property</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
var SemanticsPropertyReceiver.role
```


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 in `Role`, this property should not be set and the framework will automatically
resolve it.



