Continued with our journey of creating an accessible Modal component in React part 2.
- Focus placement when the modal is open
- Returning focus to the element that invoked it
- Closing modal when the `Esc` key is pressed
- Focus trap
- Scroll Lock
https://t.co/SLbdjJ8TKb
Creating a modal dialog from scratch can be challenging, considering the UX and accessibility of it. I have taken a crack at it and written an article to explain things in parts.
https://t.co/1HTkPzCCa1
:has() + container queries = the component-based logical styling we've always dreamed of ๐
In this demo:
๐ผ If the card has an image: make the font smaller & at < 400px wide, stack it
โจ If no image: bigger font, no stacking
https://t.co/UJuXCXUrvV
โ ๏ธ Need flags on in Canary
Have you ever had trouble understanding how HTML elements are stacked? What role does `z-index` play?
I wrote a small article unveiling the stacking rules for the HTML elements. This will aid in your journey of demystifying how z-index works.
https://t.co/5YCtJPiwKd
Thank you @helloworldless for writing this helpful article.
Gatsby Starter Blog: How to Add Header Images to Posts with Support for Twitter Cards
https://t.co/BDrTSyJswe
Do not use aria-hidden on content that can be focusable (including tabindex=-1)
But tbh, think really hard about using aria-hidden in general. Why are you specifically trying to hide visible content from AT users?
Sometimes it is necessary. Many times it is incorrectly used.
The new React docs are out!
Well-written and practical, complete with interactive examples, diagrams, and more. Plus, they teach Hooks first.
Give them a read and provide feedback: https://t.co/Z6HM1EZvrt
Accessible Authentication and Redundant Form entry are some interesting success criterion being added in the new WCAG 2.2.
Web should be inclusive and accessible to everyone.
https://t.co/y7Nf9kWrSZ
@ConsoleDotLog I haven't used Tailwind yet. But from your thread messages, if learning Tailwind is a steep curve, added with scrouring the docs every time you need something, then I agree with you.
If you already know your fundamentals in CSS, why would you need to re-learn.