Q for #a11y community: is hidden attr verboten for tabpanels? MDN docs seems to think so. HTML5 spec suggests hidden is good for "element is not yet, or is no longer, relevant" which is exactly tabpanels.
1
If it is hidden, it cannot be discovered. Tab panels are just not active.
1
1
The tab itself isn't hidden. And clicking the tab would remove hidden attribute from the corresponding tabpanel.
1
I'm unclear why aria-hidden + display: none would be any different than hidden attr.
4
hidden hides content from everyone; display:none; hides content from everyone except custom style sheet users. Using display:none; is better in the case of tabpanels IMO, because content will be available to custom style sheet users...
1
1
Isn't hidden implemented by UA default style of display:none? So a custom style would still override the hidden attribute?
1
Yes, but it's harder on the user. Using display:none; just means if that property isn't honoured in the user's styles, the content becomes visible automatically. Using hidden means the user has to specifically override the styles for any element using that attrib.
4
Is that what style sheets are doing? A user style sheet is only ever adding to the default style sheet as far as I know… so if you use display:none in your author style sheet but don’t use a display: initial in your user style, it should not reveal the element. Right?
1
1
Eric or make everything important which is ridiculous this is due to an early split where user style sheets had the highest specificity within the Cascade and then browser switched it around as did the specs ultimately throwing the entire idea into chaos 🧐

Oct 16, 2018 · 8:09 PM UTC