Developer News

CSS Container Queries

Css Tricks - Mon, 06/10/2024 - 6:12am

Container queries are often considered a modern approach to responsive web design where traditional media queries have long been the gold standard — the reason being that we can create layouts made with elements that respond to, say, the width of their containers rather than the width of the viewport.

.parent { container-name: hero-banner; container-type: inline-size; /* or container: hero-banner / inline-size; */ } } .child { display: flex; flex-direction: column; } /* When the container is greater than 60 characters... */ @container hero-banner (width > 60ch) { /* Change the flex direction of the .child element. */ .child { flex-direction: row; } } Why care about CSS Container Queries?
  1. When using a container query, we give elements the ability to change based on their container’s size, not the viewport.
  1. They allow us to define all of the styles for a particular element in a more predictable way.
  1. They are more reusable than media queries in that they behave the same no matter where they are used. So, if you were to create a component that includes a container query, you could easily drop it into another project and it will still behave in the same predictable fashion.
  1. They introduce new types of CSS length units that can be used to size elements by their container’s size.
Table of Contents Registering Elements as Containers .cards { container-name: card-grid; container-type: inline-size; /* Shorthand */ container: card-grid / inline-size; }

This example registers a new container named card-grid that can be queried by its inline-size, which is a fancy way of saying its “width” when we’re working in a horizontal writing mode. It’s a logical property. Otherwise, “inline” would refer to the container’s “height” in a vertical writing mode.

  • The container-name property is used to register an element as a container that applies styles to other elements based on the container’s size and styles.
  • The container-type property is used to register an element as a container that can apply styles to other elements when it meets certain conditions.
  • The container property is a shorthand that combines the container-name and container-type properties into a single declaration.
Some Possible Gotchas Querying a Container @container my-container (width > 60ch) { article { flex-direction: row; } }
  • The @container at-rule property informs the browser that we are working with a container query rather than, say, a media query (i.e., @media).
  • The my-container part in there refers to the container’s name, as declared in the container’s container-name property.
  • The article element represents an item in the container, whether it’s a direct child of the container or a further ancestor. Either way, the element must be in the container and it will get styles applied to it when the queried condition is matched.
Some Possible Gotchas Container Queries Properties & Values Container Queries Properties & Values container-name container-name: none | <custom-ident>+; Value Descriptions
  • none: The element does not have a container name. This is true by default, so you will likely never use this value, as its purpose is purely to set the property’s default behavior.
  • <custom-ident>: This is the name of the container, which can be anything, except for words that are reserved for other functions, including default, none, at, no, and or. Note that the names are not wrapped in quotes.
Open in Almanac
  • Initial value: none
  • Applies to: All elements
  • Inherited: No
  • Percentages: N/A
  • Computed value: none or an ordered list of identifiers
  • Canonical order: Per grammar
  • Animation: Not animatable
container-type container-type: normal | size | inline-size; Value Descriptions
  • normal: This indicates that the element is a container that can be queried by its styles rather than size. All elements are technically containers by default, so we don’t even need to explicitly assign a container-type to define a style container.
  • size: This is if we want to query a container by its size, whether we’re talking about the inline or block direction.
  • inline-size: This allows us to query a container by its inline size, which is equivalent to width in a standard horizontal writing mode. This is perhaps the most commonly used value, as we can establish responsive designs based on element size rather than the size of the viewport as we would normally do with media queries.
Open in Almanac
  • Initial value: normal
  • Applies to: All elements
  • Inherited: No
  • Percentages: N/A
  • Computed value: As specified by keyword
  • Canonical order: Per grammar
  • Animation: Not animatable
container container: <'container-name'> [ / <'container-type'> ]? Value Definitons

If <'container-type'> is omitted, it is reset to its initial value of normalwhich defines a style container instead of a size container. In other words, all elements are style containers by default, unless we explicitly set the container-type property value to either size or inline-size which allows us to query a container’s size dimensions.

Open in Almanac
  • Initial value: none / normal
  • Applies to: All elements
  • Inherited: No
  • Percentages: N/A
  • Computed value: As specified
  • Canonical order: Per grammar
  • Animation: Not animatable
Container Length Units Container Width & Height Units UnitNameEquivalent to…cqwContainer query width1% of the queried container’s widthcqhContainer query height1% of the queried container’s height Container Logical Directions UnitNameEquivalent to…cqiContainer query inline size1% of the queried container’s inline size, which is its width in a horizontal writing mode.cqbContainer query block size1% of the queried container’s inline size, which is its height in a horizontal writing mode. Container Minimum & Maximum Lengths UnitNameEquivalent to…cqminContainer query minimum sizeThe value of cqi or cqb, whichever is smaller.cqmaxContainer query maximum sizeThe value of cqi or cqb, whichever is larger. Container Style Queries

Container Style Queries is another piece of the CSS Container Queries puzzle. Instead of querying a container by its size or inline-size, we can query a container’s CSS styles. And when the container’s styles meet the queried condition, we can apply styles to other elements. This is the sort of “conditional” styling we’ve wanted on the web for a long time: If these styles match over here, then apply these other styles over there.

CSS Container Style Queries are only available as an experimental feature in modern web browsers at the time of this writing, and even then, style queries are only capable of evaluating CSS custom properties (i.e., variables).

Browser Support

The feature is still considered experimental at the time of this writing and is not supported by any browser, unless enabled through feature flags.

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

DesktopChromeFirefoxIEEdgeSafari128NoNo125TPMobile / TabletAndroid ChromeAndroid FirefoxAndroidiOS Safari125No125No Registering a Style Container article { container-name: card; }

That’s really it! Actually, we don’t even need the container-name property unless we need to target it specifically. Otherwise, we can skip registering a container altogether.

And if you’re wondering why there’s no container-type declaration, that’s because all elements are already considered containers. It’s a lot like how all elements are position: relative by default; there’s no need to declare it. The only reason we would declare a container-type is if we want a CSS Container Size Query instead of a CSS Container Style Query.

So, really, there is no need to register a container style query because all elements are already style containers right out of the box! The only reason we’d declare container-name, then, is simply to help select a specific container by name when writing a style query.

Using a Style Container Query @container style(--bg-color: #000) { p { color: #fff; } }

In this example, we’re querying any matching container (because all elements are style containers by default).

Notice how the syntax it’s a lot like a traditional media query? The biggest difference is that we are writing @container instead of @media. The other difference is that we’re calling a style() function that holds the matching style condition. This way, a style query is differentiated from a size query, although there is no corresponding size() function.

In this instance, we’re checking if a certain custom property named --bg-color is set to black (#000). If the variable’s value matches that condition, then we’re setting paragraph (p) text color to white (#fff).

Custom Properties & Variables .card-wrapper { --bg-color: #000; } .card { @container style(--bg-color: #000) { /* Custom CSS */ } } Nesting Style Queries @container style(--featured: true) { article { grid-column: 1 / -1; } @container style(--theme: dark) { article { --bg-color: #000; --text: #fff; } } } Specification

CSS Container Queries are defined in the CSS Containment Module Level 3 specification, which is currently in Editor’s Draft status at the time of this writing.

Browser Support

Browser support for CSS Container Size Queries is great. It’s just style queries that are lacking support at the time of this writing.

  • Chrome 105 shipped on August 30, 2022, with support.
  • Safari 16 shipped on September 12, 2022, with support.
  • Firefox 110 shipped on February 14, 2023, with support.

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

DesktopChromeFirefoxIEEdgeSafari106110No10616.0Mobile / TabletAndroid ChromeAndroid FirefoxAndroidiOS Safari12512612516.0 Demos! Card Component

In this example, a “card” component changes its layout based on the amount of available space in its container.

CodePen Embed Fallback Call to Action Panel

This example is a lot like those little panels for signing up for an email newsletter. Notice how the layout changes three times according to how much available space is in the container. This is what makes CSS Container Queries so powerful: you can quite literally drop this panel into any project and the layout will respond as it should, as it’s based on the space it is in rather than the size of the browser’s viewport.

CodePen Embed Fallback Stepper Component

This component displays a series of “steps” much like a timeline. In wider containers, the stepper displays steps horizontally. But if the container becomes small enough, the stepper shifts things around so that the steps are vertically stacked.

CodePen Embed Fallback Icon Button

Sometimes we like to decorate buttons with an icon to accentuate the button’s label with a little more meaning and context. And sometimes we don’t know just how wide that button will be in any given context, which makes it tough to know when exactly to hide the icon or re-arrange the button’s styles when space becomes limited. In this example, an icon is displayed to the right edge of the button as long as there’s room to fit it beside the button label. If room runs out, the button becomes a square tile that stacks the icons above the label. Notice how the border-radius is set in container query units, 4cqi, which is equal to 4% of the container’s inline-size (i.e. width) and results in rounder edges as the button grows in size.

CodePen Embed Fallback Pagination

Pagination is a great example of a component that benefits from CSS Container Queries because, depending on the amount of space we have, we can choose to display links to individual pages, or hide them in favor of only two buttons, one to paginate to older content and one to paginate to newer content.

CodePen Embed Fallback Articles & Tutorials General Information Article on Oct 4, 2022 Say Hello to CSS Container Queries Robin Rendle Article on Dec 16, 2019 The Origin Story of Container Queries Robin Rendle Article on Jun 11, 2021 A Cornucopia of Container Queries Geoff Graham Article on Apr 6, 2017 Container Query Discussion Chris Coyier Article on Jul 1, 2015 Container Queries: Once More Unto the Breach Chris Coyier Article on Aug 29, 2022 Next Gen CSS: @container Una Kravets Article on May 17, 2021 251: Container Queries are the Future Geoff Graham Article on Oct 9, 2019 Let’s Not Forget About Container Queries Chris Coyier Article on Dec 2, 2020 Minimal Takes on Faking Container Queries Chris Coyier Article on Nov 12, 2020 The Raven Technique: One Step Closer to Container Queries Mathias Hülsbusch

Container Size Query Tutorials Article on Jun 15, 2021 Media Queries in Times of @container Chris Coyier Article on Sep 21, 2022 Can We Create a “Resize Hack” With Container Queries? Jhey Tompkins Article on Dec 13, 2022 A Few Times Container Size Queries Would Have Helped Me Out Dan Christofi Article on Jan 19, 2022 A New Container Query Polyfill That Just Works Chris Coyier Article on Jun 21, 2021 256: When to use @container queries Geoff Graham Article on Sep 1, 2022 iShadeed’s Container Queries Lab Geoff Graham Article on Dec 2, 2020 Minimal Takes on Faking Container Queries Chris Coyier Article on May 4, 2020 Playing With (Fake) Container Queries With watched-box & resizeasaurus Chris Coyier

Container Style Queries Article on Nov 7, 2022 Early Days of Container Style Queries Geoff Graham Article on May 22, 2024 Digging Deeper Into Container Style Queries Geoff Graham

Almanac References Almanac on May 22, 2024 container .element { container: cards-grid / inline-size; } Geoff Graham Almanac on May 22, 2024 container-name .element { container-name: cards-grid; } Geoff Graham Almanac on May 22, 2024 container-type .element { container-type: inline-size; } Geoff Graham

Related Guides Article on May 1, 2024 A Complete Guide to CSS Media Queries Andrés Galante Article on May 23, 2024 A Complete Guide to Custom Properties Chris Coyier

References

CSS Container Queries originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Ask LukeW: Dynamic Preview Cards

LukeW - Thu, 05/30/2024 - 2:00pm

After adding the Ask Luke feature to my site last year, I began sharing interesting questions people asked and their answers. But doing so manually meant creating an image in Photoshop and attaching it to posts on Twitter, LinkedIn, etc. Now with dynamic Open Graph previews, these preview cards get created on the fly- pretty sweet.

Ask Luke is an AI-powered conversational interface that uses the thousands of articles, videos, audio files, and PDFs I've created over the years to answer people's questions about digital product design. Every time the system answers a question, it does so dynamically. So technically, each answer is unique.

To make each question and answer pair sharable, the first step was to enable creating a unique link to it. The second was to use Vercel's image generation library to create a preview card each time someone makes a link.

The dynamic preview card for each question and answer pair includes as much of the question we can in addition to a bit of the response. It also adapts to varying question and answer lengths since it is generated dynamically.

When shared on Twitter, LinkedIn, Apple Messages, Slack, and any other application that supports Open Graph previews, an image with the question and answer is displayed providing a sense of what the link leads to.

Thanks to Yangguang Li, Thanh Tran, and Sam for the tips and help with this.

Bolting on AI Features

LukeW - Tue, 05/28/2024 - 2:00pm

As more companies embrace new AI-enabled capabilities, a commonly held position is that established players will "win" by integrating AI features into their existing platforms and products. But the more established these companies are... the more competing interests they face when doing so.

Consider Microsoft's Web browser Edge and its start-up experience. Edge is now your AI-powered browser. But it's also your way to browse, shop, find, create, game, protect, learn, pin, personalize, sign-in, import, sync on the go, and discover. In other words, any new AI feature faces stiff competition from all the other existing features that are still vying for people's attention and use. (Lots of internal team objectives to hit at Microsoft)

Sure, the AI features are mentioned first but they're likely tuned out and skipped over like all the other browser features being promoted during setup. After years of being asked to adopt sign-in, shopping, syncing, personalization and more, people have learned to ignore and dismiss marketing messages especially when they come as fast and furious as they do on Windows.

And it's not just setup. Once you start using Edge, the right side-panel is loaded with icons. Of course, the most brightly colored icon is the AI feature but it's right there alongside search, shopping, tools, games, Microsoft 365, Outlook, Drop, Browser essentials, Collections, and more. Once again the effect is to tune it all out. Too much, too often. And the new AI features fare the same as all the existing features.

Looking beyond Edge, the same issues persist across Windows. Yes, there's a new AI feature icon but it's competing with Windows Start, Microsoft Start, and god knows what else (after a while I was afraid to click on anything else).

Contrast this situation with new products and companies that start with AI capabilities at their core. They don't have a laundry list of pre-AI features competing for attention. They are not beholden to the revenue streams and teams behind those features. They can build from the ground up and use AI-based capabilities to build the core of their offering leading to new paradigms and value adds.

Of course, new entrants don't have massive user bases to leverage. But often a large existing user base is a disadvantage, because adoption of new features isn't earned. Bolt on an AI feature to existing user base and some subset will try it or use it. The numbers "look good" but even turkeys fly in hurricanes.

Building from the ground up means you have to earn each user by providing value not just promotions. But it also means you're creating something valuable if people decide to come and especially if they stay. When you're integrating features, it's often harder to tell.

Mind the Gap

LukeW - Tue, 05/07/2024 - 2:00pm

Despite good intentions, lots of user-centered design isn’t actually user-centered. Learn what drives these gaps and how your organization can align business and customer needs to deliver the kind of user experiences we all want to have online. With data informed insights, “live” redesigns, and more Luke will give you the tools and information you need to close the gap between customers and companies.

Transcript

Hello everyone, today I'll talk through the mobile opportunity and how we're doing delivering actually user-centric design and products to the world.

I often like to say mobile is a planet-scale opportunity. But what do I mean by planet-scale. Well to start, there's 7.7 billion people on our planet. Of those, not everyone can use the software and services we make. Some are too young, some are too old, so we need to slice this number down a bit. It's not perfect, but 14 plus is one way of doing that.

Of the 7.7 billion people on the planet, about 5 billion have a mobile plan. Some with data, others not, but they're subscribed to something on their device. And last but not least, there's about 4 billion active smartphones.

While these smartphones vary in their capabilities, they're effectively as powerful as personal, even supercomputers of the past. They're pocket-sized and connected to the global internet pretty much all the time. With 4 billion of them active today, that's quite the achievement and quite the opportunity for all of us.

So when these 4 billion pocket-sized supercomputers visit the vast network of information we've built over the past 30 years, what kind of experience are they getting?

There's a high degree of likelihood that when they visit one of the many websites out there, they'll start by encountering something like a newsletter sign-up dialogue, or maybe a confounding cookie consent policy, perhaps a full-screen app download interstitial.

If they're really lucky, they might get three app download prompts, or two with a cookie consent dialogue and an account sign-up prompt, or maybe one of each with a fixed position ad thrown in for good measure.

Now before you say, that's only content publisher sites that do that, let's look at an example from e-commerce. Now you might argue, well that's just in the US, right? Doesn't seem that way. Or it's not a problem for big companies. Eh, it seems the resources they have enable them to do this type of stuff as well. And while we all probably dislike encountering webpages like this, most of them are designed this way because these techniques work, right?

I mean, app install ads. They happen everywhere. They're all over, from e-commerce to publishing and beyond. While they come in many shapes and sizes, they're there to get people to download native mobile applications. So how effective are they?

Well as usual, it depends on what we mean by effective. It turns out, if you put a full-screen interstitial with a big button in front of people, some portion of them will click. In this example we published from Google, about 9% of people click the big Get the App button. Success, right? It's a pretty good conversion right there.

But the other half of the story is that when we tested removing the full-page interstitial, app downloads only dropped 2%, but daily active users on the web went up 17%. What's the last A-B test you did that had that kind of impact? Perhaps removing things is a great idea for many of our tests instead of just adding stuff.

So if you're measuring active users instead of conversion on app install button clicks, the definition of what's good quickly changes.

When we observe people using our sites, we find app install banners can also have a lot of negative, unintended consequences. In this example, this user is trying to purchase some rosy pink shimmer. And though they've already selected the product they want, they can't seem to find something really important. So they scroll down, they scroll up, they begin to scroll to the left and to the right and back again, searching for that elusive Add to Cart button.

After all, once they have a product they'd like to purchase, the next step is actually checking out. But try as they might, nowhere on the screen is an Add to Cart button to be found. Scrolling doesn't seem to turn it up. So where could it be? Going down again, and down further, coming back up, still nothing. You'd expect it to be somewhere right around here, wouldn't you?

Perhaps they'll tap the little almost cart-like icon at the top. No, nothing there either. Well coming back again, perhaps they'll be able to find it. Let's see how that works. No, still not there. Nothing in the cart, nothing on the page. Out of desperation, what this person decides to do is tap the little X down by the Sephora app ad. And there, lo and behold, an Add to Basket option.

In examples like this and others, app install banners were the direct and sole cause of shopping cart abandonment. In Baymard Institute's testing, 53% of sites displayed one of these banners.

Here's another example. Let's say you want to take a look at this shelved ottoman a little closer. So you tap to zoom, and then you, well, unless you close the app install banner, you can't actually get back to the page where you purchased it.

Which again, if you ask most e-commerce company what metrics they care about, sales conversion is pretty high on the list. So having a user experience that negatively affects that seems like a pretty big deal. And as a result, it's probably worth asking, how do we end up with issues like these?

How can these prevalent app install banners be the direct and sole cause of abandonment when abandonment is the opposite of what we're looking for? Is this a user experience design problem? Maybe it's because these companies aren't investing in user experience.

But when I did a quick job search, I found that not only do they have user experience design teams, but pretty much all of them tout the importance of user-centered design on their business in these listings. Not only that, the job descriptions are filled with superlatives on the impact and importance of great user experience design. So what's going on?

Because like you, I don't find these web experiences to be very user-centric at all. In fact, I'd characterize most of these as user hostile. And it's not just these companies. And I really don't want to single out anyone in particular. But you don't have to look very far to encounter these kinds of experiences on the web today.

Often I hear all this is because business goals are outweighing design goals. PM made me do it. Legal made me do it. But as we saw with app and initial banners, important business goals like daily active users and e-commerce conversions are taking a hit with these approaches.

So why would the business side of the team be forcing us to do this stuff?

To answer this question, we're going to have to go back in time a bit to the Rhode Island School of Design. If you've ever taken a design class like the ones at RISD, you've experienced a design critique. This is where a class goes over people's work and talks about the choices they made and hopefully offers constructive feedback to improve those choices.

One of the things most design critiques have in common is that they're long and they take place in design studios. Most of the students sit on the hard floor or on uncomfortable seats for hours. At RISD, one student noticed this and realized many of his classmates' butts were actually quite sore by the end of these sessions. This is him over there, 26-year-old Joe Gebbia.

Joe experienced this pain firsthand, which led him to search for a solution. He designed a cushion and named it Crit Buns to tackle the problem and plunged full-time into his new business after graduation. Lots of skeptical retailers rejected his cushions until he finally sold 200 units to the Museum of Modern Art in New York, after which orders took off.

Joe was able to build a very user-centered product that addressed real pain points because he was the one experiencing the pain. His butt hurt like his classmates' butts, so he had an intimate knowledge of the problem he set out to solve.

Later, when Joe was in San Francisco, he was encouraged to start another project based on his experience with Crit Buns. He convinced his classmate from RISD, Brian Chesky, to move up to San Francisco to work on what's next.

The rent in San Francisco was high, and the two needed some money. So Joe sent Brian an email outlining a plan to turn their apartment into a bed and breakfast during a design conference, but they only had an air mattress. So they launched a site titled Air Bed and Breakfast, which brought in three guests.

They hosted them, made them breakfast, and earned $80 per head. After that first weekend, they began receiving emails from people around the world asking when the site would be available for other destinations, like London or Japan. From there, Airbnb was born.

Today it serves 2 million guests a night around the world. So Joe and Brian weren't the only ones with the problem they tried to solve. Once again, Joe and Brian had an intimate knowledge of the issue. They needed money. They did the hosting. They made the breakfasts.

When the user is the maker, there's no gap between who is building the product and who is using it. So user-centered design is easy, because you're the user. You feel the same pain, share the same perspective, and can address the problem. As a company grows, though, a gap between the customer and the company starts to open up.

When Brian and Joe recruited their former roommate Nathan to help build the next version of the Air Bed and Breakfast website, he hadn't hosted any guests with them. He didn't make them breakfast. He lacked the intimate knowledge of experiencing the problem. So Joe and Brian probably had to direct him and explain why the service needed to be the way they asked.

But we don't just have development teams in our companies. We might also hire some designers to help develop the UI, the brand, and style our sites.

As the company grows, it's likely we need a product management organization to coordinate the work of all these developers and designers, and make sure someone's thinking about the business impact, the timelines, the market dynamics, and more.

And the functions are likely to continue expanding and growing. Maybe a legal department, perhaps a security team, a growth team, or any number of distinct organizations within the larger one.

As we add these teams and they grow, we're creating distance between decision makers and our customers. The parts of the company closest to our end users aren't the ones making the decisions anymore. They're focused on running the company, keeping the organizations in place, and often rearranging those organizations. Leadership focuses on broad topics like infrastructure and portfolio management.

So this growth begins to create a gap. Let's call it the company and customer gap, or the distance between an organization and its end users. Leadership now has many levels between it and the customer, making awareness and insights more difficult to come by.

If you've ever played telephone, where you send messages down the line, you know things get scrambled pretty quickly, especially when the people playing the game have incentives to change the message as it goes down the line. They may adapt it, consciously or not, to suit the resources they need, or their particular agenda at the time. It happens.

And gradually, these competing agendas and perspectives start creeping into the products we make. That's where the company-customer gap starts showing up in product designs.

Let's look at this simple contact us form. The requirements were just to have customers contact us. So we needed a way to get back to them, find out who they are, and give them a chance to voice their message. Simple form with a name, a way to contact them that's flexible, and a submit button should probably suffice.

But once the sales team hears about this, they want to make sure that these leads have more information so they can route to the appropriate people inside of their team. They probably want an address, a city, and which department or subject is most appropriate for which sales rep.

As engineering discovers they need to build this contact form, they make the point that usernames are actually stored with first name, last name, and streets need separate fields for number, city, and zip code. So the requirements continue to grow.

Marketing finds out that we're talking to customers and of course they have some demographic questions to ask so they can segment our users appropriately and send the right messages to them through all their marketing channels. So gender, date of birth, and a toggle to allow those marketing messages to be sent pop up.

Once legal hears about all the information we're collecting, they definitely are going to require terms of use and a privacy policy acknowledgement. All together, it quickly adds up.

And this isn't a new phenomenon. In fact, it was articulated quite a long time ago in 1967 by Melvin Conway. Conway basically says organizations that produce designs are going to reflect their organizational structure in those designs. In other words, everybody ships their org chart.

So as organizations grow, decision making moves further from end users and the structure of our organization starts to show up in product designs. Our org charts sometimes become so evident in the user-centered experiences we make, you can smell the departments on what we ship. And while that's a problem in of itself, it leads to additional problems as well.

Which brings us to gap number two and a chair. With a chair, what it is and why it's there is a very small leap. You see it and you know what it's for, sitting down. There's very little gap between its form and its function. The design of the product immediately fills that gap. So the purpose of the product aligns tightly with its final form. It's designed to be sat in and the intention is clear.

Now let's look at another product experience, mostly because it's been quite popular, scooter sharing. Let's say you come upon a scooter in your town and want to ride it somewhere. What's that experience like? Well, it starts pretty typically.

Splash screen, a tutorial, sign up form, which then continues to permission dialogue, probably some terms and service agreements, back to some more permissions, followed by filling an account with some funds. Once you do that, we are back to another tutorial probably. And just to wrap it all up, let's throw in another permission dialogue. Phew, you're off.

Now there's reasons for each of these things to exist in this design, but are they all really user centric? Because when you add them up as a full experience, it's not hard to see why someone might call this painful. Well, let's look at some of these reasons and how they're part of growing the second gap.

We'll switch to another scooter sharing service, just to keep things consistent. Here, Hello Bike starts with a splash screen, followed by a sign up form, and then terms and conditions, of which you have no choice but to scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll and scroll. Finally, you get to agree to everything you just looked through.

Probably everybody can agree that 15 screens of legal copy isn't the most user centric experience. Even if you make the case that people benefit from knowing what they're signing up for, this format probably isn't the best way to do that. So when I talk to teams about why they would have this type of experience in their product, I usually hear something like, legal made me do it.

While this may seem like a valid reason, it starts opening up a gap between what something is and why it exists. Instead of the form of the product reflecting why it exists, it now starts to reflect some organizational structure. In this case, requirements, which come from siloed parts of the organization, with different perspectives and views of the world.

So the product experience isn't what directly benefits the customer, but instead what legal or PM or fill in the blanks told us to do. In other words, we start doing things for reasons other than our customers.

Let's look at another one of these reasons and through the lens of another scooter sharing company. Once again, splash screen, few permission dialogues and a tour, which is often justified by saying, everybody's doing it. But what does that mean?

Those of you that have worked at a software design company know it's pretty common to kick things off with what's known as a competitive analysis. That is, you look at what other sites or apps are doing for a specific feature, you print them out, put them on the walls and compare what you see.

In the case of scooter sharing companies, we can look at the onboarding experiences of jump, spin, ofo, bird, lime, and we see across most of them that there's an intro tour explaining the service to people. So the result of this competitive analysis is that intro tours are probably a good idea because everybody else has one, right?

But if you actually take the time to test some of these things, like the music service Vevo did, they looked at how people were using their intro tour through user testing and analytics and they found most people were just skipping through the tutorial without reading any of the copy. So if they're skipping this, what would happen if they just got rid of the tour?

Turns out in a 28-day experiment with over 160,000 participants, the total number of people who got into the app increased, removing the tutorial didn't affect engagement or retention metrics, and more people actually completed signup.

You can see similar principles at work in the evolution of several Google products as well. Google Photos, for instance, used to have an intro tour, an animated tour, and an introduction to its Android app. Following a series of tests, the team ended up with a much reduced experience. Away went the spinning logo, the get started screen, the animated tour, all which were sources of drop-off. All that was left was a redesigned version of the turn on auto backup screen, which was overlaid on top of people's photo galleries.

This step was critical to getting the value out of Google Photos. It's a service that backs up and makes your photos refindable easily. Little in the app works without this step. So the team made it the first and only focus of onboarding.

It's a great illustration of the principle of getting people to product value as fast as possible, but not faster. That is, ask the user for the minimum amount of information you need to get them the most valuable experience. In the case of Google Photos, that's turning on auto backup.

As we saw before, when we start to do things for reasons other than our customers, the gap between what our products are and why they exist expands. This time, our rationale is everybody's doing it. It's a pattern. The competitive analysis showed it's widely used. Yet again, we're doing things for reasons other than our customers.

Coming back to Ofo's scooter sharing service, we can see after sign up there's a promo to try their subscription service. However, looking at the design, there doesn't seem to be any way not to take them up on their offer. Tapping, try it free, goes to two paid plan options. But it turns out if you tap the little arrow in the upper left, you get taken to a map where you can unlock a bike ride without the subscription plan. Not very clear in design.

I have no insider information, but I suspect this was a pretty well performing A-B test. Lots of people hit that try it free button. You've probably heard a lot of people talk about the importance of A-B testing and the impact they can have on conversion. But once again, we need to think about what are we measuring?

The classic A-B testing example is changing the color of a button and seeing results. In this example, 9% more clicks. When test results come back showing one item outperformed the other for a specific metric, it's pretty natural to want to implement that. So we make a product design choice because the data made us do it.

Isn't this how we improve user experiences by testing and seeing how user behavior improves? Yes, but it matters how you define and measure improves. Many companies have results that look like the button color example. In isolation, they show great short-term gains. But when you look at the long-term impact, the numbers tell a different story.

Multiple successful A-B tests you'd think would give you cumulative results much larger than what most companies end up seeing. One of the most common reasons behind this is that we're not using tests with enough contrast. Looking at the impact of a button color change is a pretty low contrast comparison.

A more significant contrast would be to change the action altogether, to do something like promoting a native payment solution by default on specific platforms. The reason the button change is a low contrast change is it doesn't really impact what happens after someone clicks on it. They still go into the same checkout flow, the same forms.

The payment method change is higher contrast because it can completely alter the buying flow. In this case, shifting it from a multi-step form-based process to a single double tap with biometric authentication. So one way of making good use of testing is to try bigger, bolder ideas, ones that have higher risk-reward ratios.

The other way of using testing is basic good hygiene in product launches. Using experiments to check outcomes when making changes, adding new features, and even fixing bugs. This gives you a way to measurably vet any updates and avoid causing problems by monitoring and being able to turn off new changes.

Back to scooter sharing to illustrate yet another way we make decisions for reasons other than our customers. In an effort to scale the impact of design teams, many companies are now investing in design systems or common components to make it easy for teams to apply similar solutions. And nowadays, it's common for me to hear refrains like, well, the design is like that because I was just following the guidelines. But pulling a few off-the-shelf design components from a library is not the same thing as creating a good user experience.

For example, JetRadar, a flight search engine, makes use of material design guidelines in their product. They've used material design input fields in the design of their form and material design floating action buttons for their primary call to action.

But you don't have to be a UX expert to see that the end result is not particularly great. Label and input text is duplicated. What looks like inputs are actually hint text. What looks like hint text is actually labels. Elements are scattered across the page. And the primary action, frankly, just looks like a bug.

JetRadar's most recent design is much more approachable to people, though I could quibble with some of what they do. The point is, simply applying a style guide or design components doesn't ensure your product design works well. In fact, it could have the opposite effect.

Now in fairness, material design actually has updated both of the guidelines I showed earlier to try and cover cases like this. Always be learning.

But the point still stands. There's more to making a holistic user experience than applying guidelines to mockups. And while design systems have great aims, they can quickly become another reason for applying a specific solution for the sake of consistency. And as we just saw, just because something's consistent doesn't necessarily mean it's good.

Too often, the reason for making product decisions is about consistency with guidelines versus customer context and needs. It gets worse when those decisions are made without a deep understanding of the problem space.

But whether it's design guidelines, testing results, competitive analysis, or some other rationale, the more product decisions that are made for reasons other than our end users, the more the gap between what something is and why it exists expands.

To come back to scooter sharing one last time. You can come to a scooter and have a pretty clear sense that you can ride it based on the hardware design. The gap between what it is and why it exists is minimal. With software, we really seem to struggle with closing this gap.

So here's a quick way we might be able to address that. Assume you see a scooter and want to ride. The instructions point you to open your camera and point it at the QR code. From there, it's one tap to a native payment solution with some authentication and you're off riding. Effectively, this makes the process much faster.

It's also worth noting that we're using the web to make this happen. No need for a native mobile app.

Of course, we can quibble on how achievable the design I suggested is, but the point is it really tries to bridge the gap between what something is and why it exists by getting you riding a scooter as soon as possible. This is especially evident when you compare it to the first example we looked at. And in fact, most of the examples we looked at.

So how did they all get that way?

When the distance between the company and the customer increases, people start to do things for reasons other than the end user and that creates a gap between what something is and why it exists. In other words, it's evident in the product design.

But why do we care that there's a gap between what something is and why it exists? This is just design nerdery, right? Well we care because it creates the third gap, which really starts to affect the bottom line and growth of companies. With a big gap between what something is and why it exists, people's path to getting its value increases in length and difficulty.

To illustrate, let's look at an example in e-commerce. I ended up on this one because it made a top 10 e-commerce designs list somewhere. When I followed the link though, I only found two things. An app install banner and a full screen email newsletter promo. Not a great start.

So I did what most people do and dismissed the pop-up, revealing a promotional banner, an icon only navigation system, and a feature carousel. Encouraged by how my dismissal of the free shipping interstitial began to reveal more useful content, I tried removing the two promos at the top and something really interesting happened. I got to a list of categories, which doesn't seem all that compelling until you consider the impact of this UI.

In a few tests, Growth Rock compared standard e-commerce feature carousel based layouts with ones that included a few top level categories, making it clear what kind of products are available on the site. The result was a 5% increase in completed orders. Note the metric we're tracking here. Not clicks on the links, but actual impact on meaningful things, like completed orders.

There is also evidence they ran a similar experiment in another vertical, in this case for an ice cream retailer. Listing their categories up front led to a similar jump in category page views and in this case, a 29% increase in completed orders. Another example comes from Google's mobile optimization efforts, where they saw a similar outcome. Edgars is a large fashion retailer in South Africa.

They removed the animated banners, introduced some high level categories near the top of their screen and saw an increase in revenue per visitor of about 13%. So it seems like getting the categories on the site to be more visible is a good idea, especially if we are tracking impactful metrics like sales.

But there's more we can do here to help people get the value of this product and close that third gap. So next we'll tackle the icon based navigation system. It's worth mentioning that even the icons we take most for granted, like the search icon, are not as universal as we'd like to believe. So let's clarify the search function a little bit.

Instead of using just icons for a critical function like search, we're going to be more explicit in our product UI and close the gap between what something is and why it exists, with a search bar. This also gives us a chance to call out popular items and again reinforce what the site has to offer. I specifically call search out as critical because exposing it by default can also help with conversions.

In this case, boosting the number of searches as the conversion rate for users who search is usually higher than for users who don't interact with it, probably because they have specific intent. So now we have a pulled out search area, category links exposed, and well how else can we make it easier for people to get to the value of this product?

It turns out if we drop the featured image, which probably doesn't drive that much in the way of core metrics, we can show some of the actual products this site sells. Imagine that, showing popular or trending products on an e-commerce site.

But let's not just show two, let's center this module to get more content on the screen and make the images run off the side a bit so people can scroll for more, right where the thumb is for easy one-handed scrolling. This puts the ability to browse top products in a comfortable to reach zone on large screen sizes. Should make all our one-handed millennial users super happy. Because they'll scroll.

Pinterest found that even removing core features like the number of pins and likes in onboarding increased the number of photos they could show people at any given time, which increased the likelihood they'd find content they like and thereby become an active Pinterest user. Same principle applies here.

Overall, I think we've made progress on getting people to experience the value of this site a bit more directly. We could do even better maybe by putting the products up top and categories next. The goal is to get people from the state of, huh, I think I want to get out of here, to I get it, looks like my kind of thing, but you may say, Luke, what about that free shipping promo?

They were making a really big deal out of that, so it must be important, right? Indeed, the top reason for abandoning a shopping cart after browsing is shipping costs, taxes, etc. So free shipping is a winner and people should know about it. I'm not against that.

I just contend that there's probably a better time and place for it. Perhaps on the product page or the actual checkout experience when total cost is on most people's minds. The tricky but very valuable thing that makes mobile design hard is finding the right time and place for things.

It usually isn't right away on the homepage with everything. You can do this all day, but I'll add just one more consideration to this redesign. It's quite possible when someone looks at this design, they could say, but what about the brand? Now, I hope it comes through in the fonts, colors, and especially the products.

What people mean when they say that is something more like this, some aspirational imagery that reflects the personality of the company, serves as a hook for people to dive in, like this edgy Mad Max style look. And I agree, our site design is looking a little too plain.

So we can add in some brand imagery to bring back some soul. But even with this addition, I'd argue we still retain a lot of the functional benefits we've been adding or rather emphasizing by removing other things. Just be mindful that the reasons we're adding the brand imagery are tied to customer needs and not just the agenda of some department, like brand marketing. Else you'll end up back at the product experience that mashes up the agenda of multiple teams, which is increasingly the norm out there.

Now I focused a lot on free people, but they're certainly not alone. Looking at a number of other e-commerce sites, you see they're all doing similar stuff. But the end result is our third gap, the gap between people's first time experience and becoming a happy, satisfied customer. Because I alliterated the first two gaps, I had to do the same here. So we'll call this one the first to fandom gap.

What the first to fandom gap effectively means is that when there's a large gap between what something is and why it exists, it becomes much harder for people to get to its value. It takes longer and more people fall off. And as I mentioned earlier, this really starts to affect the bottom line and your growth as a company.

We've talked about a lot of stuff now. So let's try to summarize things really concisely.

When companies grow, decision making moves further away from users. And people within these organizations start to do things for reasons other than the customer, which means a bunch of things get added to the user experience, which get in the way of people experiencing the real value and purpose of what we make.

Kind of a bummer. So what can we do? How do we improve the situation? How can we bridge these gaps and actually deliver user-centric experiences instead of just saying we're doing so and acting quite differently?

We talked about three gaps. So I'm going to talk about three ways to close them.

Since we saw just how related these gaps are, these techniques actually apply to bridging all of them. The first thing we can do is be mindful that these gaps exist. When the voice of the customer is missing in critical discussions, we need to bring it back. When requirements are conflicting with a holistic product experience, we need to push back on them. When our most important experiences are underperforming, we need to learn why. Awareness is the first step to improving the situation.

Next, metrics. I work on company-wide metrics at Google. Why? Because I believe you are what you measure. Spending the time to get the right metrics affects so many things down the line. Let's say we decide to measure app downloads. Well, we start with a small promo, and then we test out another one. Oh, conversions on it are better. Well, we better keep both of them. Then we add another promo, and installs went up again. So why not drop in more?

Ooh, and things get even better when we make them bigger. Pretty soon, you've become what you measure, a giant app install ad. So please, spend the time working through what metrics to measure and why. Real quick, how to choose metrics.

First, we need to decide what change we actually want to see happen in the world. Next, we gotta figure out how could we possibly measure that change. For each of these possibilities, write down what you think is gonna happen if you start measuring it. What behaviors will you change? What actions will you take?

Next, rank that list by where you see the clearest impact. Then start actually tracking data for your top few, and see if it actually delivers the outcomes you thought it would. When you find a few that actually work for you, make sure to regularly and visibly track those.

Finally, and most importantly, spend time with customers. To illustrate this, I wanna come back to the Airbnb story I started this talk off with. Back in 2009, the Airbnb service wasn't growing. At the behest of Paul Graham, Joe and Brian went out to New York and stayed with a bunch of Airbnb hosts. There they saw firsthand the listings these folks had.

The photos made them look quite poor. They realized this was a problem they could fix, so they rented a camera, took pictures of their hosts' homes, and the next week, the revenue in New York doubled. We used to travel and actually stay with our customers, said Gebbia.

It was the ultimate enlightened empathy. You were so close to the people you were designing for that it informed you in a way that you know an online survey never would. Wise words that actually had real impact.

Based on the success of their New York experience, the Airbnb team created a photography program to scale the process, and from there, they were off to the races. Joe attributes all of this to being closer to his customers, which is really the same experience he had at RISD with design critiques and crit buns.

Getting as close as you can to the problem helps inform how to solve for it. It's not just upstart companies that can make these kind of insights happen. When I worked at eBay back in 2004, we launched a program called Visits that got people within the company into our users' homes.

These programs exist across companies, but people get really caught up in organizational objectives, their own workload, or even documents they're working on, and they don't make time. See the first and second gaps we talked about.

There's many ways you can bring user voice into your organization. We could have a whole talk outlining them. At Google, I organized a weekly meeting titled, What Did We Learn This Week? It had leads from engineering, marketing, PM, UX, and more come together for an hour every day to hear what we learned from quantitative and qualitative research across all the products in our group. It quickly became people's favorite meeting. I mean, look how excited they are in this meeting room, right?

Bottom line is there's no substitute for spending time with customers. Do it regularly, do it often. If the word user research or usability or whatever scares you, don't call it that. Just call it spending time with customers.

It really boils down to staying close to the people using your product and making sure your team directly gets that info as often as they can. Because it's only through this kind of direct empathy, through really seeing the world through our customer's eyes that we can make good on the planet-size opportunity that is mobile.

There's four billion networked pocket-sized supercomputers online right now able to access all the experiences we make for them. Let's make the kind of experiences we want to have and we want our friends and family to have.

The seams we talked about today can open up really quickly. So we need to be vigilant.

When companies grow, decision-making moves further from users. People within these organizations, good people, start to do things for reasons other than the customer. This means a bunch of stuff gets added to product designs, which get in the way of people actually getting to the purpose of what we're making.

Know and apply the simple techniques of knowing what's happening, awareness, taking time to set the right measures, and spending time with your end users.

These are pretty basic principles, but with them we can make a better web for everyone and still have successful businesses, as hopefully I've illustrated.

Please help me make this happen. If not for your customer's sakes, then for your own, because we all want a web that we can enjoy.

Thanks.

Making Product Value Obvious

LukeW - Mon, 04/29/2024 - 2:00pm

The most valuable contribution product designers can make to software is making the core value of a product clear to the people using it. Yet over and over again... this seemingly simple objective doesn’t get met. Why?

Making the value of a product clear through use (esp. first time use) is how to create customers. You can tell people all you want about your product’s benefits through marketing, onboarding, or a rigorous sales processes but it’s only when they experience the value for themselves that things click. They know why your product matters to them and they tell other people about it. In an ideal state, everyone that should (not all products are for all people) be able to get to this state with your product, does.

But life is not ideal and many factors get in the way of making product value obvious to people. So many, in fact, that I put together a 90min presentation on the most common ones. To summarize, an always increasing set of objectives gets in the way: adherence to a design system or technical architecture, the alignment of different team perspectives, mimicking what competitors are doing, and so on. These dynamics end up becoming the requirements that drive a design process instead of a relentless focus on making product value clear.

Many of these objectives drive us toward applying solutions instead of understanding the problem in depth. For instance, I’m sure many people read what I wrote above and thought: “oh he’s talking about onboarding”. And from there come the inevitable splash screens, tutorials, and tours that have become synonymous with user onboarding. It’s a great example of jumping to answers instead of getting so seeped in the problem that the most obvious solution emerges.

"True simplicity is, well, you just keep on going and going until you get to the point where you go... Yeah, well, of course.” —Jonathan Ive

When you go deep into a problem, solutions like tutorials and tours are not what you end up with. You communicate what a product does for people through the interactions, organization, and visual presentation of the product itself. The two become inseparable and the design feels inevitable unlike intro tours that feel bolted-on or like band-aids.

At this point I imagine folks asking for examples. So here’s two short videos from my afore-mentioned Mind the Gap talk. In the first, I redesign the front page of an e-commerce site to make its value clear up front. The process includes both visual and interaction design changes and pushing back on internal requirements.

In the second, I walk through some examples of onboarding and illustrate how the right design for "first use" will differ significantly between products because of their unique value.

Last but not least, how obvious you need to make things is often... not obvious. Teams building products talk about the value they hope to provide all the time. They've all internalized it (hopefully through regular use of the product they're building) but everyone else has not. What seems obvious to someone on the inside is not obvious to those on the outside. So being clearer than you think is needed is, in fact, needed.

I was recently reminded of this when at a Starbucks. Their food menu was labeled: All-Day Breakfast, Anytime Bakery, and All-Day Lunch. I started thinking they probably started with Breakfast, Bakery, and Lunch as labels but customers kept assuming that breakfast was only available in the mornings. So that label got changed to "All-Day Breakfast". But if breakfast is all-day, when can I get bakery items? And the label changed to "Anytime Bakery". At first blush these labels might seem excessively wordy but they're probably intentionally more obvious. And probably more obvious than originally thought necessary.

For even more on making product value obvious, check out my full Mind the Gap presentation.

AI Pin and Personal Assistant Hardware

LukeW - Thu, 04/25/2024 - 2:00pm

As the ability for computers to interpret and generate text, images, and video keeps accelerating, it's increasingly clear that multi-modal personal assistants are in our future. But the only way to find out what form they'll take is continued exploration. With that in mind, here's some thoughts on using the AI Pin from Humane.

Humane was founded in 2018 -well before there was widespread awareness about Large Language Model capabilities. Kudos to them for having the conviction that capable enough systems would exist to enable a "smartphone alternative". That said, many of the frustrations (short battery life, overheating, poor usability) I've encountered with the AI Pin likely stem from the fact that it's trying to replace, or at the very least not require, smartphone use.

"It feels like Humane decided early on that the AI Pin couldn’t have a screen no matter what and did a bunch of product and interface gymnastics..." -The Verge

I'm not here to harp on the hardware and software issues the device has as you can find plenty of reviews calling them out. That said, there are enough problems to prevent most people from getting to what could be the hero interactions of the AI Pin.

AI Pin has the components you'd need for multi-modal input and output: a camera, a microphone, a display, a speaker, a network connection, and a processor. The camera and mic are even positioned where we intake the world around us: attached to the clothes on our chest vs. tucked into a pocket or attached to a wrist. Only smartglasses or earbuds seem more optimally located.

So what's wrong? For privacy of the people around you, AI Pin's camera takes seconds to turn on and often does so unreliably as touch gestures to activate it go unrecognized. So getting real-time input from the World around is clunky and the e-ink hand-only display used for output is even clunkier.

The audio side of AI Pin works better. Though slow, its ability to answer nearly any question and utilize context like your current location when responding is exactly the kind ambient computing interaction we've dreamed of since the Knowledge Navigator video from Apple. Minus the screen of course.

When I demoed the ability to effectively talk with a search-enabled Large Language Model to my 15 year-old son, he asked: "Can I get one?" When I pressed on why, he said: "It's like having a little personal assistant with me all the time." Which is the future I outlined up front. So despite all it's flaws, the AI Pin has at least strongly hinted toward where human-computer interaction is headed.

Whether that personal assistant shows up in your palm, on your wrist, in your glasses, or attached to your lapel, we'll find out. As I don't doubt more hardware experiments are coming that let us glimpse the future and ultimately live in it. (insert sound of future here).

Demystifying Screen Readers: Accessible Forms & Best Practices

Css Tricks - Fri, 04/19/2024 - 4:26am

This is the 3rd post in a small series we did on form accessibility. If you missed the second post, check out “Managing User Focus with :focus-visible“. In this post we are going to look at using a screen reader when navigating a form, and also some best practices.

Editor’s Note: Edits were made throughout in regard to some of the best practices and code sample additions. If you have ideas and feedback to build on this post, please let us know!

What is a Screen Reader?

You may have heard the term “screen reader” as you have been moving around the web. You might even be using a screen reader at this moment to run manual accessibility tests on the experiences you are building. A screen reader is a type of AT or assistive technology.

A screen reader converts digital text into synthesized speech or Braille output, commonly seen with a Braille reader.

https://do.co/3vQTmoW

In this example, I will be using Mac VO. Mac VO (VoiceOver) is built-in to all Mac devices; iOS, iPadOS, and macOS systems. Depending on the type of device you are running macOS on, opening VO could differ. The Macbook Pro that is running VO I am writing this on doesn’t have the touch bar, so I will be using the shortcut keys according to the hardware.

Spinning Up VO on macOS

If you are using an updated Macbook Pro, the keyboard on your machine will look something like the image below.

You will start by holding down the cmd key and then pressing the Touch ID three times quickly.

If you are on a MBP (MacBook Pro) with a TouchBar, you will use the shortcut cmd+fn+f5 to turn on VO. If you are using a traditional keyboard with your desktop or laptop, the keys should be the same or you will have to toggle VO on in the Accessibility settings.. Once VO is turned on, you will be greeted with this dialog along with a vocalized introduction to VO.

If you click the “Use VoiceOver” button you are well on your way to using VO to test your websites and apps. One thing to keep in mind is that VO is optimized for use with Safari. That being said, make sure when you are running your screen reader test that Safari is the browser you are using. That goes for the iPhone and iPad as well.

There are two main ways you can use VO from the start. The way I personally use it is by navigating to a website and using a combination of the tab, control, option, shift and arrow keys, I can navigate through the experience efficiently with these keys alone.

Another common way to navigate the experience is by using the VoiceOver Rotor. The Rotor is a feature designed to navigate directly to where you want to be in the experience. By using the Rotor, you eliminate having to traverse through the whole site, think of it as a “Choose Your Own Adventure”.

Modifier Keys

Modifier keys are the way you use the different features in VO. The default modifier key or VO is control + option but you can change it to caps lock or choose both options to use interchangeably.

Using the Rotor

In order to use the Rotor you have to use a combination of your modifier key(s) and the letter “U”. For me, my modifier key is caps lock. I press caps lock + U and the Rotor spins up for me. Once the Rotor comes up I can navigate to any part of the experience that I want using the left and right arrows.

Using the Rotor in VoiceOver Navigating By Heading Level

Another neat way to navigate the experience is by heading level. If you use the combination of your modifier keys + cmd + H you can traverse the document structure based on heading levels. You can also move back up the document by pressing shift in the sequence like so, modifier keys + shift + cmd + H.

Using the Heading Level Shortcut with VoiceOver History & Best Practices

Forms are one of the most powerful native elements we have in HTML. Whether you are searching for something on a page, submitting a form to purchase something or submit a survey. Forms are a cornerstone of the web, and were a catalyst that introduced interactivity to our experiences.

The history of the web form dates back to September 1995 when it was introduced in the HTML 2.0 spec. Some say the good ole days of the web, at least I say that. Stephanie Stimac wrote an awesome article on Smashing Magazine titled, “Standardizing Select And Beyond: The Past, Present And Future Of Native HTML Form Controls”.

In my opinion, the following are some best practices to follow when building an accessible form for the web.

  1. Labelling implicitly is 100% ok to do. Check out the https://www.w3.org/WAI/tutorials/forms/labels/ article. If the form author is unaware of the id, it can be labeled implicitly. I personally prefer the explicit way.
<!-- Implicit Label --> <label> First Name: <input type="text" name="firstname"> </label> <!-- Explicit Label --> <label for="name">Name:</label> <input type="text" id="name" name="name" required/>
  1. If a field is required in order for the form to be complete, use the required attribute. Be sure to have a visual indication that a field is required, too, because non-screenreader users need to know a field is required as well.
<input type="text" id="name" name="name" required />
  1. A button is used to invoke an action, like submitting a form. Use it! Don’t create buttons using div’s. A div is a container without semantic meaning by itself.
Demo Navigating a Web Form with VoiceOver

If you want to check out the code, navigate to the VoiceOver Demo GitHub repo. If you want to try out the demo above with your screen reader of choice, check out Navigating a Web Form with VoiceOver.

Screen Reader Software

Below is a list of various types of screen reader software you can use on your given operating system. If a Mac is not your machine of choice, there are options out there for Windows and Linux, as well as for Android devices.

NVDA

NVDA is a screen reader from NV Access. It is currently only supported on PC’s running Microsoft Windows 7 SP1 and later. For more access, check out the NVDA version 2024.1 download page on the NV Access website!

JAWS

“We need a better screen reader”

— Anonymous

If you understood the reference above, you are in good company. According to the JAWS website, this is what it is in a nutshell:

“JAWS, Job Access With Speech, is the world’s most popular screen reader, developed for computer users whose vision loss prevents them from seeing screen content or navigating with a mouse. JAWS provides speech and Braille output for the most popular computer applications on your PC. You will be able to navigate the Internet, write a document, read an email and create presentations from your office, remote desktop, or from home.”

JAWS website

Check out JAWS for yourself and if that solution fits your needs, definitely give it a shot!

Narrator

Narrator is a built-in screen reader solution that ships with WIndows 11. If you choose to use this as your screen reader of choice, the link below is for support documentation on its usage.

Complete guide to Narrator

Orca

Orca is a screen reader that can be used on different Linux distributions running GNOME.

“Orca is a free, open source, flexible, and extensible screen reader that provides access to the graphical desktop via speech and refreshable braille.

Orca works with applications and toolkits that support the Assistive Technology Service Provider Interface (AT-SPI), which is the primary assistive technology infrastructure for Linux and Solaris. Applications and toolkits supporting the AT-SPI include the GNOME Gtk+ toolkit, the Java platform’s Swing toolkit, LibreOffice, Gecko, and WebKitGtk. AT-SPI support for the KDE Qt toolkit is being pursued.”

Orca Website TalkBack

Google TalkBack is the screen reader that is used on Android devices. For more information on turning it on and using it, check out this article on the Android Accessibility Support Site.

Browser Support

If you are looking for actual browser support for HTML elements and ARIA (Accessible Rich Internet Application) attributes, I suggest caniuse.com for HTML and Accessibility Support for ARIA to get the latest 4-1-1 on browser support. Remember, if the browser doesn’t support the tech, chances are the screen reader won’t either.

DigitalA11Y can help summarize browser and screen reader info with their article,  Screen Readers and Browsers! Which is the Best Combination for Accessibility Testing?

Thanks!

Thanks to Adrian Roselli, Karl Groves, Todd Libby, Scott O’Hara, Kev Bonnett, and others for clarifications and feedback!

Links

Demystifying Screen Readers: Accessible Forms & Best Practices originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Managing User Focus with :focus-visible

Css Tricks - Fri, 04/05/2024 - 12:13pm

This is going to be the 2nd post in a small series we are doing on form accessibility. If you missed the first post, check out Accessible Forms with Pseudo Classes. In this post we are going to look at :focus-visible and how to use it in your web sites!

Focus Touchpoint

Before we move forward with :focus-visible, let’s revisit how :focus works in your CSS. Focus is the visual indicator that an element is being interacted with via keyboard, mouse, trackpad, or assistive technology. Certain elements are naturally interactive, like links, buttons, and form elements. We want to make sure that our users know where they are and the interactions they are making.

Remember don’t do this in your CSS!

:focus { outline: 0; } /*** OR ***/ :focus { outline: none; }

When you remove focus, you remove it for EVERYONE! We want to make sure that we are preserving the focus.

If for any reason you do need to remove the focus, make sure there is also fallback :focus styles for your users. That fallback can match your branding colors, but make sure those colors are also accessible. If marketing, design, or branding doesn’t like the default focus ring styles, then it is time to start having conversations and collaborate with them on the best way of adding it back in.

What is focus-visible?

The pseudo class, :focus-visible, is just like our default :focus pseudo class. It gives the user an indicator that something is being focused on the page. The way you write :focus-visible is cut and dry:

:focus-visible { /* ... */ }

When using :focus-visible with a specific element, the syntax looks something like this:

.your-element:focus-visible { /*...*/ }

The great thing about using :focus-visible is you can make your element stand out, bright and bold! No need to worry about it showing if the element is clicked/tapped. If you choose not to implement the class, the default will be the user agent focus ring which to some is undesirable.

Backstory of focus-visible

Before we had the :focus-visible, the user agent styling would apply :focus to most elements on the page; buttons, links, etc. It would apply an outline or “focus ring” to the focusable element. This was deemed to be ugly, most didn’t like the default focus ring the browser provided. As a result of the focus ring being unfavorable to look at, most authors removed it… without a fallback. Remember, when you remove :focus, it decreases usability and makes the experience inaccessible for keyboard users.

In the current state of the web, the browser no longer visibly indicates focus around various elements when they have focus. The browser instead uses varying heuristics to determine when it would help the user, providing a focus ring in return. According to Khan Academy, a heuristic is, “a technique that guides an algorithm to find good choices.”

What this means is that the browser can detect whether or not the user is interacting with the experience from a keyboard, mouse, or trackpad and based on that input type, it adds or removes the focus ring. The example in this post highlights the input interaction.

In the early days of :focus-visible we were using a polyfill to handle the focus ring created by Alice Boxhall and Brian Kardell, Mozilla also came out with their own pseudo class, :moz-focusring, before the official specification. If you want to learn more about the early days of the focus-ring, check out A11y Casts with Rob Dodson.

Focus Importance

There are plenty of reasons why focus is important in your application. For one, like I stated above, we as ambassadors of the web have to make sure we are providing the best, accessible experience we can. We don’t want any of our users guessing where they are while they are navigation through the experience.

One example that always comes to mind is the Two Blind Brothers website. If you go to the website and click/tap (this works on mobile), the closed eye in the bottom left corner, you will see the eye open and a simulation begins. Both the brothers, Bradford and Bryan Manning, were diagnosed at a young age with Stargardt’s Disease. Stargardt’s disease is a form of macular degeneration of the eye. Over time both brothers will be completely blind. Visit the site and click the eye to see how they see.

If you were in their shoes and you had to navigate through a page, you would want to make sure you knew exactly where you were throughout the whole experience. A focus ring gives you that power.

Demo

The demo below shows how :focus-visible works when added to your CSS. The first part of the video shows the experience when navigating through with a mouse the second shows navigating through with just my keyboard. I recorded myself as well to show that I did switch from using my mouse, to my keyboard.

Video showing how the heuristics of the browser works based on input and triggering the focus visible pseudo class.

The browser is predicting what to do with the focus ring based on my input (keyboard/mouse), and then adding a focus ring to those elements. In this case, when I am navigating through this example with the keyboard, everything receives focus. When using the mouse, only the input gets focus and the buttons don’t. If you remove :focus-visible, the browser will apply the default focus ring.

The code below is applying :focus-visible to the focusable elements.

:focus-visible { outline-color: black; font-size: 1.2em; font-family: serif; font-weight: bold; }

If you want to specify the label or the button to receive :focus-visible just prepend the class with input or button respectively.

button:focus-visible { outline-color: black; font-size: 1.2em; font-family: serif; font-weight: bold; } /*** OR ***/ input:focus-visible { outline-color: black; font-size: 1.2em; font-family: serif; font-weight: bold; } Support

If the browser does not support :focus-visible you can have a fall back in place to handle the interaction. The code below is from the MDN Playground. You can use the @supports at-rule or “feature query” to check support. One thing to keep in mind, the rule should be placed at the top of the code or nested inside another group at-rule.

<button class="button with-fallback" type="button">Button with fallback</button> <button class="button without-fallback" type="button">Button without fallback</button> .button { margin: 10px; border: 2px solid darkgray; border-radius: 4px; } .button:focus-visible { /* Draw the focus when :focus-visible is supported */ outline: 3px solid deepskyblue; outline-offset: 3px; } @supports not selector(:focus-visible) { .button.with-fallback:focus { /* Fallback for browsers without :focus-visible support */ outline: 3px solid deepskyblue; outline-offset: 3px; } } Further Accessibility Concerns

Accessibility concerns to keep in mind when building out your experience:

  • Make sure the colors you choose for your focus indicator, if at all, are still accessible according to the information documented in the WCAG 2.2 Non-text Contrast (Level AA)
  • Cognitive overload can cause a user distress. Make sure to keep styles on varying interactive elements consistent
Browser Support

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

DesktopChromeFirefoxIEEdgeSafari864*No8615.4Mobile / TabletAndroid ChromeAndroid FirefoxAndroidiOS Safari12512612515.4 Links

Managing User Focus with :focus-visible originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

The Power of :has() in CSS

Css Tricks - Fri, 03/29/2024 - 4:07pm

Hey all you wonderful developers out there! In this post we are going to explore the use of :has() in your next web project. :has() is relatively newish but has gained popularity in the front end community by delivering control over various elements in your UI. Let’s take a look at what the pseudo class is and how we can utilize it.

Syntax

The :has() CSS pseudo-class helps style an element if any of the things we’re searching for inside it are found and accounted for. It’s like saying, “If there’s something specific inside this box, then style the box this way AND only this way.”

:has(<direct-selector>) { /* ... */ }

“The functional :has() CSS pseudo-class represents an element if any of the relative selectors that are passed as an argument match at least one element when anchored against this element. This pseudo-class presents a way of selecting a parent element or a previous sibling element with respect to a reference element by taking a relative selector list as an argument.”

For a more robust explanation, MDN does it perfectly The Styling Problem

In years past we had no way of styling a parent element based on a direct child of that parent with CSS or an element based on another element. In the chance we had to do that, we would need to use some JavaScript and toggle classes on/off based on the structure of the HTML. :has() solved that problem.


Let’s say that you have a heading level 1 element (h1) that is the title of a post or something of that nature on a blog list page, and then you have a heading level 2 (h2) that directly follows it. This h2 could be a sub-heading for the post. If that h2 is present, important, and directly after the h1, you might want to make that h1 stand out. Before you would have had to write a JS function.

Old School Way – JavaScript const h1Elements = document.querySelectorAll('h1'); h1Elements.forEach((h1) => { const h2Sibling = h1.nextElementSibling; if (h2Sibling && h2Sibling.tagName.toLowerCase() === 'h2') { h1.classList.add('highlight-content'); } });

This JS function is looking for all the h1’s that have a h2 proceeding it, and applying a class of highlight-content to make the h1 stand out as an important article.

New and improved with modern day CSS coming in hot! The capabilities of what we can do in the browser have come a long way. We now can take advantage of CSS to do things that we traditionally would have to do with JavaScript, not everything, but some things.

New School Way – CSS h1:has(+ h2) { color: blue; } Throw Some :has() On It!

Now you can use :has() to achieve the same thing that the JS function did. This CSS is checking for any h1 and using the sibling combinator checking for an h2 that immediately follows it, and adds the color of blue to the text. Below are a couple use cases of when :has() can come in handy.

:has Selector Example 1 HTML <h1>Lorem, ipsum dolor.</h1> <h2>Lorem ipsum dolor sit amet.</h2> <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eius, odio voluptatibus est vero iste ad?</p> <!-- WITHOUT HAS BELOW --> <h1>This is a test</h1> <p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eius, odio voluptatibus est vero iste ad?</p> CSS h1:has(+ h2) { color: blue; } :has Selector Example 2

A lot of times we as workers on the web are manipulating or working with images. We could be using tools that Cloudinary provides to make use of various transformations on our images, but usually we want to add drop shadows, border-radii, and captions (not to be confused with alternative text in an alt attribute).


The example below is using :has() to see if a figure or image has a figcaption element and if it does, it applies some background and a border radius to make the image stand out.

HTML <section> <figure> <img src="https://placedog.net/500/280" alt="My aunt sally's dog is a golden retreiver." /> <figcaption>My Aunt Sally's Doggo</figcaption> </figure> </section> CSS figure:has(figcaption) { background: #c3baba; padding: 0.6rem; max-width: 50%; border-radius: 5px; } Can I :has() that?

You can see that :has() has great support across modern browsers.

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

DesktopChromeFirefoxIEEdgeSafari105121No10515.4Mobile / TabletAndroid ChromeAndroid FirefoxAndroidiOS Safari12512612515.4 :has() in the Community!

I reached out to my network on Twitter to see how my peers were using :has() in their day-to-day work and this is what they had to say about it.

“One example I have is styling a specific SVG from a 3rd party package in @saucedopen because I couldn’t style it directly.”

This is what Nick Taylor from OpenSauced had to say about using :has(). svg:has(> #Mail) { stroke-width: 1; }

Lol the last time I used it I was building keyboard functionality into a tree view, so I needed to detect states and classes of sibling elements, but it wasn’t in Firefox yet so I had to find another solution. &#x1fae0;

Abbey Perini from Nexcor Food Safety Technologies, Inc.

It is great to see how community members are using modern CSS to solve real world problems, and also a shout out to Abbey using it for accessibility reasons!

Things to Keep in Mind

There are a few key points to keep in mind when using :has() Bullet points referenced from MDN.

  • The pseudo-class takes on specificity of the most specific selector in its argument
  • If the :has() pseudo-class itself is not supported in a browser, the entire selector block will fail unless :has() is in a forgiving selector list, such as in :is() and :where()
  • The :has() pseudo-class cannot be nested within another :has() 
  • Pseudo-elements are also not valid selectors within :has() and pseudo-elements are not valid anchors for :has()
Conclusion

Harnessing the power of CSS, including advanced features like the :has() pseudo-class, empowers us to craft exceptional web experiences. CSS’s strengths lie in its cascade and specificity…the best part, allowing us to leverage its full potential. By embracing the capabilities of CSS, we can drive web design and development forward, unlocking new possibilities and creating groundbreaking user interfaces.

Links:

The Power of :has() in CSS originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Accessible Forms with Pseudo Classes

Css Tricks - Fri, 03/22/2024 - 8:52am

Hey all you wonderful developers out there! In this post, I am going to take you through creating a simple contact form using semantic HTML and an awesome CSS pseudo class known as :focus-within. The :focus-within class allows for great control over focus and letting your user know this is exactly where they are in the experience. Before we jump in, let’s get to the core of what web accessibility is.


Form Accessibility?


You have most likely heard the term “accessibility” everywhere or the numeronym, a11y. What does it mean? That is a great question with so many answers. When we look at the physical world, accessibility means things like having sharps containers in your bathrooms at your business, making sure there are ramps for wheel assisted people, and having peripherals like large print keyboards on hand for anyone that needs it.

The gamut of accessibility doesn’t stop there, we have digital accessibility that we need to be cognizant of as well, not just for external users, but internal colleagues as well. Color contrast is a low hanging fruit that we should be able to nip in the bud. At our workplaces, making sure that if any employee needs assistive tech like a screen reader, we have that installed and available. There are a lot of things that need to be kept into consideration. This article will focus on web accessibility by keeping the WCAG (web content accessibility guidelines) in mind.

MDN (Mozilla Developer Network)

The :focus-within CSS pseudo-class matches an element if the element or any of its descendants are focused. In other words, it represents an element that is itself matched by the :focus pseudo-class or has a descendant that is matched by :focus. (This includes descendants in shadow trees.)

This pseudo class is really great when you want to emphasize that the user is in fact interacting with the element. You can change the background color of the whole form, for example. Or, if focus is moved into an input, you can make the label bold and larger of an input element when focus is moved into that input. What is happening below in the code snippets and examples is what is making the form accessible. :focus-within is just one way we can use CSS to our advantage.

How To Focus


Focus, in regards to accessibility and the web experience, is the visual indicator that something is being interacted with on the page, in the UI, or within a component. CSS can tell when an interactive element is focused.

“The :focus CSS pseudo-class represents an element (such as a form input) that has received focus. It is generally triggered when the user clicks or taps on an element or selects it with the keyboard’s Tab key.”

MDN (Mozilla Developer Network)

Always make sure that the focus indicator or the ring around focusable elements maintains the proper color contrast through the experience.

Focus is written like this and can be styled to match your branding if you choose to style it.

:focus { * / INSERT STYLES HERE /* }

Whatever you do, never set your outline to 0 or none. Doing so will remove a visible focus indicator for everyone across the whole experience. If you need to remove focus, you can, but make sure to add that back in later. When you remove focus from your CSS or set the outline to 0 or none, it removes the focus ring for all your users. This is seen a lot when using a CSS reset. A CSS reset will reset the styles to a blank canvas. This way you are in charge of the empty canvas to style as you wish. If you wish to use a CSS reset, check out Josh Comeau’s reset.

*DO NOT DO what is below!

:focus { outline: 0; } :focus { outline: none; }
Look Within!


One of the coolest ways to style focus using CSS is what this article is all about. If you haven’t checked out the :focus-within pseudo class, definitely give that a look! There are a lot of hidden gems when it comes to using semantic markup and CSS, and this is one of them. A lot of things that are overlooked are accessible by default, for instance, semantic markup is by default accessible and should be used over div’s at all times.

<header> <h1>Semantic Markup</h1> <nav> <ul> <li><a href="/">Home</a></li> <li><a href="/about">About</a></li> </ul> </nav> </header> <section><!-- Code goes here --></section> <section><!-- Code goes here --></section> <aside><!-- Code goes here --></aside> <footer><!-- Code goes here --></footer>

The header, nav, main, section, aside, and footer are all semantic elements. The h1 and ul are also semantic and accessible.

Unless there is a custom component that needs to be created, then a div is fine to use, paired with ARIA (Accessible Rich Internet Applications). We can do a deep dive into ARIA in a later post. For now let’s focus…see what I did there…on this CSS pseudo class.

The :focus-within pseudo class allows you to select an element when any descendent element it contains has focus.


:focus-within in Action!
HTML <form> <div> <label for="firstName">First Name</label><input id="firstName" type="text"> </div> <div> <label for="lastName">Last Name</label><input id="lastName" type="text"> </div> <div> <label for="phone">Phone Number</label><input id="phone" type="text"> </div> <div> <label for="message">Message</label><textarea id="message"></textarea> </div> </form> CSS form:focus-within { background: #ff7300; color: black; padding: 10px; }

The example code above will add a background color of orange, add some padding, and change the color of the labels to black.

The final product looks something like below. Of course the possibilities are endless to change up the styling, but this should get you on a good track to make the web more accessible for everyone!

Another use case for using :focus-within would be turning the labels bold, a different color, or enlarging them for users with low vision. The example code for that would look something like below.

HTML <form> <h1>:focus-within part 2!</h1> <label for="firstName">First Name: <input name="firstName" type="text" /></label> <label for="lastName">Last Name: <input name="lastName" type="text" /></label> <label for="phone">Phone number: <input type="tel" id="phone" /></label> <label for="message">Message: <textarea name="message" id="message"/></textarea></label> </form> CSS label { display: block; margin-right: 10px; padding-bottom: 15px; } label:focus-within { font-weight: bold; color: red; font-size: 1.6em; }

:focus-within also has great browser support across the board according to Can I use.

Conclusion

Creating amazing, accessible user experience should always be a top priority when shipping software, not just externally but internally as well. We as developers, all the way up to senior leadership need to be cognizant of the challenges others face and how we can be ambassadors for the web platform to make it a better place.

Using technology like semantic markup and CSS to create inclusive spaces is a crucial part in making the web a better place, let’s continue moving forward and changing lives.

Check out another great resource here on CSS-Tricks on using :focus-within.

Accessible Forms with Pseudo Classes originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

Portfolio Presentations & Design Work

LukeW - Wed, 03/13/2024 - 2:00pm

Portfolio presentations are an opportunity for designers to showcase their design process and problem-solving skills to potential employers, peer groups, and more. Over the years, there's been a clear trend in the portfolio presentations I see: much more focus on doing "work" vs. "design work." Here's what that means and how we're trying to account for it:

In large organizations, getting design done requires a lot more than flow diagrams, screen designs, and prototypes. There's a long list of meetings, processes, collaborations, and sign-offs to surmount before a design gets shipped. Because this kind of work takes so much time and effort, designers begin to view it as their primary job. But being great at navigating an organization doesn't necessarily mean being great at design.

This carries over to portfolio presentations as well. In an hour long presentation most of the time goes to describing organizational challenges or processes and little is left for design skills. Couple this with the prevalence of design systems and UI toolkits, and it becomes hard to know how a designer designs and why.

To account for this situation, I wrote a preface for designers coming to interview with us. Several of them suggested I publish it to be more widely useful. So here's the relevant part (below) and I hope it's helpful.

While we understand the need to walk through background and work history, we’ve all read your resume before you to come in. So you can keep your introduction brief and perhaps focus on relevant parts of your background that don’t show up on LinkedIn.

These days it's especially hard to get a clear sense of how designers make decisions and bring ideas to life due to the scale of tech companies (so many processes and stakeholders) and the prevalence of design systems and UI toolkits. We’re building companies from the ground up so getting to see your core design skills is critical for us. In many organizations, especially larger ones, a big part of getting design done requires cross-team coordination, resource management, getting buy-in, and more. While this certainly demonstrates your ability to get things done it’s more of a reflection on your ability to operate within an organization, not your product design sense.

We often find designers over-index on that kind of “work” and end up without enough time and depth on “design work.” So try to strike the right balance. Understanding the context behind a design is critical to evaluating it but connecting the two is where we learn the most about how you work as a designer. When presenting your portfolio, focus on the concrete things that you've personally accomplished and the way you accomplished them. Go deep on a couple of examples to provide insight into how you make design decisions. Walk through the 'why' at a big picture level, and then the 'how' at a detailed level.

To communicate your product design skills, answer questions like: why did you decide on a specific design solution? What iterations did you go through to get to it? Basically connect the pixel-level process to your understanding of business, product, and user goals. How did your unique contributions as a designer, not just as an employee or team member, make the kind of impact you intended?

Generation IT

LukeW - Tue, 03/12/2024 - 2:00pm

If you get the call when both your parents and children need help with their computers, you're part of Generation IT (thanks Sam). Jokes aside, as technology gets more layers there's increasing concerns about who will maintain the hardware and software systems we all increasingly depend on.

In his talk about the Life Post-Moore's Law, Mark Horowitz pointed out that in the not too distant past, groups of students could build a whole microprocessor. Today that process involves huge teams and hundreds of millions of dollars, making it inaccessible to the next generation of hardware designers. The implication according to Mark is:

"Because chip design and designers are a smaller group of people that are getting more gray hair, we're going to end up in a universe where we all are dependent on technology that none of us understand how it works."

Many other areas of technology have similarly gotten much more complex and added many layers of abstraction. While today's kids grow up with smartphones and the Internet, they don't need to know the inner workings of these systems, they use them at the highest level of abstraction. Contrast this to the generation that built all these systems and thereby know all the layers in the stack.

Did you make Web pages by writing HTML, CSS, and Javascript or through one of the many frameworks available today? Did you crank out mockups in Photoshop pixel by pixel or move the components of a design system around in Figma? Did you write code on SPARCstations or have ChatGPT do it for you?

Of course, these tools have made technology "easier" to access and use for many people. I'm not suggesting we all go back to punched-card interfaces. But there's a lot of learning that happens when you do things the hard way. Getting down to the fundamentals and then building back up again provides an understanding that you can't otherwise get.

"Art does not begin with imitation, but with discipline."—Sun Ra, 1956

People in Generation IT have likely had to explain how to connect a printer to both the generation before and after them. If that's our lot in life, ok. But if the next generation doesn't end up with the interest or ability to maintain our increasing archive of printer drivers... things are going to start breaking a lot.

Pinball User Interface

LukeW - Sun, 03/10/2024 - 2:00pm

Using software can be hard. All those form fields, menu items, interactive widgets and more... continually changing. So why make it harder for people by strewing all these user interface elements around a screen? This happens enough in applications that it needs a name. So let's call it Pinball UI.

Pinball UI happens when the various user interface elements on an application screen could be arranged meaningfully... but are not. An intentional layout of user interface elements can help people make their way through a process (like filling in a form) or make the relationships between various bits of content and actions clear. Designers use visual relationships to make these functional relationships clear to users. In Pinball UI, they do not.

Let's illustrate with an example. The "Complete Your Payment" form on PayPal is a pretty critical screen. You've found something you want to buy and are ready to pay. But instead of doing so quickly and effectively... you're playing pinball. The various user interface elements required to complete the payment process are tossed about the screen and people have to go hunting for what's next.

In this proposed redesign of the PayPal form, the steps required to complete a payment flow a clear path to completion. The headers, form elements, content, and primary action are all clearly aligned in a simple sequence. No darting around the screen to figure out what's next or how things are related.

This example from PayPal was featured in my 2008 book, Web Form Design, alongside user research and eye-tracking data highlighting why clear paths to completion reduce errors, speed up annoying processes (like filling in Web forms), and give people more confidence in their actions. So now it's 2024 and Pinball UI is a thing of the past, right?

Looking at Google's new Sign Up form, maybe not. Although there's a lot less UI on Google's form than on PayPal's payment form, the Pinball UI is still there. Our eyes bounce around the screen to make progress. With just a few UI elements on the screen, this could be easily fixed:

Maybe there's other constraints driving Google's layout decisions that aren't apparent to those of us looking at it from the outside.. or maybe they just like pinball.

The Most Important Startup Skill

LukeW - Fri, 03/01/2024 - 2:00pm

Lots of things make startups hard... building teams, shipping products, finding customers, earning revenue... to name just a few. But when there's an endless list of things to do what takes priority? I'd argue it's getting good at learning.

When you start a company, you may have many ideas but you don't have any proven answers. You don't know who your customer is going to be, what product you're going to make, which features are going to matter, what your customer will pay, and so on. Therefore, the most important thing to get good at is finding answers to all these questions.

How do you do that? You get really good at learning.

Luckily there's lots of ways to learn rapidly. Get in front of potential customers early and often. Iterate on design, prototypes, and product continuously. Collect data by using your products, watching others use them, collecting quantitative and qualitative data, and acting on what you see.

To get everyone excited about learning, let them share and celebrate their discoveries. My favorite way of doing this is with a regular "what did we learn this week?" meeting that allows designers, researchers, engineers, and more to highlight what they found out that week about our customers, products, technologies, etc.

This simple process only takes an hour (do it over lunch) and goes a long way to improving how well a company learns.

Life Post-Moore's Law

LukeW - Wed, 02/28/2024 - 2:00pm

In his AI Speaker Series presentation at Sutter Hill Ventures, Mark Horowitz discussed the current state of hardware chip design and scaling along with significant challenges as Moore's law comes to an end. Here's my notes from his talk:

  • We don't recognize is how pervasive our notion that computing will get cheaper in the future is. Everybody's building more complicated models that take longer to compute and the expectation is that that's OK, computers will be able to compute it.
  • The driver of this expectation is Moore's law. but most people don't understand that Moore's law is really about cost per function. That cost scaling is not what it used to be.
  • When transistor cost scale, making the same product in new technology is cheaper to do. That means you always moved all products to the most advanced technology.
  • But that's not happening anymore so Moore's law has ended. Cost per transistor is on a linear scale. It's supposed to be log.
  • If you plot the cost per bit over the past 60 years, DRAM prices are relatively flat. The hard drive has really bottomed out in terms of cost per bit. The only thing that's still scaling is SSDs.
  • So scaling today is just a marketing label. People are expecting better performance but basic technology is not the way to go.
  • What we need to do is increase efficiency and the only way we know how to increase efficiency is to increase customization for a particular end application. We need to tailor certain things for certain markets.
  • We used to be able to build a universal thing and now we need build these little different products without bankrupting ourselves.
  • Chiplets are not the answer. They are interesting and useful technology but won't solve the base problem.
  • We need to do application optimization but who's going to do this optimization?
  • Groups of students in the past could build a whole microprocessor.
  • The systems that are competitive today require investments of hundreds of millions of dollars. Most of the cost is the firmware, the basic interfaces because that's where all the complexity is.
  • Because of this complexity, the number of companies in the silicon space is decreasing. And student interest in hardware is decreasing because it's so opaque to them and the level of complexity that they need to make contributions is very high.
  • Given the situation, we need innovation now more than ever before. And we have nobody to do it.

  • To get great improvements in application optimization, we need radical thinking. In 99% or 95% of the cases it doesn't work but in 5% of cases, there's something interesting.
  • If every experiment costs you $100 million, you're not going to find a few percent of ideas that actually are good.
  • So can we make this exciting again and bring in new people? And make it cheap so that people can actually do it?
  • The good news is this happened before. In the 70s there were only custom chip designs. A bunch of crazy people in the 80s had this idea not to help the custom designers, but to enable another group of people who were interested in hardware design to basically build chips. Those were the logic designers, the people who used our chips and put them on boards.
  • To do that they had to create a whole different level of tooling that interfaced with people not thinking about chip architecture. These tools created really crappy chips but in 10 years it enabled a vibrant design community and the tools improved.
  • Now nobody does custom.
  • So we need a new group of people to throw spaghetti against the wall, because some of it might actually be useful.
  • We need to do hardware software co-design with performance engineers in the application space. They have no knowledge of hardware they know about locality, parallelism and metrics.
  • These users need to have a system to interact with an open interface to a proprietary platform for people to make money. We need to figure out how to map an application to hardware automatically.
  • The application designer need feedback at the level of their software about where the bottlenecks are.
  • All this stuff is hard but it doesn't seem like it is impossible. And if we're going to make forward progress, we really do fundamentally need to change the way we think about design.
  • Because chip design and designers are a smaller group of people that are getting more gray hair. And we're going to end up in a universe, where we all are dependent on technology that none of us understand how it works.

ConveyUX: Three Conversations in Design

LukeW - Tue, 02/27/2024 - 2:00pm

In his Three Conversations in Design presentation at Convey UX Andrew Hogan shared trends in user experience jobs, scaling, and the impact of AI on designers. Here are my notes from his talk:

  • Between 2008 and 2018, there was a decrease in the number of industrial design jobs but an sharp increase in user experience design jobs.
  • With AI, are we at that same moment with digital design jobs? There’s 118,000 people employed in digital design in the US (new added category in 2022). Projections have looked good but they also did for industrial design when it began to decline. UX jobs are down relative to their peak. The main driver is technology unemployment claims.
  • So what’s going to happen now? Industries like utilities, finance, and government are increasing while tech is decreasing. So digital transformation across many industries will keep designers busy.
  • Scaling design teams requires new roles and expansion of roles. 5% of fortune 1000 companies have chief design officer roles. In banking that’s 50%.
  • These design organizations have been growing significantly and scaling roles in design systems, content, design ops, accessibility, and more. But hiring a lot isn’t the solution. Adding lots of designers creates common challenges: collaboration cross teams, career progression, and understanding impact.
  • The relationship of a PM and designer is as predictive of how they feel about their job is as predictive as their relationship with their direct manager.
  • AI is increasingly part of the design process. 65% of designers use AI in their design process. And regularly find it speeds up design processes.
  • But most of design is about communication: what are we doing for who and how? Jambot in Figma brings generative AI features into the canvas to summarize, rewrite, code, etc. But the multi-player aspect still needs to get worked out.
  • Practitioners with a sense of what good is can evaluate generative output but what about new practitioners that don’t yet know how to assess the quality of AI output? Designing AI is becoming a job. Walmart, New York Times, and more are specifically hiring designers to add AI into their products.
  • What’s the impact of AI on design and design on AI? Will we feel a spike in AI design interest and jobs?
  • More AI interactions lead to more energy into designing AI. So these systems will get better but we don’t know what’s next but it will definitely be interesting.

ConveyUX: Good UX is Good Business

LukeW - Mon, 02/26/2024 - 2:00pm

In her Good UX is Good Business talk at Convey UX Amy Lanfear outlined the journey the Microsoft Security team's joint UX group underwent to make their business impact clear to executives. Here are my notes from her talk:

  • In January 2022, a brand new division was been formed at Microsoft for all the security products and they decided to centralize UX.
  • The ultimate goal for the engineering executives was to drive business impact. So how can the UX team show their value toward that end?
  • To communicate that impact, the UX team had to speak a language that engineering executives understood: data.
  • How do you start to apply data in everything that you're doing? OKRs. They're a methodology for tracking goals that are methods-based and help drive accountability.
  • The team articulate objective statements for culture, quality, operational excellence, and a few others.
  • For each, they asked why does it really matter? Why do we think it's important? Perhaps usability, accessibility, productivity, customer loyalty, etc.
  • Executives might not look at the world the same way. Their drivers are about revenue and driving the business forward. So how do you connect these two outlooks?
  • Set a hypothesis that products with high-performing UX metrics are going to build stronger business results. To prove it, they set about measuring their OKRs.
  • One objective was to deliver quality experiences that are easy to use, human-centered, and accessible and grounded ourselves in three metrics.
  • Accessibility should be a C grade or higher. Ease of use, the SEQ score should be a six or higher on a seven-point scale. And so on...
  • The problem was each UX team measured things differently. Some measured NPS. Some measured ask completion. It was just all over the map.
  • The Common UX Measurement Framework was started to make sure all product teams measure like things in like ways.
  • Then across designers, researchers, technical PMs, software developers, data scientists, they got to shared goals and a common scorecard that was reviewed quarterly review.
  • In the review, the why questions that only humans can ask and answer are discussed. In this meeting, shining a light on winning scenarios helps other teams ask, what are you doing?
  • But UX metrics weren't enough. It was the data correlation with business metrics that mattered like support incidents, CSAT, NPS, public perception, internal efficiencies.
  • the team just finished a pilot project that showed a 12% reduction in support over three months' time.
  • Now the team is using their data insights to shift left, which means let's get problems right upstream, versus wait for problems, and then only have to fix them later downstream.
  • Basically it's about bringing quality assurance closer to the beginning stage of the development cycle.
  • The next step is get UX metrics into the product launch readiness criteria.<./li>
  • Though the things that we measure today will be different tomorrow because the experiences will be different tomorrow, this framework still holds true. The metrics might change because with new experiences come new things to measure and in different ways.

ConveyUX: Building Expertise into Generated Conversations

LukeW - Mon, 02/26/2024 - 2:00pm

In her Building Expertise into Generated Conversations talk at Convey UX Susan Hura talked about the impact of Large Language Models on the role and process of conversational designers. Here are my notes from her talk:

  • It is a weird time to be a conversation designer. Two years ago Siri and Google Assistant raised people's consciousness. People started to become willing to engage. But ChatGPT really changed the situation as people realized its capabilities.
  • So how are large language models and generative AI are impacting this domain of design?
  • Speech is getting things in my head into your head. We used to think this is a metaphor but when you measure the brain waves between speakers, they match across conversation. So conversation is really critical.
  • AI has been used in various parts of conversation for years. NLG: natural language generation, TTS: text to speech, ASR: automatic speech recognition (sounds to words), NLU: natural language understanding.
  • But we used to have to build custom language models to get to something that looks like understanding. It was a challenging issue. Large language models only work with few shots. You can train a model now with just dozens of examples.
  • Conversation is an over learned behavior. We learn it very early in life (about a year old) and automatically. No one needs to teach us how to learn to speak.
  • We are designing for one of the most human of behaviors. Their are all kinds of social, relationship, and emotional triggers in conversations.
  • The most important elements of conversation are not tied to language, it’s a back and forth. You are in relationship in a conversation. When you get it right, it establishes trust.
  • We don’t want people to have to think about how to talk to a computer, instead computers need to play by the rules of conversation.
LLMs for Conversational Design
  • What we can do today is play to the strengths of generative AI models. They're great at synthesizing huge amounts of information so use them to help analyze large chunks of data.
  • For example, one of the things that's important in conversation design is establishing a conversational style guide. Mature organizations have UX writing guidelines and a voice and tone guide.
  • For smaller organizations, you can use LLMs to draft these resources from an organization's Website by analyzing how they talk to customers.
  • You can also use Generative AI to analyze unstructured user research results especially open-ended questions that take a long time to categorize.
  • Generative AI can also give us raw materials at design time. For example, the first deliverable for conversation design is often a sample dialogue. But once you get more than a small handful of them, it becomes a maintenance nightmare. So use a large language model to generate all the needed variants.
  • These are really quite low risk because they are used at design time. They just help us do our jobs better and faster.
  • Using Generative AI at run time is also possible. For instance to allow flexibility in entity collection. That is to allow the user to give you any or none or all pieces of information in whatever way they choose.
  • This used to require a lot of logic in code but now it can be a single statement.
  • Generative AI can handle procedural elements of conversation. Could you hang on a second? Could you repeat that? You can build this one-off, but with the right model, you don't have to.
  • Generative AI can also provide a real-time complete FAQ from all the information you want you to draw answers from. With this, you can actually answer questions.
  • Very nonlinear, totally unscripted conversations are only possible with a fully autonomous AI agent.
  • Instead of writing code, just lay out the rules of the road and hand over the entire interactions: what gets said, the order in which it gets said, everything.
  • This is necessary for some use cases that don't seem all that complicated like shopping for a new TV.
  • You need an agent because these conversations are unscripted, nonlinear, and the user changes their minds: they back up, they go forward, they skip steps.
  • Prompt engineering needs to tell the bot, who are you? What is your role in the conversation that you're about to have with an end user? etc.
  • Evaluate anything that's generated. There aren't established guardrails yet but things like RAG and large context windows can help.
  • Know when Generative AI is not your right solution like hen you need security, privacy, and compliance.
  • Be aware of latency. Maybe you get away with it taking 3 or 5 seconds to get back to you. But even that isn't ideal for natural conversations.
  • When large language models fail, they fail in ways that do not make intuitive sense to us as humans. Because LLMs don't really understand the world.<./li>
  • There's a difference between knowing the association between words and images and having that real-world grounding of what they mean.
  • This has implications on how we set up our users to talk to these things. Are we setting up these AI agents as artificial humans?
  • The problem with putting a counterfeit version of a human in front of people is that we can't stop imagining the mind behind the conversation.

Wed, 12/31/1969 - 2:00pm
Syndicate content
©2003 - Present Akamai Design & Development.