---
title: "description(for:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nsaccessibility-swift.struct/role/description(for:)"
---

# description(for:)

Returns a standard role description for a user interface element.

## Declaration

```swift
static func description(for element: Any) -> String?
```

## Discussion

Discussion This function is like the description(with:) function, except that it queries element to get the role and subrole. The description(with:) function is more efficient, but this function is useful for accessorizing base classes so that they properly handle derived classes, which may override the subrole or even the role.

## See Also

### Descriptions

- [description(with:)](appkit/nsaccessibility-swift.struct/role/description(with:).md)
