Capgemini / dcx-react-library

React Library UI/UX agnostic
https://main--6069a6f47f4b9f002171f8e1.chromatic.com
MIT License
107 stars 7 forks source link

Button component does not render the aria-label attribute properly #618

Closed alexwbbr closed 2 months ago

alexwbbr commented 2 months ago

Describe the bug When trying to add an aria-label to the button it is not being rendered properly. If there is a label property on the button, the aria label is not rendered for some reason.

Expected behavior When using the aria-label property I expect it to be rendered as an attribute

Line 153 in the button.tsx file {...(label ? {} : { 'aria-label': ariaLabel })}