The <a> link in the <UPageCard /> has a tabindex="-1" when using the to="" prop
I don't understand why as keyboard users won't be able to use tab through
2 Replies
Hi @Nicolas Walter. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the provided knowledge sources, there is no explicit mention or documentation stating that the
<a>
link rendered by <UPageCard />
with the to=""
prop will have a tabindex="-1"
. The official examples and API documentation for <UPageCard />
show usage of the to
prop to turn the card into a link, but do not indicate that tabindex="-1"
is applied by default or explain why it would be used in this context. In fact, the intent of the to
prop is to make the card navigable, which would typically require the link to be focusable for keyboard users UPageCard Usage.
If you are observing a tabindex="-1"
on the link, it may be due to a specific implementation detail or a bug not covered in the official documentation. Normally, tabindex="-1"
is used to remove an element from the tab order, which would indeed prevent keyboard users from accessing it via the Tab key.
If accessibility is a concern, and you are seeing this behavior, it is recommended to check your local implementation or raise an issue with the Nuxt UI team, as the knowledge sources do not provide an explanation or justification for this behavior.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1400488692048728084> Kapa.ai is still learning and improving, please let me know how I did by reacting below.