-
Notifications
You must be signed in to change notification settings - Fork 56
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
Early design review: CSS Toggles #730
Comments
Hi there, Thanks for the detailed explainer and for working on solving this very common problem!
Not sure if I misunderstood something, can't you create a cycle like this: div:toggle(foo 1) {
toggle-root: foo 2 at 2;
}
div:toggle(foo 2) {
toggle-root: foo 2 at 1;
}
|
Having the connection between toggle and content-visibility be expressed explicitly like this should aid in reliably inferring accessibility semantics and relationships; this exact behavior is a vital part of several common and important aria patterns. But also, achieving the full functionality here is not actually trivial. It's not hard, but it requires some scripting to, for example, activate the toggle when the element becomes automatically shown (due to becoming relevant to the user). Making the whole suite work together in some simple package is quite valuable for what we expect to be a super common use-case.
Nope, the
Yeah, this has been a minor concern of mine as well. It might be worth making both counter names and state names use dashed-ident; it's a little more typing (and some checking in the scripting API), but it makes it immediately obvious what is author-defined vs CSS-defined, and avoids potential future issues with syntax ambiguity.
Great question, and still somewhat open. We need to give more thought to how, in particular, it interacts with the proposed focusgroup attribute. |
Hi @tabatkins you've said the work is happening in the Open UI CG. Is it an official work item in that CG? Should it maybe be in the openui repo https://github.com/openui to be able to track provenance of contributions prior to moving the work to the CSS wg as indicated? |
We've had other discussions about application state that isn't stored in way that can be encoded in HTML (see e.g. w3ctag/design-principles#289) and we do see a need for what we've been describing a presentational state vs document state (e.g. state encoded as elements and attributes and can be encoded in HTML). This feature clearly falls into the presentational state category. We have two architectural concerns:
|
@dbaron, @tabatkins, @mirisuzanne are you available to join us for a call to discuss this further? We're thinking 8/22 @16:30 UTC but we're flexible. |
Sorry, I'm going to add some noise... I don't want to hijack or confuse this issue but I'm very interested in this one actually and also it's potential connections to several other developing ideas. One thing that I've started thinking about in the past year or two, especially due to involvement in OpenUI research is where delineations are between things that are unchanging controls vs something that is really in pursuit mainly of adapting presentation (an affordance). An example of this, perhaps, is that many/most native toolkits start with something simple - a ScrollPane. That is a component with its own API - but the web didn't choose to make a You can contrast this with perhaps the only other non-form participating element we've done before dialog, Along the way in our discussions we came to some ideas (some of which Toggles may potentially provide an explanation of the magic behind) about being able to provide some simple UI patterns that could offer affordances for some simple common patterns. I'm bringing this up because we've not submitted that for even an early review - there are too many questions still. Among them perhaps were some questions raised related to whether things with affordances really were 'the same' as their actual counterpart components which exist in 'applications'. To this end, we've split off some work with some discussion in an issue filed by me and Sarah Higley: openui/open-ui#559 .. It might be interesting or helpful to have a look if you can find the time. |
@plinss I'm available at that time. |
That time works for me as well. |
Yup, that's fine for me. |
Cool, invites sent |
@tabatkins Yes, changing the syntax to dashed-ident would be clearer. |
So on the basis of our discussion on 8-22 we're happy to close this. Thanks for flying TAG. |
Braw mornin' TAG!
I'm requesting a TAG review of CSS Toggles.
CSS toggles are a mechanism for associating toggleable state with a DOM element. This state can be defined and connected to activations through CSS properties, and can be queried in CSS selectors. This provides a declarative mechanism for specifying state that describes behaviors like the existing HTML behaviors for checkboxes or radio buttons.
Further details:
You should also know that...
This is actually an early-stage review. The goal of what I'm doing in Chromium is to build an implementation that can be used to guide the design of this feature (by giving those involved an implementation to test), not to build something that we'd like to ship quickly.
Before we would consider shipping something in this space, we would (among other things) want to do further testing to validate that the result is more accessible than what people use today (or learn that we need to build in more distinctions that can be reflected into accessibility roles), and do additional development of the things that we hope can be built on top of toggles to validate that it works as a primitive.
We'd prefer the TAG provide feedback as:
💬 leave review feedback as a comment in this issue and @-notify users listed above
The text was updated successfully, but these errors were encountered: