> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Global locator redirect

> Bridges the accessibility tree and actual interactive elements so Momentic can click what the user sees, not a hidden backing element.

Many UIs hide a semantic element (e.g. `<input type="checkbox">`) behind a
styled wrapper users actually click. Momentic's AI chooses elements from the
accessibility tree, but Playwright needs to click the visible, interactive
element. Global locator redirect bridges the two.

## How it works

Momentic hit-tests points inside the original element's bounds to find the
topmost visible, interactive element. If the original element is visible, it's
used as-is. Otherwise, Momentic picks the most-overlapping nearby element whose
DOM position and bounding box look similar, ensuring it doesn't accidentally
redirect to an unrelated overlay.

## Configuration

Set `browser.globalLocatorRedirect` in `momentic.config.yaml`:

```yaml momentic.config.yaml theme={null}
browser:
  globalLocatorRedirect: always
```

| Value              | Behavior                                               |
| ------------------ | ------------------------------------------------------ |
| `always` (default) | Redirect on every interactive step (click, type, etc.) |
| `true`             | Redirect on click steps only (back-compat)             |
| `false`            | Never redirect                                         |

See
[`browser.globalLocatorRedirect`](/configuration/browser#browser-globallocatorredirect)
for the full reference.
