Use of aria-selected
in CSS
#3673
-
In the tab example, example styles us However it's not listed in https://ariakit.org/guide/styling#css-selectors. I assume so, but is it safe to use? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, it's safe to use for tabs. It's not mentioned in the styling docs because this attribute is not safe to use as a CSS selector in any other composite item, and that could cause confusion. In the future, we may introduce a specific |
Beta Was this translation helpful? Give feedback.
Yes, it's safe to use for tabs. It's not mentioned in the styling docs because this attribute is not safe to use as a CSS selector in any other composite item, and that could cause confusion.
In the future, we may introduce a specific
data-selected
attribute that will be consistent across all composite items, butaria-selected
will still work on tabs.