-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
Hey there - if you alter the following code to use button
instead of div
you can remove the need for an role
attribute as the button
element is being used.
Before
<div
className={className}
{...rest}
role="button"
tabIndex={0}
onClick={toggleExpanded}
onKeyDown={handleKeyPress}
data-accordion-component="AccordionItemButton"
/>
After
<button
className={className}
{...rest}
tabIndex={0}
onClick={toggleExpanded}
onKeyDown={handleKeyPress}
data-accordion-component="AccordionItemButton"
/>
Other notes
There might be some styling and other changes but it would be a improvement ✌🏼
Metadata
Metadata
Assignees
Labels
No labels