Skip to content

Commit

Permalink
fix: add aria expanded attribute to button (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
chadbrokaw authored Sep 26, 2023
1 parent 6bc45cb commit 0bc887e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/actions/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Icon, IconSize, UniversalIconType } from "../icons/Icon"

export interface ButtonProps extends AppearanceProps {
"data-testid"?: string
ariaExpanded?: boolean
ariaHidden?: boolean
ariaLabel?: string
children: React.ReactNode
Expand Down Expand Up @@ -94,6 +95,7 @@ const Button = (props: ButtonProps) => {
onClick={props.onClick}
disabled={props.disabled || props.loading}
aria-hidden={props.ariaHidden}
aria-expanded={props.ariaExpanded}
tabIndex={props.ariaHidden ? -1 : 0}
aria-label={props.ariaLabel}
data-testid={props.dataTestId || props["data-testid"]}
Expand Down

0 comments on commit 0bc887e

Please sign in to comment.