<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/accessibilityFocused(_:equals:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewPAAE20accessibilityFocused_6equalsQrAA23AccessibilityFocusStateV7BindingVyqd___G_qd__tSHRd__lF"
  },
  "title" : "accessibilityFocused(_:equals:)"
}
-->

# accessibilityFocused(_:equals:)

Modifies this view by binding its accessibility element’s focus state to
the given state value.

```
nonisolated func accessibilityFocused<Value>(_ binding: AccessibilityFocusState<Value>.Binding, equals value: Value) -> some View where Value : Hashable
```

## Parameters

`binding`

The state binding to register. When accessibility focus moves to the
accessibility element of the modified view, SwiftUI sets the bound value to the corresponding
match value. If you set the state value programmatically to the matching value, then
accessibility focus moves to the accessibility element of the modified view. SwiftUI sets
the value to `nil` if accessibility focus leaves the accessibility element associated with the
modified view, and programmatically setting the value to `nil` dismisses focus automatically.

`value`

The value to match against when determining whether the
binding should change.

## Return Value

The modified view.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)