Documentation for ARIA attributes and data attributes #1387
Unanswered
liaujianjie
asked this question in
Ideas
Replies: 2 comments 4 replies
-
I agree we should do more, thanks for the helpful feedback. We have an issue logged to improve this here radix-ui/website#224 |
Beta Was this translation helpful? Give feedback.
0 replies
-
@liaujianjie i agree it would be helpful to document expectations around regarding the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since ARIA attributes and data attributes are extensively used for the application of accessibility markup and conditional application of styles, it would be great if we had more documentation regarding these attributes.
Specifically, these are the things that could further clarify the scopes and usage for the attributes:
Example: In Toasts,
[data-swipe="move"]
is used when a swipe gesture is in-flight to dismiss the toast. The--radix-toast-swipe-move-x
CSS variable contains the X offset of the swipe gesture—which can be used to animate the exit animation when swiped (e.g. a fade out effect as the toast is swiped away).Having answers to the questions above can help us better design our component libraries to work better with Radix. For example: Should we create custom modifiers in our Tailwind config for ARIA attributes and/or Radix data attributes?
It can also give users of Radix a better idea of what the best practice of using Radix looks like.
Edit: Oops, I missed an earlier discussion on this.
Beta Was this translation helpful? Give feedback.
All reactions