dojo / dojo/framework

ActiveLink: add support for aria-current attribute

Open
#902 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
623
Forks
78
PR merge metrics
No merged PRs in 30d

Description

**Enhancement**

`ActiveLink` would benefit from adding support for the [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/API/Element/ariaCurrent) attribute. This could be achieved by adding an `ariaCurrent` property and setting it when the link is active.

```typescript
export interface ActiveLinkProperties extends LinkProperties {
activeClasses: SupportedClassName[];
ariaCurrent?: 'page' | 'step' | 'location' | 'date' | 'time' | true;
isExact?: boolean;
}
```

**Code**

```jsx

Link to my route

```

**Expected behavior:**

```html
Link to my route
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.