{"url": "https://web.dev/", "titulek": "web.dev", "h1": "", "popis": "Guidance to build modern web experiences that work in every browser.\n", "klicova_slova": "", "kanonicka": "https://web.dev/", "jazyk": "en", "robots_meta": "", "og": {"og:site_name": "web.dev", "og:type": "website", "og:title": "web.dev", "og:description": "Guidance to build modern web experiences that work in every browser.\n", "og:url": "https://web.dev/", "og:image": "https://web.dev/images/social-wide.jpg", "og:image:width": "1200", "og:image:height": "675", "og:locale": "en"}, "jsonld": [{"@context": "https://schema.org", "@type": "Article", "headline": ""}, {"@context": "http://schema.org/", "@type": "Organization", "name": "web.dev", "logo": "https://www.gstatic.com/devrel-devsite/prod/veec7311b6c5f99ef32994eb65aab7022195f72bfa4f3d934bdc7556da7fa7c3b/web/images/touchicon-180.png", "url": "https://web.dev/"}, {"@context": "http://schema.org", "@type": "WebSite", "name": "web.dev", "url": "https://web.dev/", "potentialAction": {"@type": "SearchAction", "target": "https://web.dev/s/results?q={search_term_string}", "query-input": "required name=search_term_string"}}], "drobecky": [], "osnova": [{"uroven": 3, "text": "Building a better web, together"}, {"uroven": 3, "text": "AI and the web"}, {"uroven": 3, "text": "Optimize INP"}, {"uroven": 3, "text": "Payments & Identity"}, {"uroven": 3, "text": "HTML"}, {"uroven": 3, "text": "CSS"}, {"uroven": 3, "text": "JavaScript"}, {"uroven": 3, "text": "Learn HTML"}, {"uroven": 3, "text": "Learn CSS"}, {"uroven": 3, "text": "Learn JavaScript"}, {"uroven": 3, "text": "Keep up on web development news"}, {"uroven": 3, "text": "July 2026 Baseline monthly digest"}, {"uroven": 3, "text": "June 2026 Baseline monthly digest"}, {"uroven": 3, "text": "Introducing Baseline Alerts"}, {"uroven": 3, "text": "Effortlessly get Baseline target data with the updated Baseline Checker tool"}, {"uroven": 3, "text": "Adapting typography to user preference using CSS"}, {"uroven": 3, "text": "New CSS color spaces and functions in all major engines"}, {"uroven": 3, "text": "What are source maps?"}, {"uroven": 3, "text": "CSS subgrid"}, {"uroven": 3, "text": "The most effective ways to improve Core Web Vitals"}, {"uroven": 3, "text": "How to optimize INP"}, {"uroven": 3, "text": "Common misconceptions about how to optimize LCP"}, {"uroven": 3, "text": "Best practices for measuring Web Vitals in the field"}, {"uroven": 3, "text": "Learn PWA"}, {"uroven": 3, "text": "TransformStream is now supported cross browser."}, {"uroven": 3, "text": "New patterns for amazing apps"}, {"uroven": 3, "text": "Project Fugu API showcase"}, {"uroven": 3, "text": "Learn Accessibility"}, {"uroven": 3, "text": "Testing web design color contrast"}, {"uroven": 3, "text": "Building the main navigation for a website"}, {"uroven": 3, "text": "Community highlight: Melanie Sumner"}, {"uroven": 3, "text": "Create a passkey for passwordless logins"}, {"uroven": 3, "text": "Sign in with a passkey"}, {"uroven": 3, "text": "Web payments overview"}, {"uroven": 3, "text": "Payment and address form best practices"}], "markdown": "Stay organized with collections\n \n \n Save and categorize content based on your preferences.\n \n \n \n Building a better web, together\n \n \n \n We want to help you build beautiful, accessible, fast, and secure websites that work cross-browser, and for all of your users. This site is our home for content to help you on that journey, written by members of the Chrome team, and external experts who specialize in web development topics such as accessibility, performance, design, and more.\n\n [AI and the web](https://web.dev/explore/ai) \n Discover resources created to help you understand and build performant, web-first experiences with AI.\n [Learn more](https://web.dev/explore/ai) [Optimize INP](https://web.dev/explore/how-to-optimize-inp?utm_source=web.dev&utm_medium=cards&utm_campaign=inp-cwv) \n Interaction to Next Paint (INP) is now a Core Web Vital metrics. [Start measuring and optimizing](https://web.dev/explore/how-to-optimize-inp?utm_source=web.dev&utm_medium=cards&utm_campaign=inp-cwv) your site's INP.\n [Learn more](https://web.dev/explore/how-to-optimize-inp?utm_source=web.dev&utm_medium=cards&utm_campaign=inp-cwv) [Payments & Identity](https://web.dev/identity) \n Read up on the latest features and best practices when it comes to identity and payment processing.\n [Learn more](https://web.dev/identity) \n The web platform is a constantly evolving ecosystem of browser features and APIs for developers to make websites that are easy and delightful to use. These pages are pathways for you to dive into each part of the web platform on web.dev—at your pace.\n [image](https://web.dev/html) [HTML](https://web.dev/html) \n HTML is the document layer of the web, providing structure and semantics for pages.\n\n [Learn more](https://web.dev/html) [web](https://web.dev/css) [CSS](https://web.dev/css) \n CSS is the presentation layer of the web, and allows you to make your web pages look exactly like you imagine.\n [Learn more](https://web.dev/css) [timer](https://web.dev/javascript) [JavaScript](https://web.dev/javascript) \n JavaScript adds rich interactivity to web pages, so you can build websites that help users to perform tasks and accomplish goals.\n [Learn more](https://web.dev/javascript) \n New to the web platform? We've got you covered! Dive into each layer, with courses curated specifically for beginners to HTML, CSS, and JavaScript.\n Course [Learn HTML](https://web.dev/learn/html) \n A solid overview of HTML for developers, from novice to expert level HTML.\n [Start course](https://web.dev/learn/html) Course [Learn CSS](https://web.dev/learn/css) \n A guide to CSS with modules covering everything from accessibility to z-index.\n [Start course](https://web.dev/learn/css) Course [Learn JavaScript](https://web.dev/learn/javascript) \n An in-depth course on the basics of JavaScript.\n [Start course](https://web.dev/learn/javascript) \n \n \n Keep up on web development news\n \n \n \n Read our blog to learn the latest news in web development, including new web platform features, updates to Baseline, AI, Core Web Vitals, and more.\n\n [Read the blog](https://web.dev/blog) [July 2026 Baseline monthly digest](https://web.dev/blog/baseline-digest-jul-2026) \n Read about various happenings with Baseline during July 2026.\n\n [June 2026 Baseline monthly digest](https://web.dev/blog/baseline-digest-jun-2026) \n Read about various happenings with Baseline during June 2026.\n\n [Introducing Baseline Alerts](https://web.dev/blog/baseline-alerts) \n Baseline Alerts have landed on the Web Platform Status dashboard. Learn how they can shorten the time between awareness of a web feature, and when you can adopt it.\n\n [Effortlessly get Baseline target data with the updated Baseline Checker tool](https://web.dev/blog/baseline-ga-checker-update) \n Get data to select your Baseline target with Google Analytics data—now faster and easier.\n\n [Adapting typography to user preference using CSS](https://web.dev/articles/adapting-typography-to-user-preferences-with-css) \n Adapt a font to your users' preferences, so they're maximally comfortable reading your content.\n\n [New CSS color spaces and functions in all major engines](https://web.dev/blog/color-spaces-and-functions) \n All major engines now support the new CSS color spaces and functions. Find out how they can bring vibrancy to your designs.\n\n [What are source maps?](https://web.dev/articles/source-maps) \n Improve web debugging experience with source maps.\n\n [CSS subgrid](https://web.dev/articles/css-subgrid) \n Subgrid is now interoperable across all three major engines. Find out how to use it.\n\n [The most effective ways to improve Core Web Vitals](https://web.dev/articles/top-cwv) \n A collection of best practices for optimizing websites' Core Web Vitals performance based on the state of the web.\n\n [How to optimize INP](https://web.dev/explore/how-to-optimize-inp) \n Learn how to optimize for the Interaction to Next Paint metric.\n\n [Common misconceptions about how to optimize LCP](https://web.dev/blog/common-misconceptions-lcp) \n Explore common misconceptions about optimizing Largest Contentful Paint by looking beyond image optimization and considering factors like Time to First Byte and resource load delay.\n\n [Best practices for measuring Web Vitals in the field](https://web.dev/articles/vitals-field-measurement-best-practices) \n Guidance for collecting and reporting Web Vitals quickly and reliably.\n\n [Learn PWA](https://web.dev/learn/pwa) \n A course that breaks down every aspect of modern progressive web app development.\n\n [TransformStream is now supported cross browser.](https://web.dev/blog/transformstream) \n Now that transform streams are supported in Safari, Firefox, and Chrome they are finally ready for prime time.\n\n [New patterns for amazing apps](https://web.dev/blog/new-patterns-for-amazing-apps) \n Dive into a fantastic collection of new patterns for amazing apps, including clipboard patterns, file patterns, and advanced app patterns.\n\n [Project Fugu API showcase](https://developer.chrome.com/fugu-showcase/) \n On the Chrome Developers site, explore capabilities APIs.\n\n [Learn Accessibility](https://web.dev/learn/accessibility) \n Our new course is a great entry point and reference for accessibility topics.\n\n [Testing web design color contrast](https://web.dev/testing-web-design-color-contrast) \n An overview of three tools and techniques for testing and verifying accessible color contrast of your design.\n\n [Building the main navigation for a website](https://web.dev/articles/website-navigation) \n This tutorial describes how to build an accessible main navigation of a website. You learn about semantic HTML, accessibility, and how using ARIA attributes can sometimes do more harm than good.\n\n [Community highlight: Melanie Sumner](https://web.dev/blog/community-highlights/melanie) \n Read our interview with Melanie, a software engineer who specializes in digital accessibility.\n\n [Create a passkey for passwordless logins](https://web.dev/articles/passkey-registration) \n Passkeys make user accounts safer, simpler, easier to use.\n\n [Sign in with a passkey](https://web.dev/articles/passkey-form-autofill) \n Create a sign in experience that uses passkeys while still accommodating existing password users.\n\n [Web payments overview](https://web.dev/articles/web-payments-overview) \n Learn more about Web Payments and how they work.\n\n [Payment and address form best practices](https://web.dev/articles/payment-and-address-form-best-practices) \n Maximize conversions by helping your users complete address and payment forms as quickly and easily as possible.", "znaku_textu": 7550, "slov": 922, "odkazu": 87, "kodovani": "iso-8859-2", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 21:34:50", "sha256": "1c64ddb8f70546fb6a1f2b47a74f94c96bca59c0a40910cd389733d758624ff1", "hloubka": 0, "zdroj_objevu": "seed", "ze_seznamu": true, "mime": "text/html", "odkazy_externi": ["https://pagespeed.web.dev/", "https://cspace.eu.qualtrics.com/jfe/form/SV_d4CyeN2qJgODm0m?pcid=CLCS&udv=wd", "https://developer.chrome.com/fugu-showcase/", "https://issuetracker.google.com/issues/new?component=1400680&template=1857359", "https://issuetracker.google.com/issues?q=status%3Aopen+componentid%3A1400680&s=created_time%3Adesc", "https://developer.chrome.com/", "https://blog.chromium.org/", "https://twitter.com/ChromiumDev", "https://www.youtube.com/user/ChromeDevelopers", "https://www.linkedin.com/showcase/chrome-for-developers", "https://policies.google.com/terms", "https://policies.google.com/privacy"]} {"url": "https://web.dev/articles/3d-css", "titulek": "3D and CSS | Articles | web.dev", "h1": "3D and CSS \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences.", "popis": "", "klicova_slova": "", "kanonicka": "https://web.dev/articles/3d-css", "jazyk": "en", "robots_meta": "", "og": {"og:site_name": "web.dev", "og:type": "website", "og:title": "3D and CSS  |  Articles  |  web.dev", "og:url": "https://web.dev/articles/3d-css", "og:locale": "en"}, "jsonld": [{"@context": "https://schema.org", "@type": "Article", "dateModified": "2010-09-07", "headline": "3D and CSS"}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Articles", "item": "https://web.dev/articles"}, {"@type": "ListItem", "position": 2, "name": "3D and CSS", "item": "https://web.dev/articles/3d-css"}]}], "drobecky": ["Articles", "3D and CSS"], "osnova": [{"uroven": 1, "text": "3D and CSS \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences."}, {"uroven": 2, "text": "Introduction"}, {"uroven": 2, "text": "Browser Support and Hardware Acceleration"}, {"uroven": 3, "text": "-webkit-perspective"}, {"uroven": 3, "text": "-webkit-transform-3d"}, {"uroven": 2, "text": "Feature Detection"}, {"uroven": 2, "text": "Basic Sample"}, {"uroven": 2, "text": "Animating"}, {"uroven": 2, "text": "Summary"}], "markdown": "3D and CSS \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences.\n \n Paul Kinlan\n Introduction For a long time 3D has been the preserve of desktop applications. Recently with the introduction of advanced smart-phones that have access to native GPU acceleration we have started to see 3D used nearly everywhere. Commonly, 3D is primarily used as a device for gaming or some advanced user interfaces. It wasn't until the introduction of Perspective transforms in WPF and Silverlight that a suitable model for applying 3D effects to user interface elements became a practical solution for application developers (after all 3D isn't exactly easy). The [CSS 3D Transform Model](http://www.w3.org/TR/css3-3d-transforms/) was introduced as a Draft specification in March 2009 to allow web developers to create interesting and compelling user interfaces that take advantage of 3D by allowing application authors to apply 3D perspective transformations to any visual DOM element. The CSS 3D Transformation Working Draft is a logical extension to the [CSS 2D Transformation Model](http://www.w3.org/TR/css3-2d-transforms), introducing some extra properties, including: perspectives, rotations and transforms in a 3D space. Never before have we been able build 3D interfaces so easily. These technologies have lowered the barrier to entry. No longer do you have to be a mathematical whizz to build 3d elements. It must be noted that the CSS 3D module is designed to help developers build rich and visually interesting applications, it is not designed to enable you to build immersive 3d worlds. Browser Support and Hardware Acceleration -webkit-perspective Browser Support \n \n 36\n \n \n \n 12\n \n \n \n 16\n \n \n \n 9\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/perspective) -webkit-transform-3d Browser Support \n \n 2\n \n \n \n 12\n \n \n \n 49\n \n \n \n 4\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/At-rules/@media/-webkit-transform-3d) The important piece of information to remember is that although a browser may \"support\" 3d, it may not be able to render 3D due to hardware and driver limitations.\n3D scenes based on the DOM can be very computationally expensive and therefore browser vendors have decided rather than slow the browsers down with a pure software rendering solution, they instead will take advantage of GPU which might not be available on all platforms Feature Detection What about feature detection? I was hoping that you weren't going to ask!\nDevelopers have been using tools such as Modernizr to detect support for specific browser features and abilities. Whilst it is possible to detect the presence of support for 3D transformations, it is not possible to detect for the presence of hardware acceleration, and hardware acceleration is the key ingredient. Basic Sample There is nothing better than jumping straight in. In this sample we will apply a basic set of rotations of an arbitrary DOM element. We start by defining a perspective on the root element. `
` Perspective is important because it defines how the depth of the 3D scene is rendered, values from 1-1000 will produce a very pronounced effect, and values over 1000 less so.\nWe then add an iframe and apply a 30 degree rotation around the Z and Y axis `` BAM! That is it, the element is fully interactive, and in all respects it is a fully fledged DOM element (except that it now looks even cooler).\nIf your browser doesn't support 3D transformations, nothing will happen. You will just see a simple iframe with no rotation applied. If your browser supports 3d transformations but without hardware acceleration, it might look a little odd. Animating The thing that I love about CSS3 3D transformations is that it ties so beautifully with the CSS Transition module. Animations and transitions are easy to define in CSS, and applying these to 3d is no exception. To animate elements that have a 3D perspective applied is easy. Simply set the \"transition\" style to be \"transform\", attach a duration and an animation function. From then on, any change to the \"tranform\" style will be animated. We have re-factored the previous examples to use document styles, rather than inline styles. Not only does it clear the example up, it allows the sample to take advantage of the `:hover` pseudo selector. By using the `:hover` selector, transitions can be initiated by simply moving the mouse over the element. Awesome! Summary This was just a quick glance over some of the cool effects that can be applied to any visible DOM element using CSS 3D transformations. There are still many things that can be done that have not been covered in this tutorial. Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). For details, see the [Google Developers Site Policies](https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its affiliates. Last updated 2010-09-07 UTC.", "znaku_textu": 5328, "slov": 809, "odkazu": 75, "kodovani": "iso-8859-2", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 02:42:06", "sha256": "6aa29f860a8c1489e01876ec4e4313a6b21ad654fa55119665743dec9aaedf0a", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://pagespeed.web.dev/", "https://twitter.com/paul_kinlan", "https://github.com/PaulKinlan", "https://www.linkedin.com/in/paulkinlan", "https://status.kinlan.me/@paul", "https://bsky.app/profile/paul.kinlan.me", "https://paul.kinlan.me/", "http://www.w3.org/TR/css3-3d-transforms/", "http://www.w3.org/TR/css3-2d-transforms", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/perspective", "https://developer.mozilla.org/docs/Web/CSS/Reference/At-rules/@media/-webkit-transform-3d", "https://creativecommons.org/licenses/by/4.0/", "https://www.apache.org/licenses/LICENSE-2.0", "https://developers.google.com/site-policies", "https://issuetracker.google.com/issues/new?component=1400680&template=1857359", "https://issuetracker.google.com/issues?q=status%3Aopen+componentid%3A1400680&s=created_time%3Adesc", "https://developer.chrome.com/", "https://blog.chromium.org/", "https://twitter.com/ChromiumDev", "https://www.youtube.com/user/ChromeDevelopers", "https://www.linkedin.com/showcase/chrome-for-developers", "https://policies.google.com/terms", "https://policies.google.com/privacy"]} {"url": "https://web.dev/articles/5-css-snippets-every-front-end-developer-should-know-in-2024", "titulek": "5 CSS snippets every front-end developer should know in 2024 | Articles | web.dev", "h1": "5 CSS snippets every front-end developer should know in 2024 \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences.", "popis": "Toolbelt worthy, powerful, and stable CSS you can use today.", "klicova_slova": "", "kanonicka": "https://web.dev/articles/5-css-snippets-every-front-end-developer-should-know-in-2024", "jazyk": "en", "robots_meta": "", "og": {"og:site_name": "web.dev", "og:type": "website", "og:title": "5 CSS snippets every front-end developer should know in 2024  |  Articles  |  web.dev", "og:description": "Toolbelt worthy, powerful, and stable CSS you can use today.", "og:url": "https://web.dev/articles/5-css-snippets-every-front-end-developer-should-know-in-2024", "og:locale": "en"}, "jsonld": [{"@context": "https://schema.org", "@type": "Article", "dateModified": "2024-01-11", "headline": "5 CSS snippets every front-end developer should know in 2024"}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Articles", "item": "https://web.dev/articles"}, {"@type": "ListItem", "position": 2, "name": "5 CSS snippets every front-end developer should know in 2024", "item": "https://web.dev/articles/5-css-snippets-every-front-end-developer-should-know-in-2024"}]}], "drobecky": ["Articles", "5 CSS snippets every front-end developer should know in 2024"], "osnova": [{"uroven": 1, "text": "5 CSS snippets every front-end developer should know in 2024 \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences."}, {"uroven": 2, "text": "CSS:has(.potential-beyond-being-a-parent-selector)"}, {"uroven": 2, "text": "Create a subgrid"}, {"uroven": 2, "text": "Nest the CSS way"}, {"uroven": 2, "text": "Let the browser balance headlines"}, {"uroven": 2, "text": "Use container query units"}], "markdown": "5 CSS snippets every front-end developer should know in 2024 \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences.\n Toolbelt worthy, powerful, and stable CSS you can use today. \n Adam Argyle\n I believe every front-end developer should know `:has()` is more than a \"parent selector\",\nthe how and why of a `subgrid`, how to nest with built-in CSS syntax, how to let the\nbrowser balance headline text wrapping, and how use container query units. This post is a continuation of\n[last year's 6 CSS snippets every front-end developer should know in 2023](/articles/6-css-snippets-every-front-end-developer-should-know-in-2023). CSS:has(.potential-beyond-being-a-parent-selector) `:has()` Browser Support \n \n 105\n \n \n \n 105\n \n \n \n 121\n \n \n \n 15.4\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/:has) `:has()` landed across all major browsers at the end 2023! This new selector seems\nsmall and innocent but you'll be surprised at all the use cases it can unlock:\ngames, reactivity, content aware layout, smart components, and\n[much more that's well explored in this article by Jhey](https://developer.chrome.com/blog/has-m105). Here's a couple examples of using `:has()` as a parent selector. It got this name because\nusually the subject of a selector is at the end, like `ul li`, where `li` is the subject\nand gets the styles. With `:has()`, the element at the beginning of the selector can become\nthe subject. In the following example, the button has a gap if there's an element inside\nwith a class of `.icon`. The card changes orientation if there's an image inside. `button:has(.icon) { gap: 1ch; } .card:has(img) { grid-auto-flow: row; }` A long desired selector is to change a layout based on how many items it has. This is now possible\nwith `:has()` because it can keep the container as the subject while querying the number of children. `main:has(> :nth-child(5)) {…}` Another higher level example, change styles set on the entire document\nwhen a specific checkbox on the page is enabled: `html:has(#dark-mode:checked) {…}` These are simple use cases that don't change the subject of the selector, if you just look at examples\nlike this, you might think `:has()` is limited to being a parent selector. Consider the following\nexamples though. These check for something based on a common ancestor, then pivot the selector\nsubject to a child somewhere deeper in the page. This one shows a form error element if any of its inputs are invalid: `form:has(:user-invalid) .error { display: block; }` This one slides out the main content area when a sidenav has a class of `.--is-open`: `html:has(#sidenav.--is-open) main { translate: -320px; }` Here's a fun demo that uses `:has()` as a parent selector, `:has()` with quantity queries,\nand container queries to make a grid layout that's capable of elegantly displaying\n1-12 elements in portrait or landscape orientations: [Try on Codepen](https://codepen.io/web-dot-dev/pen/wvOzRPM) Create a subgrid `subgrid` Browser Support \n \n 117\n \n \n \n 117\n \n \n \n 71\n \n \n \n 16\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Guides/Grid_layout/Subgrid) For many years the front-end web community asked for subgrid to help round out and finish\nthe massively popular and powerful CSS grid layout engine.\nIt's now available in all three major engines. [Learn more about subgrid here](/articles/css-subgrid), if you'd like an overview. `body { display: grid; grid-template-columns: repeat(auto-fill, minmax(30ch, 1fr)); > article { display: grid; grid-row: span 4; grid-template-rows: subgrid; } }` Nest the CSS way `nesting` Browser Support \n \n 120\n \n \n \n 120\n \n \n \n 117\n \n \n \n 17.2\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/Nesting_selector) Built-in CSS nesting became available in all major browsers in 2023.\nI even updated my website to remove the build process that compiled nesting away, and now I ship\na smaller stylesheet! Yep, stylesheets with nesting are smaller and all\nthe browser devtools are ready to represent it. You can find an overview of the [CSS nesting syntax here](https://developer.chrome.com/docs/css-ui/css-nesting),\nfor all the details. The following code example shows a syntax example. `.you { .can-totally-ship-this { &.if-you-wanted { /* it's VERY MUCH like SCSS */ &:is(:hover, :focus-visible) { /* put a bird on it */ } } } } .for-theming { @media (prefers-color-scheme: dark) { /* you can nest media queries */ } } /* or for theming with [data-theme=\"dark\"] */ .button { background: black; color: white; /* nest and do more than just append, flip it and reverse it */ [data-theme=\"dark\"] & { background: white; color: black; } }` Let the browser balance headlines `balance` Browser Support \n \n 114\n \n \n \n 114\n \n \n \n 121\n \n \n \n 17.5\n \n `pretty` Browser Support \n \n 117\n \n \n \n 117\n \n \n \n x\n \n \n \n 26\n \n Without `text-wrap: balance`, developers and copy writers are left to line break hints\nsuch as`` elements or `­`. It's mostly a losing battle because as soon as the\ncontent is translated, zoomed or modified in any way, there's no guarantee that those\nwrapping hints will be in the right place for the new presentation of the content. With balanced text wrapping, you can leave this work to the browser.\nYou can see a comparison in the following Codepen. Use container query units `cqw` Browser Support \n \n 105\n \n \n \n 105\n \n \n \n 110\n \n \n \n 16\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/container-type) Last year's post suggested that every front-end developer should know how to write a\ncontainer query. If you've not yet learned, make 2024 the year to take the plunge,\nand check out container query units too. As an overview,\n[Ahmad Shadeed wrote a great article about container query units](https://ishadeed.com/article/container-query-units/) in 2021. There are six new **c**ontainer **q**uery units: An inline variant `cqi`. A width variant `cqw`. A block variant `cqb`. A height variant `cqh`. A variant for whichever length is smaller `cqmin`. A variant for whichever length is larger `cqmax`. Consider a scenario for relative and intrinsic animations to a container.\nA child element that slides out entirely from its container by\nusing 100cqi—that's 100% of the container inline size. `@keyframes slide-out-of-container { to { translate: -100cqi; } }` Here's a card with container responsive typography, and an image that adapts to\nthe orientation of the container, becoming half the size if the orientation is landscape. `.card { :is(h2,h3) { font-size: clamp(1.5rem, 5cqi, 4rem); } img { inline-size: 100cqi; @container (orientation: landscape) { inline-size: 50cqi; } } }` If these units are new to you it's probably a good idea to\n[review all the units available to you in 2024](https://nerdy.dev/new-relative-units-ric-rex-rlh-and-rch). Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). For details, see the [Google Developers Site Policies](https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its affiliates. Last updated 2024-01-11 UTC.", "znaku_textu": 7247, "slov": 1129, "odkazu": 79, "kodovani": "iso-8859-2", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-14 03:31:48", "sha256": "e18418ff586934dc3f7a5beba597684b09cd87b9d6a0f1887dc3cd48c4e4ea66", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://pagespeed.web.dev/", "https://twitter.com/argyleink", "https://github.com/argyleink", "https://nerdy.dev/", "https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/:has", "https://developer.chrome.com/blog/has-m105", "https://codepen.io/web-dot-dev/pen/wvOzRPM", "https://developer.mozilla.org/docs/Web/CSS/Guides/Grid_layout/Subgrid", "https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/Nesting_selector", "https://developer.chrome.com/docs/css-ui/css-nesting", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/container-type", "https://ishadeed.com/article/container-query-units/", "https://nerdy.dev/new-relative-units-ric-rex-rlh-and-rch", "https://creativecommons.org/licenses/by/4.0/", "https://www.apache.org/licenses/LICENSE-2.0", "https://developers.google.com/site-policies", "https://issuetracker.google.com/issues/new?component=1400680&template=1857359", "https://issuetracker.google.com/issues?q=status%3Aopen+componentid%3A1400680&s=created_time%3Adesc", "https://developer.chrome.com/", "https://blog.chromium.org/", "https://twitter.com/ChromiumDev", "https://www.youtube.com/user/ChromeDevelopers", "https://www.linkedin.com/showcase/chrome-for-developers", "https://policies.google.com/terms", "https://policies.google.com/privacy"]} {"url": "https://web.dev/articles/6-css-snippets-every-front-end-developer-should-know-in-2023", "titulek": "6 CSS snippets every front-end developer should know in 2023 | Articles | web.dev", "h1": "6 CSS snippets every front-end developer should know in 2023 \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences.", "popis": "Toolbelt worthy, powerful, and stable CSS you can use today.", "klicova_slova": "", "kanonicka": "https://web.dev/articles/6-css-snippets-every-front-end-developer-should-know-in-2023", "jazyk": "en", "robots_meta": "", "og": {"og:site_name": "web.dev", "og:type": "website", "og:title": "6 CSS snippets every front-end developer should know in 2023  |  Articles  |  web.dev", "og:description": "Toolbelt worthy, powerful, and stable CSS you can use today.", "og:url": "https://web.dev/articles/6-css-snippets-every-front-end-developer-should-know-in-2023", "og:locale": "en"}, "jsonld": [{"@context": "https://schema.org", "@type": "Article", "dateModified": "2023-03-15", "headline": "6 CSS snippets every front-end developer should know in 2023"}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Articles", "item": "https://web.dev/articles"}, {"@type": "ListItem", "position": 2, "name": "6 CSS snippets every front-end developer should know in 2023", "item": "https://web.dev/articles/6-css-snippets-every-front-end-developer-should-know-in-2023"}]}], "drobecky": ["Articles", "6 CSS snippets every front-end developer should know in 2023"], "osnova": [{"uroven": 1, "text": "6 CSS snippets every front-end developer should know in 2023 \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences."}, {"uroven": 2, "text": "1. A container query"}, {"uroven": 2, "text": "2. Scroll snap"}, {"uroven": 2, "text": "3. Grid pile"}, {"uroven": 2, "text": "4. Quick circle"}, {"uroven": 2, "text": "5. Control variants with @layer"}, {"uroven": 2, "text": "6. Memorize less and reach more with logical properties"}], "markdown": "6 CSS snippets every front-end developer should know in 2023 \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences.\n Toolbelt worthy, powerful, and stable CSS you can use today. \n Adam Argyle\n I believe every front-end developer should know how to use [container\nqueries](https://developer.mozilla.org/docs/Web/CSS/CSS_Container_Queries),\ncreate a [scroll snap](https://codepen.io/collection/KpqBGW) experience, avoid\n`position: absolute` with\n[grid](https://developer.mozilla.org/docs/Web/CSS/CSS_Grid_Layout),\nswiftly hammer out a circle, use [cascade\nlayers](https://developer.mozilla.org/docs/Learn/CSS/Building_blocks/Cascade_layers),\nand reach more with less via [logical\nproperties](/learn/css/logical-properties). Here's a quick\noverview of each of those expectations. 1. A container query The top requested CSS feature for 10 years straight, is [now\nstable](/blog/cq-stable) across browsers and available for you to use\nfor width queries in 2023. `.panel { container: layers-panel / inline-size; } .card { padding: 1rem; } @container layers-panel (min-width: 20rem) { .card { padding: 2rem; } }` `@container` Browser Support \n \n 105\n \n \n \n 105\n \n \n \n 110\n \n \n \n 16\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/At-rules/@container) `container` Browser Support \n \n 105\n \n \n \n 105\n \n \n \n 110\n \n \n \n 16\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/container) 2. Scroll snap Well orchestrated scroll experiences set your experience apart from the rest,\nand [scroll\nsnap](https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type) is the\nperfect way to match system scroll UX while providing meaningful stopping\npoints. `.snaps { overflow-x: scroll; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; } .snap-target { scroll-snap-align: center; } .snap-force-stop { scroll-snap-stop: always; }` Learn more about the potential of this CSS feature in this [huge and inspiring\nCodepen collection](https://codepen.io/collection/KpqBGW) of around 25 demos. `scroll-snap-type` Browser Support \n \n 69\n \n \n \n 79\n \n \n \n 99\n \n \n \n 11\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/scroll-snap-type) `scroll-snap-align` Browser Support \n \n 69\n \n \n \n 79\n \n \n \n 68\n \n \n \n 11\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/scroll-snap-align) `scroll-snap-stop` Browser Support \n \n 75\n \n \n \n 79\n \n \n \n 103\n \n \n \n 15\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/scroll-snap-stop) `overscroll-behavior` Browser Support \n \n 144\n \n \n \n 18\n \n \n \n 150\n \n \n \n 16\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/overscroll-behavior) 3. Grid pile Avoid position absolute with a single cell CSS grid. Once they're [piled on top\nof each other](/shows/gui-challenges/m4DKhRJeYx4), use justify\nand align properties to position them. `.pile { display: grid; place-content: center; } .pile > * { grid-area: 1/1; }` `grid` Browser Support \n \n 57\n \n \n \n 16\n \n \n \n 52\n \n \n \n 10.1\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/grid) 4. Quick circle There are lots of ways to make circles in CSS, but this is definitely the most\nminimal. .circle { inline-size: 25ch; aspect-ratio: 1; border-radius: 50%; } `aspect-ratio` Browser Support \n \n 88\n \n \n \n 88\n \n \n \n 89\n \n \n \n 15\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/aspect-ratio) 5. Control variants with @layer [Cascade\nlayers](https://developer.mozilla.org/docs/Learn/CSS/Building_blocks/Cascade_layers)\ncan [help insert variants](https://nerdy.dev/cascade-layer-async-overrides)\ndiscovered or created later, into the right place in the cascade with the\noriginal set of variants. /* file buttons.css */ @layer components.buttons { .btn.primary { … } } Then, in some entirely different file, loaded at some other random time, append\na new variant to the button layer as if it was there with the rest of them this\nwhole time. /* file video-player.css */ @layer components.buttons { .btn.player-icon { … } } `@layer` Browser Support \n \n 99\n \n \n \n 99\n \n \n \n 97\n \n \n \n 15.4\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/At-rules/@layer) 6. Memorize less and reach more with logical properties Memorize this [one new box model](/learn/css/logical-properties)\nand [never have to worry](https://css-tricks.com/late-to-logical/) about\nchanging left and right padding or margin for international [writing\nmodes](https://developer.mozilla.org/docs/Web/CSS/writing-mode) and\n[document\ndirections](https://developer.mozilla.org/docs/Web/CSS/direction) again.\nAdjust your styles from physical properties to logical ones like\n[`padding-inline`](https://developer.mozilla.org/docs/Web/CSS/padding-inline),\n[`margin-inline`](https://developer.mozilla.org/docs/Web/CSS/margin-inline),\n[`inset-inline`](https://developer.mozilla.org/docs/Web/CSS/inset-inline),\nand now the browser will do the adjusting work. button { padding-inline: 2ch; padding-block: 1ch; } article > p { text-align: start; margin-block: 2ch; } .something::before { inset-inline: auto 0; } `padding-inline` Browser Support \n \n 87\n \n \n \n 87\n \n \n \n 66\n \n \n \n 14.1\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/padding-inline) `margin-block` Browser Support \n \n 87\n \n \n \n 87\n \n \n \n 66\n \n \n \n 14.1\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/margin-block) `inset-inline` Browser Support \n \n 87\n \n \n \n 87\n \n \n \n 63\n \n \n \n 14.1\n \n [Source](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/inset-inline) Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). For details, see the [Google Developers Site Policies](https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its affiliates. Last updated 2023-03-15 UTC.", "znaku_textu": 6078, "slov": 666, "odkazu": 95, "kodovani": "iso-8859-2", "kodovani_deklarovane": "utf-8", "format": "html", "duplikat_z": "", "http": 200, "odkud": "live", "wb_ts": "", "stazeno": "2026-09-13 23:11:35", "sha256": "1e2546208e996358c538038cf216374d7b66d3f60e92a869b4f86d470e1bd0f8", "hloubka": 1, "zdroj_objevu": "sitemap", "ze_seznamu": false, "mime": "text/html", "odkazy_externi": ["https://pagespeed.web.dev/", "https://twitter.com/argyleink", "https://github.com/argyleink", "https://nerdy.dev/", "https://developer.mozilla.org/docs/Web/CSS/CSS_Container_Queries", "https://codepen.io/collection/KpqBGW", "https://developer.mozilla.org/docs/Web/CSS/CSS_Grid_Layout", "https://developer.mozilla.org/docs/Learn/CSS/Building_blocks/Cascade_layers", "https://developer.mozilla.org/docs/Web/CSS/Reference/At-rules/@container", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/container", "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/scroll-snap-type", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/scroll-snap-align", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/scroll-snap-stop", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/overscroll-behavior", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/grid", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/aspect-ratio", "https://nerdy.dev/cascade-layer-async-overrides", "https://developer.mozilla.org/docs/Web/CSS/Reference/At-rules/@layer", "https://css-tricks.com/late-to-logical/", "https://developer.mozilla.org/docs/Web/CSS/writing-mode", "https://developer.mozilla.org/docs/Web/CSS/direction", "https://developer.mozilla.org/docs/Web/CSS/padding-inline", "https://developer.mozilla.org/docs/Web/CSS/margin-inline", "https://developer.mozilla.org/docs/Web/CSS/inset-inline", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/padding-inline", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/margin-block", "https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/inset-inline", "https://creativecommons.org/licenses/by/4.0/", "https://www.apache.org/licenses/LICENSE-2.0", "https://developers.google.com/site-policies", "https://issuetracker.google.com/issues/new?component=1400680&template=1857359", "https://issuetracker.google.com/issues?q=status%3Aopen+componentid%3A1400680&s=created_time%3Adesc", "https://developer.chrome.com/", "https://blog.chromium.org/", "https://twitter.com/ChromiumDev", "https://www.youtube.com/user/ChromeDevelopers", "https://www.linkedin.com/showcase/chrome-for-developers", "https://policies.google.com/terms", "https://policies.google.com/privacy"]} {"url": "https://web.dev/articles/a11y-for-teams", "titulek": "Accessibility for teams | Articles | web.dev", "h1": "Accessibility for teams \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences.", "popis": "How to incorporate accessibility into your team's process.", "klicova_slova": "", "kanonicka": "https://web.dev/articles/a11y-for-teams", "jazyk": "en", "robots_meta": "", "og": {"og:site_name": "web.dev", "og:type": "website", "og:title": "Accessibility for teams  |  Articles  |  web.dev", "og:description": "How to incorporate accessibility into your team's process.", "og:url": "https://web.dev/articles/a11y-for-teams", "og:locale": "en"}, "jsonld": [{"@context": "https://schema.org", "@type": "Article", "dateModified": "2017-08-01", "headline": "Accessibility for teams"}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Articles", "item": "https://web.dev/articles"}, {"@type": "ListItem", "position": 2, "name": "Accessibility for teams", "item": "https://web.dev/articles/a11y-for-teams"}]}], "drobecky": ["Articles", "Accessibility for teams"], "osnova": [{"uroven": 1, "text": "Accessibility for teams \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences."}, {"uroven": 2, "text": "Project manager"}, {"uroven": 3, "text": "Accessibility training"}, {"uroven": 3, "text": "Identifying critical user journeys"}, {"uroven": 3, "text": "Incorporating an accessibility checklist"}, {"uroven": 3, "text": "Evaluating with user studies"}, {"uroven": 2, "text": "UX designer"}, {"uroven": 3, "text": "Content has good color contrast"}, {"uroven": 3, "text": "Tab order is defined"}, {"uroven": 3, "text": "Controls have accessible labels"}, {"uroven": 3, "text": "Multiple ways to interact with and understand UI"}, {"uroven": 2, "text": "Developer"}, {"uroven": 3, "text": "Logical tab order"}, {"uroven": 3, "text": "Managing focus"}, {"uroven": 3, "text": "Keyboard support for interactive elements"}, {"uroven": 3, "text": "ARIA roles and attributes are applied as needed"}, {"uroven": 3, "text": "Labeling elements"}, {"uroven": 3, "text": "Automated testing"}, {"uroven": 2, "text": "Conclusion"}], "markdown": "Accessibility for teams \n \n Stay organized with collections\n \n \n Save and categorize content based on your preferences.\n How to incorporate accessibility into your team's process. \n Rob Dodson\n Making your site more accessible can be a daunting task. If you are approaching\naccessibility for the first time, the sheer breadth of the topic can leave you\nwondering where to start. After all, working to accommodate a diverse range of\nabilities means there are a correspondingly diverse range of issues to consider. Remember, accessibility is a team effort. Every person has a role to play. This\narticle outlines criteria for each of the major disciplines (project manager, UX\ndesigner, and developer) so that they can work to incorporate accessibility best\npractices into their process. Project manager An overriding goal for any project manager is to try to include accessibility\nwork in every milestone; making sure it’s just as much a priority as other\ntopics like performance, and user experience. Below are a few checklist items to\nkeep in mind when working through your process. Make accessibility training available to the team. Identify critical user journeys in the site or application. Try to incorporate an accessibility checklist into the team process. Where possible, evaluate the site or application with user studies. Accessibility training There are a number of great free resources for learning about web accessibility.\nSetting aside time for your team to study the topic can make it easier to\ninclude accessibility early in the process. Some resources provided by Google include: [Web Accessibility by Google](https://bit.ly/web-a11y) — a multi-week interactive\ntraining course. [Accessibility Fundamentals](https://bit.ly/a11y-fundamentals) — written\naccessibility guides and best practices. [Material Guidelines: Accessibility](https://bit.ly/a11y-material) — a set of\nUX best practices for inclusive design. Identifying critical user journeys Every application has some primary action that the user needs to take. For\nexample, if you're building an e-commerce app, then every user will need to be\nable to add an item to their shopping cart. Some actions may be of secondary importance, and perhaps only performed\noccasionally. For example, changing your avatar photo is a nice feature, but\nmay not be critical for every experience. Identifying the primary and secondary actions in your application will help you\nprioritize the accessibility work ahead. Later, you can combine these actions\nwith an accessibility checklist to keep track of your progress and avoid\nregressions. Incorporating an accessibility checklist The topic of accessibility is quite broad, so having a checklist of\nimportant areas to consider can help you make sure you're covering all of your\nbases. There are a number of accessibility checklists out there, a few industry\nexamples include: [WebAIM WCAG Checklist](https://webaim.org/standards/wcag/checklist) [Vox Accessibility Guidelines](https://accessibility.voxmedia.com) With a checklist in hand, you can look over your primary and secondary actions\nto start to triage what work still needs to be done. You can get pretty tactical\nabout this process and even build a matrix of primary and secondary actions and\ndetermine for each step in those processes, whether there are any missing\naccessibility bits. Evaluating with user studies Nothing beats sitting down with actual users and observing them as they try to\nuse your app. If you're retrofitting accessibility into an existing experience,\nthis process can help you quickly identify areas that need improvement. And if\nyou're starting a new project, early user studies can help you\navoid spending too much time developing a feature that is difficult to use. Aim to incorporate feedback from as diverse of a user population as possible.\nConsider users who primarily navigate with the keyboard, or rely on assistive\ntechnology like screen readers or screen magnifiers. UX designer Because people tend to design using their own biases, if you don't have a\ndisability and don't have colleagues with disabilities, you might be\nunintentionally designing for only some of your users. As you work, ask yourself\n\"what are all the types of users who might rely on this design?\" Here are some\ntechniques you can try to make your process more inclusive. Content has sufficient color contrast. The tab order is defined. Controls have accessible labels. There are multiple ways to interact with the UI. Content has good color contrast The primary goal of most sites is to convey some information to the user, either\nthrough written text or images. However, if this content is low contrast, it may\nbe difficult for some users (particularly those with a vision impairment) to\nread. This may negatively affect their user experience. To address\nthis concern, aim for all text and images to have sufficient color contrast. Contrast is measured by comparing the luminance of a foreground and background\ncolor. For smaller text (anything below 18pt or 14pt bold) a minimum ratio of\n4.5:1 is recommended. For larger text, this ratio can be adjusted to 3:1. In the image below, the text on the left hand side meets these contrast\nminimums, whereas the text on right hand side is low contrast. There are a number of tools for measuring color contrast, such as Google’s [Material\nColor Tool](https://material.io/color), [Lea Verou's Contrast Ratio\napp](https://leaverou.github.io/contrast-ratio), and Deque’s\n[aXe](https://chrome.google.com/webstore/detail/axe/lhdoppojpmngadmnindnejefpokejbdd). Tab order is defined The tab order is the order in which elements receive focus as the user\npresses the tab key. For users who navigate primarily with a keyboard, the\ntab key is their primary means of reaching everything on screen. Think of it\nlike their mouse cursor. Ideally the tab order should follow the reading order and flow from the top of\nthe page to the bottom, with more important items appearing higher up in the\norder. This makes it more efficient for anyone using a keyboard to quickly reach\nthese items. The mock interface above is numbered to show the tab order. Creating a mock like\nthis can help by identifying the intended tab order. This can then be shared\nwith the developers and QA testers to make sure it is properly implemented and\ntested. Controls have accessible labels For users of assistive technology like screen readers, labels provide\ninformation that would otherwise be visual only. For example a search button\nthat's just a magnifying glass icon can have an accessible label of \"Search\" to\nhelp fill in the missing visual affordance. Here are a few simple suggestions to follow when designing accessible labels: Be succinct - It can be tedious to listen to long descriptions. Try not to include control type or state - If the control is coded properly\nthen a screen reader will announce this automatically. Focus on action verbs - Use \"search\" not \"magnifying glass\". You might consider creating a mock with all of your controls labeled. This can\nbe shared with your development team and QA team for implementation and testing. Multiple ways to interact with and understand UI It's easy to assume that all users interact with the\npage primarily using a mouse. When designing, consider how someone will\ninteract with a control using a keyboard instead. Plan your focus states! This means determining what a control will look like\nwhen the user focuses it with tab or presses the arrow keys. It's useful to have\nthese states planned early, rather than trying to shoehorn them into the design\nlater. Finally, for any point of interaction, you want to make sure that the user has\nmultiple ways of understanding the content. Try not to use color alone to convey\ninformation, as these subtle cues may be missed by a user with a color vision\ndeficiency. A classic example is an invalid text field. Instead of just a red\nunderline to signify a problem, also consider adding some helper text. That\nway you're covering more bases and increasing the likelihood that a user will\nnotice the issue. Developer The developer's role is where focus management and semantics combine to form a\nrobust user experience. Below are a few items a developers can keep in mind as\nthey're working on their site or application: The tab order is logical. Focus is properly managed and visible. Interactive elements have keyboard support. ARIA roles and attributes are applied as needed. Elements are properly labeled. Testing is automated. Logical tab order Native elements like `input`, `button`, and `select` get opted into the tab\norder for free and are automatically focusable with the keyboard. But not all\nelements receive this same behavior! In particular, generic elements like `div`,\nand `span`, are not opted into the tab order. This means if you use a `div` to\ncreate an interactive control, you'll need to do additional work to make\nit keyboard accessible. Two options are: Give the control a `tabindex=\"0\"`. This will at least make it focusable,\nthough you'll likely need to do additional work to add support for keypresses. Where possible, consider using a `button` instead of a `div` or `span` for any\nbutton-like control. The native `button` element is very easy to style and gets\nkeyboard support for free. Managing focus When you change the content of the page, it's important to direct the user's\nattention by moving focus. A classic example of when this technique is useful is\nwhen opening a modal dialog. If a user relying on a keyboard presses a button to\nopen a dialog and their focus *is not* moved into the dialog element, then their\nonly course of action is to tab through the entire site until they eventually\nfind the new control. By moving focus into the new content as soon as it\nappears, you can improve the efficiency of these users’ experiences. Keyboard support for interactive elements If you're building a custom control like a carousel or dropdown, then you'll\nneed to do some additional work to add keyboard support. The [ARIA Authoring\nPractices Guide](https://w3.org/TR/wai-aria-practices-1.1) is a useful resource\nwhich identifies various UI patterns and the kinds of keyboard actions they are\nexpected to support. To learn more about adding keyboard support to an element, take a look at the\n[roving tabindex](/articles/control-focus-with-tabindex#create_accessible_components_with_roving_tabindex)\nsection in Google’s Accessibility Fundamentals docs. ARIA roles and attributes are applied as needed Not only do custom controls need proper keyboard support, they also need proper\nsemantics. After all, a `div`, semantically, is just a generic grouping\ncontainer. If you're using a `div` as the basis for your dropdown menu, you'll\nneed to rely on\n[ARIA](/articles/semantics-aria)\nto layer in additional semantics so the control type can be conveyed to\nassistive technology. Here again the\n[ARIA Authoring Practices Guide](https://w3.org/TR/wai-aria-practices-1.1)\ncan help by identifying which roles, states, and properties you should be using.\nAs an added bonus, many of the explanations in the ARIA guide also come with\nsample code! Labeling elements For labeling native inputs, you can use the built-in\n[`