Kevin Powell - CommunityKP-C
Kevin Powell - Communityโ€ข12mo agoโ€ข
13 replies
ne3zy

Is it OK to hide an item using `opacity`, `pointer-events`, `aria-hidden` and `tabindex` ?

Can you hide an item using opacity: 0 + pointer-events: none + aria-hidden="true" + tabindex="-1" instead of using display: none or the hidden attribute ?
Specifically in the context of accessible tabs: https://youtu.be/fI9VM5zzpu8
YouTubeKevin Powell
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: https://codepen.io/kevinpowell/pen/oNQgRKm
โœ… Accessibility guidelines for ...
Create Accessible Tabs with HTML, CSS & JS
Was this page helpful?