Open itsacoyote opened 2 weeks ago
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: https://github.com/nuxt/ui/commit/ebfb8350339725c0a6f88c73f16bff01d61538c2.
Environment
Darwin
v20.14.0
3.11.2
3.11.1
2.9.6
bun@1.1.1
-
extends
,modules
,site
,content
,runtimeConfig
,routeRules
,$production
@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
-
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 aaria-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 breadcrumbsPro > Getting Started
and the page header isTheming
. In the breadcrumbs, "Getting Started" is defined asaria-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