Skip to content

Commit e8e5742

Browse files
committed
chore: remove deprecated aria-hidden prop from NcAction*
This was deprecated in v8 and we should remove with v9. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 613b0bc commit e8e5742

6 files changed

Lines changed: 13 additions & 47 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ Especially the following are now provided as composables:
125125
The `richEditing` mixin can be replaced by just using the `NcRichText` component.
126126

127127
#### Other breaking changes
128+
- `NcActions` and `NcAction*`
129+
- The `ariaHidden` property is removed, please do no longer provide it, otherwise the root element will inherit incorrect aria-hidden.
128130
- `NcAppSidebar`
129131
- The `closing` and `opening` events were removed.
130132
They are directly emitted when the sidebar was opened when using `v-if`

src/components/NcActionButton/NcActionButton.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -396,16 +396,6 @@ export default {
396396
},
397397
398398
props: {
399-
/**
400-
* @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.
401-
* @todo Add a check in @nextcloud/vue 9 that this prop is not provided,
402-
* otherwise root element will inherit incorrect aria-hidden.
403-
*/
404-
ariaHidden: {
405-
type: Boolean,
406-
default: null,
407-
},
408-
409399
/**
410400
* disabled state of the action button
411401
*/

src/components/NcActionInput/NcActionInput.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,6 @@ export default {
353353
type: String,
354354
default: '',
355355
},
356-
/**
357-
* @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.
358-
* @todo Add a check in @nextcloud/vue 9 that this prop is not provided,
359-
* otherwise root element will inherit incorrect aria-hidden.
360-
*/
361-
ariaHidden: {
362-
type: Boolean,
363-
default: null,
364-
},
365356
/**
366357
* Attribute forwarded to the underlying NcPasswordField and NcTextField
367358
*/

src/components/NcActionLink/NcActionLink.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,6 @@ export default {
164164
type: String,
165165
default: null,
166166
},
167-
/**
168-
* @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.
169-
* @todo Add a check in @nextcloud/vue 9 that this prop is not provided,
170-
* otherwise root element will inherit incorrect aria-hidden.
171-
*/
172-
ariaHidden: {
173-
type: Boolean,
174-
default: null,
175-
},
176167
},
177168
}
178169
</script>

src/components/NcActions/NcActions.vue

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,16 +1038,6 @@ export default {
10381038
default: t('Actions'),
10391039
},
10401040
1041-
/**
1042-
* @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.
1043-
* @todo Add a check in @nextcloud/vue 9 that this prop is not provided,
1044-
* otherwise root element will inherit incorrect aria-hidden.
1045-
*/
1046-
ariaHidden: {
1047-
type: Boolean,
1048-
default: null,
1049-
},
1050-
10511041
/**
10521042
* Wanted direction of the menu
10531043
*/
@@ -1260,6 +1250,10 @@ export default {
12601250
useTrapStackControl(() => this.opened, {
12611251
disabled: () => this.config.withFocusTrap,
12621252
})
1253+
1254+
if ('ariaHidden' in this.$attrs) {
1255+
warn('[NcActions]: Do not set the ariaHidden attribute as the root element will inherit the incorrect aria-hidden.')
1256+
}
12631257
},
12641258
12651259
methods: {

src/mixins/actionText.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import actionGlobal from './actionGlobal.js'
77
import { NC_ACTIONS_CLOSE_MENU } from '../components/NcActions/useNcActions.ts'
8+
import { warn } from 'vue'
89

910
export default {
1011
mixins: [actionGlobal],
@@ -44,15 +45,6 @@ export default {
4445
type: String,
4546
default: null,
4647
},
47-
/**
48-
* @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.
49-
* @todo Add a check in @nextcloud/vue 9 that this prop is not provided,
50-
* otherwise root element will inherit incorrect aria-hidden.
51-
*/
52-
ariaHidden: {
53-
type: Boolean,
54-
default: null,
55-
},
5648
},
5749

5850
inject: {
@@ -65,6 +57,12 @@ export default {
6557
'click',
6658
],
6759

60+
created() {
61+
if ('ariaHidden' in this.$attrs) {
62+
warn('[NcAction*]: Do not set the ariaHidden attribute as the root element will inherit the incorrect aria-hidden.')
63+
}
64+
},
65+
6866
computed: {
6967
/**
7068
* Check if icon prop is an URL

0 commit comments

Comments
 (0)