Skip to content

Commit

Permalink
Merge pull request #4913 from nextcloud-libraries/enh/a11y/breadcrumb…
Browse files Browse the repository at this point in the history
…s-nav
  • Loading branch information
raimund-schluessler committed Dec 5, 2023
2 parents b01bcef + b141cf2 commit 5e8408e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/NcBreadcrumbs/NcBreadcrumbs.vue
Expand Up @@ -172,6 +172,14 @@ export default {
type: String,
default: 'icon-home',
},
/**
* Set the aria-label of the nav element.
*/
ariaLabel: {
type: String,
default: null,
},
},
emits: ['dropped'],
data() {
Expand Down Expand Up @@ -626,7 +634,7 @@ export default {
crumbs = crumbs.concat(crumbs2)
}
const wrapper = [h('nav', {}, [h('ul', { class: 'breadcrumb__crumbs' }, [crumbs])])]
const wrapper = [h('nav', { attrs: { 'aria-label': this.ariaLabel } }, [h('ul', { class: 'breadcrumb__crumbs' }, [crumbs])])]
// Append the actions slot if it is populated
if (this.$slots.actions) {
wrapper.push(h('div', { class: 'breadcrumb__actions', ref: 'breadcrumb__actions' }, this.$slots.actions))
Expand Down

0 comments on commit 5e8408e

Please sign in to comment.