feat: added aria label support to buttons

pull/3083/head
William Grant 11 months ago
parent 0a56653f19
commit 2e2f526405

@ -114,6 +114,7 @@ const StyledButton = styled.button<{
export type SessionButtonProps = {
text?: string;
ariaLabel?: string;
disabled?: boolean;
buttonType?: SessionButtonType;
buttonShape?: SessionButtonShape;
@ -137,6 +138,7 @@ export const SessionButton = (props: SessionButtonProps) => {
dataTestId,
buttonColor,
text,
ariaLabel,
disabled = false,
onClick = null,
margin,
@ -152,6 +154,7 @@ export const SessionButton = (props: SessionButtonProps) => {
return (
<StyledButton
aria-label={ariaLabel}
color={buttonColor}
buttonShape={buttonShape}
buttonType={buttonType}

@ -13,6 +13,7 @@ export type SessionIconButtonProps = SessionIconProps & {
dataTestIdIcon?: string;
id?: string;
title?: string;
ariaLabel?: string;
tabIndex?: number;
className?: string;
children?: ReactNode;
@ -60,6 +61,7 @@ const SessionIconButtonInner = forwardRef<HTMLButtonElement, SessionIconButtonPr
margin,
padding,
id,
ariaLabel,
title,
dataTestId,
dataTestIdIcon,
@ -90,6 +92,7 @@ const SessionIconButtonInner = forwardRef<HTMLButtonElement, SessionIconButtonPr
ref={ref}
id={id}
title={title}
aria-label={ariaLabel}
onClick={clickHandler}
style={{
...style,

Loading…
Cancel
Save