Since we're using || if selected or disabled returns false, the entire aria label will be undefined.
We would prefer aria-label=false to be the case so that someone relying on the labels see's that it isnt selected but can be. Right now the only possible state is aria-selected=true
We can fix this by migrating from the || operator to the nullish?? operator
https://github.com/pacocoursey/cmdk/blob/abe6b2460dd896447f715c678b623f17366762b9/cmdk/src/index.tsx#L613-L615
Since we're using
||
if selected or disabled returns false, the entire aria label will be undefined.We would prefer
aria-label=false
to be the case so that someone relying on the labels see's that it isnt selected but can be. Right now the only possible state isaria-selected=true
We can fix this by migrating from the
||
operator to the nullish??
operator