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 Oct 3, 2024
1 parent 9b85c45 commit deef42b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 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
9 changes: 2 additions & 7 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 Down Expand Up @@ -641,7 +640,7 @@ export default {
*/
actionsAriaLabel: {
type: String,
default: '',
required: true,
},
/**
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 deef42b

Please sign in to comment.