Skip to content

Commit 2da4f05

Browse files
committed
a11y: disable button when it's not functioning as a button
1 parent b112073 commit 2da4f05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/renderer/extensions/vueNodes/widgets/components/form/dropdown/FormDropdownMenuFilter.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ const singleFilterOption = computed(() => filterOptions.length === 1)
2525
v-for="option in filterOptions"
2626
:key="option.id"
2727
type="button"
28+
:disabled="singleFilterOption"
2829
:class="
2930
cn(
30-
'px-4 py-2 rounded-md inline-flex justify-center items-center select-none appearance-none border-0',
31-
'transition-all duration-150',
31+
'px-4 py-2 rounded-md inline-flex justify-center items-center select-none appearance-none border-0 text-base-foreground',
3232
!singleFilterOption &&
33-
'hover:text-base-foreground hover:bg-interface-menu-component-surface-hovered cursor-pointer active:scale-95',
33+
'transition-all duration-150 hover:text-base-foreground hover:bg-interface-menu-component-surface-hovered cursor-pointer active:scale-95',
3434
!singleFilterOption && filterSelected === option.id
3535
? '!bg-interface-menu-component-surface-selected text-base-foreground'
3636
: 'bg-transparent'

0 commit comments

Comments
 (0)