Skip to content

Commit

Permalink
fix: Require actionsAriaLabel in NcListItem
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Nov 25, 2024
1 parent 3c37a5a commit a3a2ae5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
3 changes: 0 additions & 3 deletions l10n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ msgstr ""
msgid "Actions"
msgstr ""

msgid "Actions for item with name \"{name}\""
msgstr ""

msgid "Activities"
msgstr ""

Expand Down
11 changes: 3 additions & 8 deletions src/components/NcListItem/NcListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ The `actions-icon` slot can be used to pass icon to the inner NcActions componen
<NcActions ref="actions"
:primary="isActive || active"
:force-menu="forceMenu"
:aria-label="computedActionsAriaLabel"
:aria-label="actionsAriaLabel"
@update:open="handleActionsUpdateOpen">
<template v-if="$slots['actions-icon']" #icon>
<!-- @slot Provide the custom icon for the right side quick menu -->
Expand All @@ -538,7 +538,6 @@ The `actions-icon` slot can be used to pass icon to the inner NcActions componen
import NcActions from '../NcActions/index.js'
import NcCounterBubble from '../NcCounterBubble/index.js'
import NcVNodes from '../NcVNodes/index.js'
import { t } from '../../l10n.js'

export default {
name: 'NcListItem',
Expand All @@ -563,7 +562,7 @@ export default {
*/
name: {
type: String,
required: true,
default: undefined,
},

/**
Expand Down Expand Up @@ -641,7 +640,7 @@ export default {
*/
actionsAriaLabel: {
type: String,
default: '',
default: undefined,
},

/**
Expand Down Expand Up @@ -724,10 +723,6 @@ export default {
return (this.details !== '' || this.hasDetails)
&& (!this.displayActionsOnHoverFocus || this.forceDisplayActions)
},

computedActionsAriaLabel() {
return this.actionsAriaLabel || t('Actions for item with name "{name}"', { name: this.name })
},
},

watch: {
Expand Down

0 comments on commit a3a2ae5

Please sign in to comment.