Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/components/NcActionLink/NcActionLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default {
:href="href"
:aria-label="ariaLabel"
:target="target"
:title="title"
class="action-link focusable"
rel="nofollow noreferrer noopener"
@click="onClick">
Expand Down Expand Up @@ -133,6 +134,13 @@ export default {
return ['_blank', '_self', '_parent', '_top'].indexOf(value) > -1
},
},
/**
* Declares a native tooltip when not null
*/
title: {
type: String,
default: null,
},
},
}
</script>
Expand Down
1 change: 1 addition & 0 deletions src/components/NcActions/NcActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,7 @@ export default {
],
attrs: {
'aria-label': action?.componentOptions?.propsData?.ariaLabel || action?.componentOptions?.children?.[0]?.text,
title: action?.componentOptions?.propsData?.title,
},
ref: action?.data?.ref,
props: {
Expand Down
8 changes: 5 additions & 3 deletions src/components/NcAppSidebar/NcAppSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ include a standard-header like it's used by the files app.
<!-- main title -->
<h2 v-show="!titleEditable"
v-linkify="{text: title, linkify: linkifyTitle}"
v-tooltip.auto="titleTooltip"
:aria-label="titleTooltip"
:title="titleTooltip"
class="app-sidebar-header__maintitle"
:tabindex="titleEditable ? 0 : undefined"
@click.self="editTitle">
Expand Down Expand Up @@ -231,15 +232,16 @@ include a standard-header like it's used by the files app.
</div>
<!-- secondary title -->
<p v-if="subtitle.trim() !== ''"
v-tooltip.auto="subtitleTooltip"
:aria-label="subtitleTooltip"
:title="subtitleTooltip"
class="app-sidebar-header__subtitle">
{{ subtitle }}
</p>
</div>
</div>
</div>

<NcButton v-tooltip.auto="closeTranslated"
<NcButton :title="closeTranslated"
:aria-label="closeTranslated"
type="tertiary"
class="app-sidebar__close"
Expand Down
15 changes: 14 additions & 1 deletion src/components/NcAvatar/NcAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export default {
'avatardiv--unknown': userDoesNotExist,
'avatardiv--with-menu': hasMenu
}"
:title="title"
:style="avatarStyle"
class="avatardiv popovermenu-wrapper"
:tabindex="hasMenu ? '0' : undefined"
Expand Down Expand Up @@ -325,6 +326,18 @@ export default {
type: String,
default: null,
},

/**
* Declares a native tooltip when not null
*
* requires disableTooltip not to be set to true
* requires tooltipMessage not to be provided
*/
title: {
type: String,
default: null,
},

/**
* Declares username is not a user's name, when true.
* Prevents loading user's avatar from server and forces generating colored initials,
Expand Down Expand Up @@ -445,7 +458,7 @@ export default {
}
},
tooltip() {
if (this.disableTooltip) {
if (this.disableTooltip || this.title) {
return false
}
if (this.tooltipMessage) {
Expand Down