Skip to content

Commit

Permalink
feat: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
aklkv committed Jan 22, 2025
1 parent 9038692 commit 2ff88c9
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,49 @@ Example:
</main>
```

Gjs/Gts:

```gts
import { NavigationNarrator } from 'ember-a11y-refocus';
<template>
<NavigationNarrator/>
<!-- other header content-->
</template>
```

Template Registry is available for loose mode users:

```js
import type EmberA11yRefocusRegistry from 'ember-a11y-refocus/template-registry';

declare module '@glint/environment-ember-loose/registry' {
export default interface Registry
extends EmberA11yRefocusRegistry{
}
}
```

Minimal CSS is provided to style the skip link and navigation message. You can override these styles in your app's CSS.

```js
// ember-cli-build.js
const app = new EmberApp(defaults, {
const app = new EmberApp(defaults, {
sassOptions: {
includePaths: ['node_modules/ember-a11y-refocus/dist/styles'],
},
});
});
```

```scss
// app.scss

@use "navigation-narrator.css";
```


### Customizing the definition of a route change

This addon provides support for custom definitions of which route changes should trigger refocusing behavior.
Expand Down

0 comments on commit 2ff88c9

Please sign in to comment.