Accessible Forms with Pseudo Classes | CSS-Tricks – CSS-Tricks

March 26, 2024

In this post, I am going to take you through creating a simple contact form using semantic HTML and an awesome CSS pseudo class known as :focus-within. The :focus-within class allows for great control over focus and letting your user know this is exactly where they are in the experience

Source: Accessible Forms with Pseudo Classes | CSS-Tricks – CSS-Tricks

For something as seemingly simple as where in a form the keyboard has focus, there is as any developer will tell you a lot of complexity. Chris DeMars takes us a bit deeper into the topic.