-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strategy... #2
Comments
I'm creating a branch to address what I think might be a starting solution to these issues |
ok, you can see this written up a bit on https://panel-set.glitch.me/ and if you reverse that you should be able to get to the actual code too... It is maybe not super clean, but I think it's mostly functional |
branch |
cc @bkardell |
merged this so we have a working demo. (sans some minor CSS issues). Use any server to serve the index.html and look at it in the browser. |
So, I've been thinking about this some for a while now and it seems to me that the two fundamental questions here I think are "how do you do this 'resiliently'? and "How much you actually do"?
As I see it, the primary goals of both accordions and tabs are to link a 'title' and 'content' and provide users with a more focused UX experience. The question about resilience asks sort of "what is the closest native, bare-minimum approximation that leaves authors with an acceptable fallback"? At some level, I have been thinking that the closest thing we have here is summary/details as they also do both of these, just with slightly different UX. If you couldn't have the UX experience you wanted, I kind of imagine that this would be the next best thing.
However, the truth is that there are a few problems with this: summary/details has only recently gotten its last implementation and many of us have to support browsers where this doesn't exist still. That's maybe a kind of minor point looking forward, but the bigger issue, I think, is that summary/details are not well-modeled to fit into some kind of slot-projection model where the 'tabs' want to be projected -- because the title is inside. It's also one of those elements that is, despite a lot of work, flawed.
Alternatively, we look at a very least common denominator and just think about text. This is where my head currently is -- we just worry about text pairs of headings and content as fallback. We don't worry about fallback interactions at all that way, or meanings or relationships which can become very tricky for authors. So you wind up with something like
And, minimally, you just wire up the semantic actions and meanings and present nothing about look and feel skinning except the semantic part (hiding/showing relevant content) and maybe a default background on the titles or something. If you did no styling at all, it would be 'accordion-like'.
We could then also build inside shadow dom something that was like
and just use the slot-change event to manage a switch that really only switches projections if you happen to want to see it as 'tabs'... idk, wdyt?
The text was updated successfully, but these errors were encountered: