# Avoid directional references (EK00052)

import { Aside, Badge } from '@astrojs/starlight/components';

Naming an element — a button, a panel, or a menu — gives every reader a reference that holds no matter how the page renders, unlike a directional cue. EkLine flags references that point to a screen location, such as `on the right` or `top-right` (rule EK00052).

## Why avoid directional references in documentation?

Directional references assume a reader sees the same layout you do. They are unhelpful to people using screen readers, and they break when a responsive design moves an element on a narrow screen. Naming the element instead — a button, a panel, or a menu — gives every reader a reference that holds no matter how the page renders.

## What EkLine flags

EK00052 matches location-based references to content or UI, including "on the left", "on the right", "top-right", and "bottom-left".

- ❌ **Incorrect:** Click the button on the right.
- ✅ **Correct:** Click **Save**.
- ❌ **Incorrect:** Open the panel in the top-right.
- ✅ **Correct:** Open the **Settings** panel.

## How to fix

Replace the direction with a stable reference, such as the element's label or name. Bold the label so readers can spot it on the screen.

<Aside type="note">
When direction is the point — for example, describing a chart axis or a diagram — keep the reference and ignore the rule for that line.
</Aside>

## FAQ

### Why are directional references a problem?

They assume a reader sees the same layout you do. They are unhelpful to people using screen readers, and they break when a responsive design moves an element on a narrow screen.

### What should you use instead of "on the right"?

Name the element and bold its label — Click **Save** rather than Click the button on the right. A label holds no matter how the page renders.

## Rule details

| Property | Value |
|----------|-------|
| Rule ID | `EK00052` |
| Category | Inclusive language |
| Default severity | <Badge text="Suggestion" variant="note" /> |
| Enabled by default | Yes |

## Ignore this rule

To keep a directional reference on one line, add an inline comment with a reason:

```markdown
<!-- ekline-ignore-next-line EK00052 -- describing a chart axis -->
Time runs along the bottom of the chart, from left to right.
```

To disable the rule across your project, add it to the `ignore` list in your [configuration file](/reviewer/configuration/ignoring-rules/#ignore).

## Related rules

- [EK00003](/reviewer/rules/ek00003/) — Avoid potentially condescending language
- [EK00057](/reviewer/rules/ek00057/) — Write direct action statements