---
title: "SemanticsModifier"
description: "A [Modifier.Element] that adds semantics key/value for use in testing, accessibility, and similar
use cases."
type: "interface"
---

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


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

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



```kotlin
@JvmDefaultWithCompatibility
interface SemanticsModifier : Modifier.Element
```


A `Modifier.Element` that adds semantics key/value for use in testing, accessibility, and similar
use cases.


## Properties

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


> **Deprecated** SemanticsModifier.id is now unused and has been set to a fixed value. Retrieve the id from LayoutInfo instead.

```kotlin
val id: Int
```


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


```kotlin
val semanticsConfiguration: SemanticsConfiguration
```


The SemanticsConfiguration holds substantive data, especially a list of key/value pairs such
as (label -> "buttonName").




