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.
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 anaria-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.