pacocoursey / cmdk

Fast, unstyled command menu React component.
https://cmdk.paco.me
MIT License
9.42k stars 265 forks source link

[Convention] Aria attributes should not be used to style components #77

Closed frykten closed 1 year ago

frykten commented 1 year ago

Hi!

We've had issues when trying to style a CmdK Select Item: we have to use the aria-selected attribute to style the items, even though it goes against our principles/conventions (aria-attributes should not be used to style elements).

Meanwhile, Radix has implemented a data-highlighted custom attribute to fix that issue. Could you do the same, please? I'm willing to dig into the code and make a PR, if necessary.

pacocoursey commented 1 year ago

Fixed and released in 0.1.22:

npm i cmdk@0.1.22