Re: [csswg-drafts] [META] Presentation regarding Open UI (#5350)

The CSS Working Group just discussed `Open UI presentation`.

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Open UI presentation<br>
&lt;Rossen_> github: https://github.com/w3c/csswg-drafts/issues/5350<br>
&lt;TabAtkins> [greg presents]<br>
&lt;nigel> s/jfkthame: inline-box-height?/nigel: inline-box-height?<br>
&lt;TabAtkins> gregwhitworth: I met with ARIAWG 3 weeks ago about this; after last weeks' discussiona bout accent-color, and previous about file-input button, I thought it woudl be good to go over the OPen UI CG and what it's doing.<br>
&lt;TabAtkins> gregwhitworth: Hopefully leave time for discussion/comments/etc after.<br>
&lt;TabAtkins> gregwhitworth: Edge and Chrome worked to update their form controls in Chromium to update a11y, touch, and a visual refresh.<br>
&lt;TabAtkins> gregwhitworth: Gave talks about this with Nicole Sullivan, the Chrome half of things.<br>
&lt;TabAtkins> gregwhitworth: Here's high-contrast working, for example.<br>
&lt;TabAtkins> [shows slide of some widgets in high-contrast mode]<br>
&lt;TabAtkins> gregwhitworth: Lot of people when we show them get excited we've spent time on the built-ins.<br>
&lt;TabAtkins> gregwhitworth: A common question afterwards is "how come when i'm navigating the web I don't see these controls?"<br>
&lt;TabAtkins> gregwhitworth: Lot of reasons, onion-peeling things.<br>
&lt;TabAtkins> gregwhitworth: Did  a lot of surveys.<br>
&lt;TabAtkins> gregwhitworth: Wanted to understand why webdevs recreate form controls.<br>
&lt;TabAtkins> gregwhitworth: 37% is changing the papearance, 32% is more functionality, 27% is browser inconsistency, 3% is a11y, 2% is other<br>
&lt;TabAtkins> gregwhitworth: These are consistent answers.<br>
&lt;TabAtkins> gregwhitworth: There are low-hanging fruit in each category, we think<br>
&lt;TabAtkins> gregwhitworth: A big consistent one is browser inconsistencies.<br>
&lt;TabAtkins> gregwhitworth: Like Chromium's color input<br>
&lt;TabAtkins> gregwhitworth: The site would say "what'st he lowest common denominator"<br>
&lt;TabAtkins> gregwhitworth: Chromium historically is the native Windows color widget, which is real old-school and W95-looking. And if it didn't give them waht they needed, they'd throw it away and do their own.<br>
&lt;TabAtkins> gregwhitworth: So if there isn't interop, it doesn't matter what we ultimately introduce across browsers.<br>
&lt;TabAtkins> gregwhitworth: So if we can't standardize across many respects, the rest of the work is fruitless. So that's a big reason Open UI came into existence.<br>
&lt;TabAtkins> gregwhitworth: The top 10 list ofr recreated form controls<br>
&lt;TabAtkins> gregwhitworth: select, checkbox, date, radio, file, progress, button, dialog, textarea, text<br>
&lt;TabAtkins> gregwhitworth: Workhorses of the web<br>
&lt;TabAtkins> gregwhitworth: button/textarea/text are near the end, as they're less problematic in general<br>
&lt;TabAtkins> gregwhitworth: And more importantly, we asked which is most frustrating, and select beats everything by a *lot*<br>
&lt;TabAtkins> (42% vs 17% for next place)<br>
&lt;TabAtkins> gregwhitworth: You see complex ones at the forefront; simpler ones seem less frustrating.<br>
&lt;TabAtkins> gregwhitworth: I think it's become so status quo that this problem is part of the web<br>
&lt;TabAtkins> gregwhitworth: So people come up and say "shoudl the platform even invest in this?"<br>
&lt;TabAtkins> gregwhitworth: I often hear there's a bunch of component libraries, the big sites have big teams focusing on the same stuff browser devs do, so all these fundamentals aren't gaps on those top sites.<br>
&lt;fantasai> (42.7% select, 17.3% date, 9.3% file, 8.0% checkbox, 6.7% radio, 4.0% range, &lt;3% the rest<br>
&lt;fantasai> )<br>
&lt;TabAtkins> gregwhitworth: We looked at a bunch of menu/popup libraries. Spent 30min, found *numerous* a11y problems, can't use in keyboard, etc<br>
&lt;TabAtkins> gregwhitworth: This is 8 months old, hopefully a little better today.<br>
&lt;TabAtkins> gregwhitworth: I tested high-contrast but didn't show here; due to the checkbox/radio hackarounds, high-contrast would often make the entire form disappear. That's extra concerning.<br>
&lt;TabAtkins> gregwhitworth: In addition to this, I spoke with partners, major sites, component libs, ssg, pretty much everybody I could<br>
&lt;TabAtkins> gregwhitworth: All of them had no desire to rebuild these things.<br>
&lt;TabAtkins> gregwhitworth: My fave quote is us asking "would you leverage these if the platform gave better ones, or would you keep using your own?" and someone's VP said "yes, dropdowns aren't our product"<br>
&lt;TabAtkins> gregwhitworth: Another project, I was talking to the component engineer leading the dropdown, and they pinged me asking for select behind a flag, because they want to stop owning that component; it's just always buggy and annoying.<br>
&lt;TabAtkins> gregwhitworth: So there's obviously a hunger and desire for better natives.<br>
&lt;TabAtkins> gregwhitworth: So this is an opportunity for us.<br>
&lt;TabAtkins> gregwhitworth: Don't want to pretend this is new. Rossen, when we worked together, emphasized this has been tried many times before.<br>
&lt;TabAtkins> gregwhitworth: The way I tried to frame this is...<br>
&lt;TabAtkins> gregwhitworth: A designer builds out a new control design.<br>
&lt;TabAtkins> gregwhitworth: Recall the earlier problem zones, the spot that people spend the most time on is often a11y<br>
&lt;TabAtkins> gregwhitworth: And then ultimately we make a spec.<br>
&lt;TabAtkins> gregwhitworth: Literally everyone is doing this, including browsers and OSes.<br>
&lt;TabAtkins> gregwhitworth: I got OS devs saying "yeah, this is web-specific, but it overlaps a ton with our designs as well"<br>
&lt;TabAtkins> gregwhitworth: So I view Open UI as very similar to how we entered Chromium.<br>
&lt;TabAtkins> gregwhitworth: We started exposing certain parts for certain things, we saw devs start adopting.<br>
&lt;TabAtkins> gregwhitworth: But we haven't yet taken a step back and started holistically talking about controls in general.<br>
&lt;TabAtkins> gregwhitworth: There is not a desire to lock things in palce to stifle innovation in UI, but we do want to pave cowpaths as possible.<br>
&lt;TabAtkins> gregwhitworth: And would like there to be a single source of truth for like "what makes a select"<br>
&lt;TabAtkins> gregwhitworth: Linked at the end here is a massive explainer<br>
&lt;TabAtkins> gregwhitworth: Starts digging into the model that OPen UI leverages to attack the problem<br>
&lt;TabAtkins> gregwhitworth: We started with the select, but realized quickly we were actually defining a more general term, which is "what is a control?"<br>
&lt;TabAtkins> gregwhitworth: It was pointed out that controls follow an NPC(sp?) model<br>
&lt;TabAtkins> s/NPC/MVC/<br>
&lt;TabAtkins> gregwhitworth: As you manipulate the input, the model changes and influences the view.<br>
&lt;TabAtkins> gregwhitworth: So we wnat Open UI to define the model and the controller, without defining the view.<br>
&lt;TabAtkins> gregwhitworth: So I tried to take the whole explainer and scrunch it down here<br>
&lt;TabAtkins> gregwhitworth: [reads the slide]<br>
&lt;TabAtkins> gregwhitworth: So a quick thought exercise<br>
&lt;TabAtkins> gregwhitworth: Everyone envision a select<br>
&lt;TabAtkins> gregwhitworth: What does it look like, what are the behaviors<br>
&lt;TabAtkins> gregwhitworth: [shows W95 screenshot]<br>
&lt;TabAtkins> gregwhitworth: I wonder if anyone had this in their head<br>
&lt;TabAtkins> [shows very old Apple UI]<br>
&lt;TabAtkins> gregwhitworth: No scrollbar, but a checkbox, and some colors next to the options<br>
&lt;fantasai> s/UI/UI - Mac OS 7.0/<br>
&lt;TabAtkins> [shows a more modern filtering UI from a webpage]<br>
&lt;TabAtkins> gregwhitworth: You could imagine this being a composite control as well, being an type=search actually that just has the behavior<br>
&lt;TabAtkins> [shows a contact selector]<br>
&lt;fantasai> s/next to the options/next to the options. Actually can't even do this on Web platform today/<br>
&lt;TabAtkins> gregwhitworth: Or maybe like this, showing off select limitations today. This uses a grid to show the pictures, name, and title.<br>
&lt;TabAtkins> gregwhitworth: But utlimately it's just a select underneath everything, giving some values.<br>
&lt;TabAtkins> [shows iOS "roller" select]<br>
&lt;tantek> s/iOS/old iOS<br>
&lt;TabAtkins> gregwhitworth: Emphasize again that the model and behaviors aren't changing, but controller does a little - scroll events are scrolling this, but site might want to take over.<br>
&lt;TabAtkins> gregwhitworth: So wanted to break down the anatomy of the inputs<br>
&lt;TabAtkins> gregwhitworth: If there's standard terminology on the web already, we use that<br>
&lt;TabAtkins> [shows off a select's anatomy]<br>
&lt;TabAtkins> gregwhitworth: A particular bit of controversy here is whether the "top" part of a select is a button (as currently noted) or a textbox, given how many UI frameworks already give type-in<br>
&lt;TabAtkins> gregwhitworth: This ties into the accent color from last week, can't define it without knowing where it'll be applied<br>
&lt;TabAtkins> gregwhitworth: Then once you have the parts, you can define how events transition between parts.<br>
&lt;TabAtkins> gregwhitworth: Based on research across component libraries, figuring out if it was nailed down due to user research, or accidental, or if it needs to be stadnardized at all, etc<br>
&lt;TabAtkins> gregwhitworth: What we want overall is to obviate the need for authors to go to WAI-ARIA's big list of conditions<br>
&lt;TabAtkins> gregwhitworth: Complicated mapping of a11y conditions back to your control<br>
&lt;TabAtkins> gregwhitworth: And since so much of the issue is just "i want to make slight cosmetic tweak", but they ahve to reinvent all the rest themselves<br>
&lt;TabAtkins> gregwhitworth: We find that if you provide the core functionality, with type-ahead searching, almost nobody actually wants more functionality at that point. They just want cosmetic control.<br>
&lt;TabAtkins> gregwhitworth: Another part of the explainer is the part="" attribute, giving it meaning in the control itself.<br>
&lt;TabAtkins> gregwhitworth: So we've exposed that there are actual slots and parts in our Open UI components.<br>
&lt;TabAtkins> [shows off a custom select's HTML code]<br>
&lt;TabAtkins> gregwhitworth: Note here, on the "button" container, I want to replace that top part with my own UI, but let the rest of the control code work as normal.<br>
&lt;TabAtkins> gregwhitworth: So by noting the part="", the component just grabs that, and otherwise hooks up everything as it would with its own button.<br>
&lt;TabAtkins> gregwhitworth: So this becomes powerful - so long as the element is child of the select, the select can give it meaning and beahvior.<br>
&lt;TabAtkins> gregwhitworth: Then the controller comes along, adds in appropriate ARIA, tabindex, listeners, etc.<br>
&lt;TabAtkins> gregwhitworth: So I feel like people are often "that sounds cool in theory", but we've gone and built a WC that follows this model.<br>
&lt;TabAtkins> gregwhitworth: Not done yet.<br>
&lt;TabAtkins> [shows off control]<br>
&lt;TabAtkins> gregwhitworth: When I hit spacebar we move to the options, I can arrow and hit Enter and it selects that one.<br>
&lt;TabAtkins> gregwhitworth: Here's a Bootstrap example; the text of the select option doesn't bring up the popup, but the arrow does.<br>
&lt;tantek> great presentation gregwhitworth<br>
&lt;TabAtkins> gregwhitworth: And here's a more extreme radial design, that still works exactly per normal select interactions<br>
&lt;TabAtkins> gregwhitworth: And here's a typeahead select, giving minimal customization and hooking into the underlying search mechanics.<br>
&lt;tantek> q+ to ask about the select pop-up button vs list matching widths<br>
&lt;gsnedders> q?<br>
&lt;TabAtkins> Rossen_: I applaud you for not stopping on this journey<br>
&lt;Rossen_> ack tantek<br>
&lt;Zakim> tantek, you wanted to ask about the select pop-up button vs list matching widths<br>
&lt;TabAtkins> tantek: I tried to work on this 20 years ago, greatly sympathize, great work.<br>
&lt;TabAtkins> tantek: For select, one common thing I saw in your examples is the button and list being different widths<br>
&lt;TabAtkins> tantek: Having two things in CSS match their shrink-to-fit width is, hm, hard or impossible?<br>
&lt;TabAtkins> gregwhitworth: bc they're just block-level siblings, you can use grid to make them the same width if you want<br>
&lt;TabAtkins> gregwhitworth: This select is no longer a separate window - we can't do that without security issues.<br>
&lt;Rossen_> ack fantasai<br>
&lt;TabAtkins> fantasai: I know that select dropdowns have special beahvior when neativel implemented, to avoid falling off the edge of the screen. Does this mean if I style my select, I need to reimplement that?<br>
&lt;TabAtkins> gregwhitworth: Expect us to come with proposals for exactly that. I don't expect you to reimplement, we should make it easy to add in.<br>
&lt;tantek> that seems like a new layout / positioning feature<br>
&lt;TabAtkins> fantasai: Looks like you're lookin at how to build UI from scratch - have you looked at how to take existing markup and make it more stylable, so people dont' need to bring their own?<br>
&lt;tantek> +1 fantasai - we want to solve *both*<br>
&lt;TabAtkins> gregwhitworth: My one hesitance is, say, take checkbox. If we dont' allow replacements, but let you change color of the glyph - people quickly start asking for animation, or adding a label, etc.<br>
&lt;TabAtkins> gregwhitworth: Gets more complex really quickly.<br>
&lt;TabAtkins> fantasai: Not saying to stop there, but we shoudl go in from both sides, so we can minimize the number of people that need to rebuilt their control.<br>
&lt;TabAtkins> fantasai: While also making it possible for people rebuilding their comonetns to make it easy.<br>
&lt;TabAtkins> Rossen_: Last time, in Toronto, we decided not to use CSS to expose or define parts.<br>
&lt;tantek> q+<br>
&lt;TabAtkins> That's not a relevant address to fantasai's concern - she's not talking about defining parts in CSS.<br>
&lt;TabAtkins> tantek: Strong agree to also let people fix native markup.<br>
&lt;TabAtkins> &lt;br dur=15min><br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5350#issuecomment-666427225 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 30 July 2020 14:58:53 UTC