Skip to content

Commit

Permalink
improve button accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jshawl committed May 2, 2023
1 parent b14f69d commit 8356c41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/ui/buttons/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,7 @@ export function Button({ fundingSource, style, multiple, locale, env, fundingEli
onClick={ clickHandler }
onRender={ onButtonRender }
onKeyPress={ keypressHandler }
tabindex='0'
aria-label={ labelText }>
tabindex='0'>

<div class={ CLASS.BUTTON_LABEL }>
{ labelNode }
Expand Down
2 changes: 1 addition & 1 deletion src/ui/text/text.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type TextProps = {|

export function Text({ optional, className = [], animate, ...rest } : TextProps, children : NullableChildrenType) : ChildType {
return (
<span class={ [ CLASS.TEXT, ...className, animate || CLASS.IMMEDIATE ].filter(Boolean).join(' ') } optional={ optional } { ...rest }>{ children }</span>
<span aria-label={children} class={ [ CLASS.TEXT, ...className, animate || CLASS.IMMEDIATE ].filter(Boolean).join(' ') } optional={ optional } { ...rest }>{ children }</span>
);
}

Expand Down

0 comments on commit 8356c41

Please sign in to comment.