From 09f7378c732dda4f6a5f7f9220d840e4f158e4de Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Fri, 2 Dec 2022 16:29:36 -0800 Subject: [PATCH 1/2] Fix passing invalid type attr for a tag Signed-off-by: Christopher Ng --- src/components/NcButton/NcButton.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/NcButton/NcButton.vue b/src/components/NcButton/NcButton.vue index ad1bdeaf4c..e5b7b9c0fc 100644 --- a/src/components/NcButton/NcButton.vue +++ b/src/components/NcButton/NcButton.vue @@ -202,7 +202,6 @@ button { v-bind="rootElement" :class="buttonClassObject" :aria-label="ariaLabel" - :type="nativeType" :disabled="disabled" v-on="$listeners"> @@ -321,6 +320,7 @@ export default { return { is: 'router-link', tag: 'button', + type: this.nativeType, to: this.to, exact: this.exact, ...this.$attrs, @@ -335,6 +335,7 @@ export default { } return { is: 'button', + type: this.nativeType, ...this.$attrs, } }, From a58f169fc785d5866b335c914463ba09914a3cc3 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Fri, 2 Dec 2022 16:32:56 -0800 Subject: [PATCH 2/2] Add button role for NcButton with href Signed-off-by: Christopher Ng --- src/components/NcButton/NcButton.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/NcButton/NcButton.vue b/src/components/NcButton/NcButton.vue index e5b7b9c0fc..9204e4a169 100644 --- a/src/components/NcButton/NcButton.vue +++ b/src/components/NcButton/NcButton.vue @@ -330,6 +330,7 @@ export default { return { is: 'a', href: this.href, + role: 'button', ...this.$attrs, } }