November 10, 2020 11:45 pm GMT
Original Link: https://adactio.com/journal/17566
ARIA in CSS
Jeremey reacting to Sara’s tweet, about using [aria-*]
selectors instead of classes when the styling you are applying is directly related to the ARIA state.
… this is my preferred way of hooking up CSS and JavaScript interactions. Heres [an] old CodePen where you can see it in action
Which is this classic matchup:
[aria-hidden='true'] { display: none;}
There are plenty of more opportunities. Take a tab design component:
CodePen Embed Fallback
Since these tabs (using Reach UI… Read article “ARIA in CSS”
The post ARIA in CSS appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
Original Link: https://adactio.com/journal/17566
Share this article:
Tweet
View Full Article