Creating tabs takes a bit of work, and making sure they’re accessible can be a little tricky. First, you should ask if you even need tabs in the first place, but assuming you do, this video looks at creating some progressively enhanced tabs.
🔗 Links
✅ The finished code: [ Ссылка ]
✅ Accessibility guidelines for tabs: [ Ссылка ]
✅ Heydon Pickering’s site: [ Ссылка ]
✅ Heydon’s Webbed Briefs (watch these, they’re great): [ Ссылка ]
✅ Equalize Digital’s Accessibility Checker for WordPress: [ Ссылка ]
⌚ Timestamps
00:00 - Introduction
00:50 - Maybe tabs are a bad idea
03:13 - The HTML
06:45 - Showing only the active tab content
09:50 - Showing the correct tab panel when we click on a new tab
17:45 - Assistive technologies, ARIA, and roles
20:38 - Adding roles to the list and list items
26:30 - How to know the expected and best ways for interaction like this
28:30 - aria-controls don’t actually do anything?
29:58 - Making the panels focusable and the tabs and panels the correct roles
32:00 - Adding aria-selected to the active tab
33:10 - Styling it up with semantic CSS
35:14 - Updating the active panel when we select a new tab
36:40 - Giving screen readers more information
39:04 - Adding keyboard navigation to switch between tabs
50:15 - Improvements and changes that you can make to this
#css
--
Come hang out with other dev's in my Discord Community
💬 [ Ссылка ]
Keep up to date with everything I'm up to
✉ [ Ссылка ]
Come hang out with me live every Monday on Twitch!
📺 [ Ссылка ]
---
Help support my channel
👨🎓 Get a course: [ Ссылка ]
👕 Buy a shirt: [ Ссылка ]
💖 Support me on Patreon: [ Ссылка ]
---
My editor: VS Code - [ Ссылка ]
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.
Twitter: [ Ссылка ]
Codepen: [ Ссылка ]
Github: [ Ссылка ]
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
![](https://i.ytimg.com/vi/fI9VM5zzpu8/maxresdefault.jpg)