lit-ui-router / srefAriaCurrent
Variable: srefAriaCurrent
ts
const srefAriaCurrent: (params) => DirectiveResult<typeof SrefAriaCurrentDirective>;Defined in: packages/lit-ui-router/src/sref-active.ts:554
Binds aria-current to the active state: the attribute-part form of uiSrefActive's aria-current.
Binding the attribute is the opt-in, so there is none of uiSrefActive's link detection or takeover: the value is 'page' while the exact state is active and the attribute is absent otherwise, whatever the element. Pass value for another token, or { exact, active } to mark an ancestor too.
Parameters
| Parameter | Type |
|---|---|
params | SrefAriaCurrentParams |
Returns
DirectiveResult<typeof SrefAriaCurrentDirective>
Example
ts
import { srefHref, srefAriaCurrent } from 'lit-ui-router';
import { html } from 'lit';
html`<a href=${srefHref('wizard.payment')}
aria-current=${srefAriaCurrent({ state: 'wizard.payment', value: 'step' })}>
Payment
</a>`