Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the {{is-last}} helper from the readme #17

Merged
merged 1 commit into from
Jun 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Array of registered breadcrumbs (objects)
### Examples

#### a11y
This simple example implements an [a11y friendly breadcrumb structure](https://www.w3.org/TR/wai-aria-practices/#breadcrumb) using Ember's `<LinkTo>` component and a custom `is-last` helper.
This simple example implements an [a11y friendly breadcrumb structure](https://www.w3.org/TR/wai-aria-practices/#breadcrumb) using Ember's `<LinkTo>` component and the [`{{has-next}}`](https://github.com/DockYard/ember-composable-helpers#has-next) helper from ember-composable-helpers to determine if a breadcrumb is the last breadcrumb in the list.

```hbs
<nav aria-label="Breadcrumb">
Expand All @@ -67,7 +67,7 @@ This simple example implements an [a11y friendly breadcrumb structure](https://w
<li>
<LinkTo
@route={{breadcrumb.data.route}}
aria-current={{if (is-last breadcrumb breadcrumbs) "page"}}
aria-current={{if (not (has-next breadcrumb breadcrumbs)) "page"}}
>
{{breadcrumb.title}}
</LinkTo>
Expand All @@ -93,7 +93,7 @@ A similar example where ember-link is used instead of `<LinkTo>`.
<li>
<a
href={{breadcrumb.data.link.href}}
aria-current={{if (is-last breadcrumb breadcrumbs) "page"}}
aria-current={{if (not (has-next breadcrumb breadcrumbs)) "page"}}
{{on "click" breadcrumb.data.link.transitionTo}}
>
{{breadcrumb.title}}
Expand Down