mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 15:23:17 -04:00
Merge pull request #42379 from nextcloud/fix/ARIA-prop-for-NcBreadCrumb-component
enh(breadcrumbs): removed unnecessary aria label
This commit is contained in:
commit
c7ada651a9
3 changed files with 12 additions and 8 deletions
|
|
@ -1,16 +1,17 @@
|
|||
<template>
|
||||
<NcBreadcrumbs data-cy-files-content-breadcrumbs>
|
||||
<NcBreadcrumbs
|
||||
data-cy-files-content-breadcrumbs
|
||||
:aria-label="t('files', 'Current directory path')">
|
||||
<!-- Current path sections -->
|
||||
<NcBreadcrumb v-for="(section, index) in sections"
|
||||
:key="section.dir"
|
||||
:aria-label="ariaLabel(section)"
|
||||
:title="ariaLabel(section)"
|
||||
v-bind="section"
|
||||
dir="auto"
|
||||
:to="section.to"
|
||||
:title="titleForSection(section)"
|
||||
@click.native="onClick(section.to)">
|
||||
<template v-if="index === 0" #icon>
|
||||
<Home :size="20" />
|
||||
<Home :size="20"/>
|
||||
</template>
|
||||
</NcBreadcrumb>
|
||||
|
||||
|
|
@ -22,6 +23,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { translate as t} from '@nextcloud/l10n'
|
||||
import { basename } from 'path'
|
||||
import Home from 'vue-material-design-icons/Home.vue'
|
||||
import NcBreadcrumb from '@nextcloud/vue/dist/Components/NcBreadcrumb.js'
|
||||
|
|
@ -106,12 +108,14 @@ export default Vue.extend({
|
|||
}
|
||||
},
|
||||
|
||||
ariaLabel(section) {
|
||||
titleForSection(section) {
|
||||
if (section?.to?.query?.dir === this.$route.query.dir) {
|
||||
return t('files', 'Reload current directory')
|
||||
}
|
||||
return t('files', 'Go to the "{dir}" directory', section)
|
||||
},
|
||||
|
||||
t,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue