March 27, 2018 01:00 pm GMT
Original Link: https://css-tricks.com/a-css-approach-to-trap-focus-inside-of-an-element/
A CSS Approach to Trap Focus Inside of an Element
I recently read this article by Keith Grant which introduced the newly arrived <dialog>
. Excited by this new UI element, I immediately sat down to experiment with it to see how it can be used effectively as a modalthe most common use of it. While experimenting, I discovered a neat CSS trick on how to trap focus within the <dialog>
element, a common accessibility requirement for modals, and a notoriously difficult one.
What is focus trapping?
First, …
The post A CSS Approach to Trap Focus Inside of an Element appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/a-css-approach-to-trap-focus-inside-of-an-element/
Share this article:
Tweet
View Full Article