Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(VBreadcrumbs): improve accessibility and add menu when collapsed#22358

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jdflaugergues wants to merge13 commits intovuetifyjs:dev
base:dev
Choose a base branch
Loading
fromjdflaugergues:feat/improve-breadcrumbs

Conversation

@jdflaugergues
Copy link

@jdflaugerguesjdflaugergues commentedNov 21, 2025
edited by J-Sek
Loading

Description

This PR improves theVBreadcrumbs component with several accessibility-focused and Material Design–aligned enhancements.

  • semantic elements (nav, ol, li) for improved screen-reader support and better compliance with accessibility standards
  • automatically wrap to a new line when the breadcrumb trail becomes too long, preventing overflow
  • newtotal-visible prop limits how many items can be displayed before collapsing items into an ellipsis
  • optionalcollapse-in-menu for displaying the hidden items inside an accessible dropdown menu
  • menu-props,list-props, and#list-item slot - for deep customization

Markup:

<template>  <v-app>    <v-container>      <h5>show only 2 links</h5>      <v-breadcrumbs:items="items":total-visible="2" />      <h5>responsive</h5>      <v-breadcrumbs:items="items":total-visible="$vuetify.display.mdAndDown ? 2 : 7"collapse-from="1" />      <h5>menu (default)</h5>      <v-breadcrumbs:items="items":total-visible="3"collapse-in-menu />      <h5>menu (customized)</h5>      <v-breadcrumbs:items="items":list-props="{ class: 'pa-1', nav: true, rounded: 'lg', bgColor: 'primary' }":menu-props="{ location: 'left top' }":total-visible="5"collapse-in-menu      >        <template #list-item="{item }">          <v-list-itemv-bind="item":prepend-icon="item.disabled ? 'mdi-lock' : 'mdi-link'"class="mt-0"prepend-gap="12"          />        </template>      </v-breadcrumbs>    </v-container>  </v-app></template><script>exportdefault {    name:'Playground',data: ()=> ({      items:Array.from({ length:9 }, (k,v)=> ({        title:`Link${v+1}`,        href:`breadcrumbs_link_${v+1}`,        disabled: v===2,        prependIcon: v===2?'mdi-lock':'mdi-link',      })),    }),  }</script>

juanjcardona13 reacted with rocket emoji
@jdflaugerguesjdflaugerguesforce-pushed thefeat/improve-breadcrumbs branch 4 times, most recently fromffc8c40 to2a3bd3eCompareNovember 21, 2025 15:37
@jdflaugerguesjdflaugerguesforce-pushed thefeat/improve-breadcrumbs branch 3 times, most recently fromd9084ec to738d8d0CompareNovember 24, 2025 08:44
@J-Sek
Copy link
Contributor

It is coming up nicely.

  • would it make sense to collapse only items that exceed the limit? Similar to VPagination. User could have more control and even set the value to1 and have only the last item visible. I know you attempt to follow MUI, but I can almost foresee we get a feature request for this kind of enhancement in a few months.
  • API should probably expose a simple method to collapse expanded items (both inline and menu) programatically
  • it would be great to include some ARIA attributes and support screenreaders from day one, if possible

@jdflaugergues
Copy link
Author

It is coming up nicely.

  • would it make sense to collapse only items that exceed the limit? Similar to VPagination. User could have more control and even set the value to1 and have only the last item visible. I know you attempt to follow MUI, but I can almost foresee we get a feature request for this kind of enhancement in a few months.
  • API should probably expose a simple method to collapse expanded items (both inline and menu) programatically
  • it would be great to include some ARIA attributes and support screenreaders from day one, if possible

@J-Sek

  • What would be the rule for choosing which breadcrumb items to collapse?
    • The first items? (e.g., for totalVisible = 3 andLink1/Link2/Link3/Link4/Link5/Link6…/Link4/Link5/Link6)
    • The first items starting from the second one? (e.g., for totalVisible = 3 andLink1/Link2/Link3/Link4/Link5/Link6Link1/…/Link5/Link6)
    • The last items? (e.g., for totalVisible = 3 andLink1/Link2/Link3/Link4/Link5/Link6Link1/Link2/…/Link6)
  • Which ARIA attributes would you like to add to the component? We already havearia-label="breadcrumbs" on the<nav>,aria-current="page" on the active item, andaria-hidden on the dividers. Maybe add anaria-label on each breadcrumb item?

@J-Sek
Copy link
Contributor

What would be the rule for choosing which breadcrumb items to collapse?

Good question. We could have:collapse-from="{index}" to support all of the scenarios.

Which ARIA attributes would you like to add to the component?

Just something to support the new "ellipsis". I did not check it.. if it already says something reasonable upon keyboard focus, then we should be fine, otherwise I hope it only needs onearia-label.

@jdflaugerguesjdflaugerguesforce-pushed thefeat/improve-breadcrumbs branch 3 times, most recently from151c767 to9dd9b07CompareNovember 28, 2025 15:32
@J-SekJ-Sek requested a review froma teamDecember 1, 2025 10:49
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@J-SekJ-SekJ-Sek requested changes

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@jdflaugergues@J-Sek

[8]ページ先頭

©2009-2025 Movatter.jp