Skip to content

Commit a1064f4

Browse files
Merge pull request #1063 from DonovanAndrews300/donovan/fixes-ariaCurrent-error
Fixes aria error
2 parents 8dd910d + 949639f commit a1064f4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/ThemeButton.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ type ButtonProps = Omit<NextUIButtonProps, 'color'> & {
77
label?: string | React.ReactNode;
88
color?: 'primary' | 'secondary' | 'tertiary';
99
isSelected?: boolean;
10-
ariaCurrent?: boolean;
1110
};
1211

1312
type Ref = HTMLButtonElement;
@@ -94,18 +93,17 @@ const ThemeButton = forwardRef<Ref, ButtonProps>(function ThemeButton(
9493
? `cursor-not-allowed ${removedTransitionStyles}`
9594
: '';
9695
const iconStyles = 'w-5 h-5 text-xl';
97-
const ariaCurrent = isSelected ? { 'aria-current': 'true' } : {};
9896

9997
return (
10098
<NextUIButton
10199
disableRipple={isDisabled}
100+
aria-disabled={isDisabled}
101+
aria-current
102102
onPress={isDisabled ? undefined : onPress}
103103
isIconOnly={iconOnly}
104104
size="md"
105105
className={`${basedStyles} ${colorStyles} ${padding} ${disabledStyles} ${className}`}
106106
ref={ref}
107-
aria-disabled={isDisabled}
108-
ariaCurrent
109107
startContent={
110108
startContent ? (
111109
<span className={iconStyles}>{startContent}</span>

0 commit comments

Comments
 (0)