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

Breadcrumb aria-current value #1856

Closed
Labels
bug Something isn't working v3 #1289 wontfix-v2 This will not be fixed in `v2.x`.

Comments

@itsacoyote
Copy link

itsacoyote commented Jun 10, 2024

Environment

  • Operating System: Darwin
  • Node Version: v20.14.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: bun@1.1.1
  • Builder: -
  • User Config: extends, modules, site, content, runtimeConfig, routeRules, $production
  • Runtime Modules: @nuxt/content@2.12.1, @nuxt/ui@2.16.0, @nuxt/eslint@0.3.13, @nuxtjs/seo@2.0.0-rc.10, nuxt-gtag@2.0.6
  • Build Modules: -

Version

2.16.0

Reproduction

https://ui.nuxt.com/pro/getting-started/theming

Description

This is primarily for the usage with @nuxt/content. The breadcrumbs component checks simply against index and sets a aria-current to page for the last item in the array of links. This does not check to see whether the last item's linkk is the current page's URL.

For example in the Pro docs, the breadcrumbs for the URL listed above, /pro/getting-started/theming, it displays the breadcrumbs Pro > Getting Started and the page header is Theming. In the breadcrumbs, "Getting Started" is defined as aria-current="page". Semantically I don't think this is correct.

I have a similar structure of breadcrumbs on my website and I tried to set ariaCurrentValue to "false" to try and disable setting the aria-current to page for the last breadcrumb. It is displayed as a prop available on links for the Breadcrumb component. But it does not look like it does anything. Is this not a configurable property or a bug?

Additional context

No response

Logs

No response

@itsacoyote itsacoyote added the bug Something isn't working label Jun 10, 2024
@benjamincanac benjamincanac added the v3 #1289 label Jun 11, 2024 — with Volta.net
Copy link
Member

You're totally right, the aria-current="page" should only apply when the link is active. However, we don't have an easy way to fix that at the moment as it would require a big refactor of the ULink component. I'll flag this for v3 as I fixed it already there.

For now, I moved the aria-current before the v-bind so you can override it per link: ebfb835.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment