charlie-yao / react-aria-widgets

Implementations of WAI-ARIA widgets and design patterns in React.
MIT License
2 stars 0 forks source link

Rename BaseAccordionHeader and BaseAccordionPanel props according to the underlying HTML/ARIA attribute #160

Closed charlie-yao closed 1 year ago

charlie-yao commented 1 year ago

I originally named the props the way they are because I thought it might be more convenient to think of it as, e.g. passing an isExpanded argument to some function rather than giving an HTML element an aria-expanded attribute. But maybe it would be better to just have a one-to-one relationship between the props these components accept and the HTML/ARIA attributes that get assigned. Having the attributes explicitly typed by TypeScript and PropTypes would still provide documentation on the needed attributes and it would maximize compatibility with other accessibility libraries.