<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ismael Ramos 🚀</title>
    <description>The latest articles on DEV Community by Ismael Ramos 🚀 (@ismaestro).</description>
    <link>https://dev.to/ismaestro</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F237719%2F3ba1f2d8-7020-427d-a960-666de47b5050.jpg</url>
      <title>DEV Community: Ismael Ramos 🚀</title>
      <link>https://dev.to/ismaestro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ismaestro"/>
    <language>en</language>
    <item>
      <title>Angular 2025 Guide – Part 2: Project Structure with the Features Approach</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Tue, 15 Apr 2025 13:00:00 +0000</pubDate>
      <link>https://dev.to/ismaestro/angular-2025-guide-part-2-project-structure-with-the-features-approach-4f26</link>
      <guid>https://dev.to/ismaestro/angular-2025-guide-part-2-project-structure-with-the-features-approach-4f26</guid>
      <description>&lt;p&gt;Welcome to the second entry in the Angular 2025 Guide! In &lt;a href="https://dev.to/this-is-learning/angular-2025-guide-mastering-standalone-components-1p4l"&gt;Part 1&lt;/a&gt;, we explored how to master &lt;strong&gt;standalone components&lt;/strong&gt;, the backbone of modern Angular development. Now that you know how to build in a modular, component-first way, it’s time to look at the big picture: &lt;strong&gt;how to structure your entire project&lt;/strong&gt; to support this new paradigm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spoiler:&lt;/strong&gt; if you’re still organizing your app by modules or by type (components here, services there)... yeah, it’s time for an intervention.&lt;/p&gt;

&lt;p&gt;We’ll cover smart folder architecture with real examples from the base project repo (&lt;a href="https://github.com/Ismaestro/angular-example-app" rel="noopener noreferrer"&gt;angular-example-app&lt;/a&gt;), that will guide this series.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4m79gc8fazt0sl8dklf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4m79gc8fazt0sl8dklf.png" alt="board and a hand organizing items" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Organizing by feature — the core idea
&lt;/h2&gt;

&lt;p&gt;In a features-first structure, your app is split by capabilities, not by type. A feature contains its own UI, logic, routes, and maybe even state.&lt;/p&gt;

&lt;p&gt;Here’s a simplified snapshot:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
└── app/
    └── features/
        ├── authentication/
        │   ├── pages/
        │   │   ├── log-in
        │   │   ├── register
        │   │   └── my-account
        │   ├── services
        │   ├── types
        │   └── authentication.routes.ts
        ├── home/
        │   ├── home.component.html
        │   ├── home.component.scss
        │   └── home.component.ts
        └── pokemon/
            ├── components/
            │   ├── catch-animation
            │   ├── pokedex
            │   ├── pokemon-battlefield
            │   ├── pokemon-card
            │   ├── pokemon-image
            │   └── pokemon-search-input
            ├── pages/
            │   ├── my-pokemon
            │   └── pokemon-detail
            ├── services
            ├── types
            └── pokemon.routes.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Real example: see &lt;a href="https://github.com/Ismaestro/angular-example-app/tree/d83da7bfa0faca2d7e2d3676bfa1ea65332ffd3c/src/app/features" rel="noopener noreferrer"&gt;src/app/features&lt;/a&gt; in the Angular Example App.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Why this works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each feature is self-contained.&lt;/li&gt;
&lt;li&gt;Teams can work independently on features.&lt;/li&gt;
&lt;li&gt;Easier to refactor, lazy-load, or even remove.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  No more shared/ — use core/ instead
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnfotflril5pzgjugzel.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnfotflril5pzgjugzel.png" alt="shared module meme" width="571" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The old shared/ folder was a magnet for chaos. Sometimes you'd even dump everything there “just in case” it might be reused. It became the &lt;strong&gt;graveyard&lt;/strong&gt; of your architecture.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
└── core/
    ├── components
    ├── constants
    ├── directives
    ├── enums
    ├── guards
    ├── interceptors
    ├── pipes
    ├── providers
    ├── services
    ├── tokens
    ├── types
    └── validators
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You'll find this setup under &lt;a href="https://github.com/Ismaestro/angular-example-app/tree/d83da7bfa0faca2d7e2d3676bfa1ea65332ffd3c/src/app/core" rel="noopener noreferrer"&gt;src/app/core&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Everything there should be &lt;strong&gt;agnostic&lt;/strong&gt; and &lt;strong&gt;not related to any concrete feature&lt;/strong&gt;. In this architecture, if you find some functionality &lt;strong&gt;reused&lt;/strong&gt; in multiple places, &lt;strong&gt;make it a feature&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You treat reused logic like a first-class citizen, not an afterthought in a utils.ts.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ Standalone + route-based loading = faster apps
&lt;/h2&gt;

&lt;p&gt;Angular 17+ is built for this. With standalone components and route-level providers, your features load quickly and stay isolated.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;appRoutes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ROOT_PATHS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;home&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;HomeComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AUTHENTICATION_PATHS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;loadChildren&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./features/authentication/authentication.routes&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;module_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;module_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AUTHENTICATION_ROUTES&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ROOT_PATHS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myPokemon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;MyPokemonComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;canActivate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;authenticationGuard&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;POKEMON_PATHS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;loadChildren&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./features/pokemon/pokemon.routes&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;module_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;module_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;POKEMON_ROUTES&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;404&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Error404Component&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;**&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;redirectTo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;404&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need for a HomeModule&lt;/li&gt;
&lt;li&gt;Smaller bundles on load&lt;/li&gt;
&lt;li&gt;No leaking providers globally&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Example: See how &lt;a href="https://github.com/Ismaestro/angular-example-app/blob/d83da7bfa0faca2d7e2d3676bfa1ea65332ffd3c/src/app/app.routes.ts" rel="noopener noreferrer"&gt;app.routes.ts&lt;/a&gt; are used.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Summary — Feature First All the Way
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Feature-based structure is the default in 2025. Modules are optional.&lt;/li&gt;
&lt;li&gt;The core/ folder replaces shared/, organized by responsibility.&lt;/li&gt;
&lt;li&gt;Everything reused = a feature — give it its folder and routes if needed.&lt;/li&gt;
&lt;li&gt;Standalone + feature providers = better performance and clean DI.&lt;/li&gt;
&lt;li&gt;Avoid libs/ or mega service folders. Keep it flat, clear, and focused.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ✅ What’s Next: The Signal Way - Modern State and Data Flow
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0i68ahx2lud275np3cw2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0i68ahx2lud275np3cw2.png" alt="angular signals" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Up next in the series&lt;/strong&gt;: we’ll dive into Signals, httpResource, and local state management.&lt;/p&gt;

&lt;p&gt;Have questions or want to see a specific example? Drop an issue in the repo or reach out!&lt;/p&gt;

&lt;p&gt;I hope you’ve learned something new from all of this. If you think this might help others, please hit the like button so more people can find it. ❤️&lt;/p&gt;

&lt;p&gt;Got thoughts or questions? Drop a comment — I'd love to respond!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Angular 2025 Guide: Mastering Standalone Components</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Mon, 14 Apr 2025 13:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/angular-2025-guide-mastering-standalone-components-1p4l</link>
      <guid>https://dev.to/playfulprogramming/angular-2025-guide-mastering-standalone-components-1p4l</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to the series
&lt;/h2&gt;

&lt;p&gt;If you learned Angular back in the Angular 2–14 days, you’re not alone — and you're definitely not outdated. The framework has evolved quickly: standalone components, signals, zoneless change detection... sometimes it feels like a whole new Angular.&lt;/p&gt;

&lt;p&gt;But you don’t need to start from scratch.&lt;/p&gt;

&lt;p&gt;This series is here to help you catch up step by step, with real examples and no overwhelm. Whether you’re returning to Angular or diving in for the first time, you’ll learn how to level up with modern patterns, like local state management with signals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Learning with real examples
&lt;/h3&gt;

&lt;p&gt;We’ll be using &lt;a href="https://github.com/Ismaestro/angular-example-app" rel="noopener noreferrer"&gt;angular-example-app&lt;/a&gt; as the base project for every post. This app showcases best practices, up-to-date features, and a structure ideal for beginners to learn from and professionals to build on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxdvhmscrqqzpj14uiunu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxdvhmscrqqzpj14uiunu.png" alt="new angular logo for 2025"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Getting Started with Standalone Components in Angular
&lt;/h2&gt;

&lt;p&gt;When you first start learning Angular, one of the biggest hurdles is understanding NgModules — how to declare them, import them, and keep everything in sync. But with the introduction of Standalone Components, Angular makes things much simpler, especially for beginners.&lt;/p&gt;

&lt;p&gt;In this post, we’ll break down what standalone components are, how they work, and how they compare to NgModules.&lt;/p&gt;




&lt;h2&gt;
  
  
  What are Standalone Components?
&lt;/h2&gt;

&lt;p&gt;Standalone components were introduced in Angular 14 to reduce the need for NgModules. A standalone component can import everything it needs on its own, making your Angular apps more modular and easier to understand.&lt;/p&gt;

&lt;p&gt;In short:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You &lt;strong&gt;don’t need&lt;/strong&gt; to declare it in any module.&lt;/li&gt;
&lt;li&gt;It handles its &lt;strong&gt;imports&lt;/strong&gt; (like CommonModule, RouterModule, etc.).&lt;/li&gt;
&lt;li&gt;You can use it directly in &lt;strong&gt;routes&lt;/strong&gt; or other &lt;strong&gt;standalone&lt;/strong&gt; components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhnwgtc3orkd0c7nrnkfs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhnwgtc3orkd0c7nrnkfs.png" alt="standalone components meme"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Old Way: With NgModules
&lt;/h2&gt;

&lt;p&gt;Traditionally, you’d need a module like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// old-school.component.ts&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-old-school&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./old-school.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OldSchoolComponent&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

&lt;span class="c1"&gt;// old-school.module.ts&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;NgModule&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;declarations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;OldSchoolComponent&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;CommonModule&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OldSchoolModule&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach works fine, but it creates &lt;strong&gt;extra files&lt;/strong&gt; and &lt;strong&gt;boilerplate&lt;/strong&gt;, especially for small or isolated components.&lt;/p&gt;




&lt;h2&gt;
  
  
  The New Way: Standalone Components
&lt;/h2&gt;

&lt;p&gt;Now check out how the HomeComponent is defined:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// home.component.ts&lt;/span&gt;
&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-home&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;standalone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;CommonModule&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./home.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HomeComponent&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🧪 You can see this in action in the angular-example-app:&lt;br&gt;
&lt;a href="https://github.com/Ismaestro/angular-example-app/blob/d83da7bfa0faca2d7e2d3676bfa1ea65332ffd3c/src/app/features/home/home.component.ts#L14" rel="noopener noreferrer"&gt;src/app/pages/home/home.component.ts&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  How Routing Works with Standalone Components
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyrhfsbmwyug9q40o5k4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyrhfsbmwyug9q40o5k4f.png" alt="angular routing signal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of loading a module in the router, you just point to the standalone component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app.routes.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Routes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;loadComponent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./pages/home/home.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HomeComponent&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You’ll find this setup under &lt;a href="https://github.com/Ismaestro/angular-example-app/blob/d83da7bfa0faca2d7e2d3676bfa1ea65332ffd3c/src/app/app.routes.ts#L14" rel="noopener noreferrer"&gt;src/app/app.routes.ts&lt;/a&gt;.&lt;br&gt;
It’s simple, direct, and doesn’t need lazy-loaded modules anymore.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  New app config
&lt;/h3&gt;

&lt;p&gt;One of the coolest parts of using standalone components is how cleanly you can configure your whole app without AppModule. In the base project, this is all done in a single file: &lt;a href="https://github.com/Ismaestro/angular-example-app/blob/d83da7bfa0faca2d7e2d3676bfa1ea65332ffd3c/src/app/app.config.ts#L24" rel="noopener noreferrer"&gt;src/app/app.config.ts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is the brain of the app — it defines all the global wiring (&lt;strong&gt;routing&lt;/strong&gt;, HTTP, animations, images, environment...) in a single, easy-to-maintain file.&lt;/p&gt;

&lt;p&gt;Here’s a breakdown of what this file does — and why it’s so powerful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;appConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ApplicationConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;providers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;provide&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ENVIRONMENT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;useValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nf"&gt;provideExperimentalZonelessChangeDetection&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="nf"&gt;provideRouter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nx"&gt;appRoutes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nf"&gt;withInMemoryScrolling&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="nf"&gt;withViewTransitions&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;onViewTransitionCreated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;router&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;inject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Router&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toTree&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createUrlTreeFromSnapshot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
          &lt;span class="c1"&gt;// Skip the transition if the only thing changing is the fragment and queryParams&lt;/span&gt;
          &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nx"&gt;router&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isActive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toTree&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
              &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;exact&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="na"&gt;matrixParams&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;exact&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="na"&gt;fragment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ignored&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="na"&gt;queryParams&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ignored&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt;
          &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;skipTransition&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;}),&lt;/span&gt;
      &lt;span class="nf"&gt;withComponentInputBinding&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="nf"&gt;withRouterConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;paramsInheritanceStrategy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;always&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;onSameUrlNavigation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;reload&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
      &lt;span class="nf"&gt;withPreloading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;PreloadAllModules&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nf"&gt;provideHttpClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nf"&gt;withFetch&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="nf"&gt;withInterceptors&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;authenticationInterceptor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cachingInterceptor&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nf"&gt;provideAnimationsAsync&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="nf"&gt;provideCloudinaryLoader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://res.cloudinary.com/ismaestro/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;p&gt;Let’s break down some of the powerful things this configuration enables:&lt;/p&gt;

&lt;h4&gt;
  
  
  provideExperimentalZonelessChangeDetection()
&lt;/h4&gt;

&lt;p&gt;Removes Angular’s dependency on Zone.js, enabling better performance with modern reactive patterns. ⚠️ It's still experimental, &lt;strong&gt;you should avoid this for production apps&lt;/strong&gt;!&lt;/p&gt;

&lt;h4&gt;
  
  
  provideRouter() with Extras
&lt;/h4&gt;

&lt;p&gt;This router setup includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;withInMemoryScrolling&lt;/strong&gt;(): preserves scroll position on navigation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;withViewTransitions&lt;/strong&gt;(): enables smooth transitions between views, and even skips them when nothing relevant changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;withComponentInputBinding&lt;/strong&gt;(): allows inputs to be set via route params.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;withPreloading&lt;/strong&gt;(PreloadAllModules): preloads all lazy-loaded routes in the background for faster navigation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  provideHttpClient() with withFetch()
&lt;/h4&gt;

&lt;p&gt;Switches Angular to use the Fetch API instead of XMLHttpRequest. Also registers interceptors.&lt;/p&gt;

&lt;h4&gt;
  
  
  provideAnimationsAsync()
&lt;/h4&gt;

&lt;p&gt;Uses Angular’s modern async animations system. For more information, follow &lt;a href="https://angular.dev/guide/animations" rel="noopener noreferrer"&gt;the official animations guide&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Ties Everything Together
&lt;/h2&gt;

&lt;p&gt;This config file is passed to bootstrapApplication in main.ts, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;bootstrapApplication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;AppComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;appConfig&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/Ismaestro/angular-example-app/blob/d83da7bfa0faca2d7e2d3676bfa1ea65332ffd3c/src/main.ts#L9" rel="noopener noreferrer"&gt;main.ts&lt;/a&gt; This replaces the old AppModule entirely.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  ✅ What’s Next: Feature-First Project Structure
&lt;/h2&gt;

&lt;p&gt;Standalone components are the foundation of modern Angular — they simplify your architecture, reduce boilerplate, and make your app easier to reason about. If you're just coming back to Angular, this is the best place to restart.&lt;/p&gt;

&lt;p&gt;In the next post, we’ll explore how to structure your project from a feature-first perspective, taking a close look at how the &lt;a href="https://github.com/Ismaestro/angular-example-app" rel="noopener noreferrer"&gt;angular-example-app&lt;/a&gt; organizes code in a scalable and maintainable way. :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffqd40k7imv8x6p8s76d1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffqd40k7imv8x6p8s76d1.png" alt="board and a hand organizing items"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you’ve learned something new from all of this. If you think this might help others, please hit the like button so more people can find it. ❤️&lt;/p&gt;

&lt;p&gt;Got thoughts or questions? Drop a comment — I'd love to respond!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Updates from the Angular Team and new Angular 17 features!</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Tue, 07 Nov 2023 14:00:00 +0000</pubDate>
      <link>https://dev.to/ismaestro/updates-from-the-angular-team-and-new-angular-17-features-2pld</link>
      <guid>https://dev.to/ismaestro/updates-from-the-angular-team-and-new-angular-17-features-2pld</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 - New site domain and home for developers&lt;/li&gt;
&lt;li&gt;2 - New tutorials and playground&lt;/li&gt;
&lt;li&gt;3 - New Angular logo&lt;/li&gt;
&lt;li&gt;4 - SSR and SSG are now &lt;strong&gt;stable&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
5 - New control flow

&lt;ul&gt;
&lt;li&gt;@if&lt;/li&gt;
&lt;li&gt;@for&lt;/li&gt;
&lt;li&gt;@switch&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;6 - Defer syntax is in developer preview&lt;/li&gt;

&lt;li&gt;7 - Standalone components &lt;strong&gt;by default&lt;/strong&gt;
&lt;/li&gt;

&lt;li&gt;8 - Webpack &lt;strong&gt;deprecated&lt;/strong&gt; in favor of Esbuild and Vite&lt;/li&gt;

&lt;li&gt;9 - New inspect mode for dependency injection graph&lt;/li&gt;

&lt;li&gt;10 - Custom @Input transforms&lt;/li&gt;

&lt;li&gt;11 - Minor refactor in styles and styleUrl properties&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;So, on November 6, 2023, the Angular Team dropped some cool updates and talked about a bunch of new Angular 17 features that I'd love to &lt;strong&gt;break down&lt;/strong&gt; for you.&lt;/p&gt;

&lt;p&gt;You have the whole &lt;strong&gt;live event&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=Wq6GpTZ7AX0&amp;amp;ab_channel=Angular" rel="noopener noreferrer"&gt;on YouTube&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  1 - New site domain and home for developers
&lt;/h2&gt;

&lt;p&gt;The new website with all the &lt;strong&gt;documentation updated&lt;/strong&gt;, reference materials, and core concepts, is ready for new developers at &lt;a href="https://angular.dev/" rel="noopener noreferrer"&gt;angular.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It's going to be &lt;strong&gt;open-sourced&lt;/strong&gt; soon and might serve as a good production &lt;strong&gt;example app&lt;/strong&gt;. I have mine &lt;a href="https://github.com/Ismaestro/angular-example-app" rel="noopener noreferrer"&gt;here&lt;/a&gt;, which I'm planning to update soon ;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwxuiakmyja7ohbcvpso7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwxuiakmyja7ohbcvpso7.jpg" alt="Screenshot of the new website"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2 - New tutorials and playground
&lt;/h2&gt;

&lt;p&gt;They released &lt;strong&gt;new tutorials&lt;/strong&gt; addressed to beginners, intermediate, and advanced developers. They are going to be embedded in the website itself.&lt;/p&gt;

&lt;p&gt;There is going to be a new essentials guide, to manage all the core concepts.&lt;/p&gt;

&lt;p&gt;The playground has been &lt;strong&gt;redesigned&lt;/strong&gt; and is at &lt;a href="https://angular.dev/playground" rel="noopener noreferrer"&gt;angular.dev/playground&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  3 - New Angular logo
&lt;/h2&gt;

&lt;p&gt;Because new modern things are coming and the brand seems a little bit old. It tries to be more &lt;strong&gt;inclusive&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjqhdlvrxrnqnf9auzh3o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjqhdlvrxrnqnf9auzh3o.jpg" alt="New Angular logo"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4 - SSR and SSG are now &lt;strong&gt;stable&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;There is a new option for creating an app with the server side enabled from the start. A lot of people have been asking for improvements in this topic. Here they are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;ESM support for server builds&lt;/li&gt;
&lt;li&gt;Build speed improvements for server bundles&lt;/li&gt;
&lt;li&gt;Dev server SSR improvements&lt;/li&gt;
&lt;li&gt;Hydration is now &lt;strong&gt;stable for production&lt;/strong&gt;. More in &lt;a href="https://angular.dev/guide/hydration" rel="noopener noreferrer"&gt;angular.dev/guide/hydration&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The future is about &lt;strong&gt;SSR streaming&lt;/strong&gt;. They are going in that direction.&lt;/p&gt;




&lt;h2&gt;
  
  
  5 - New control flow
&lt;/h2&gt;

&lt;p&gt;Another key feature is the new control flow, which is easier to read and write, has new features like if-else, and has also performance improvements. Let's see some examples:&lt;/p&gt;

&lt;h3&gt;
  
  
  @if
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    @if (user.loggedIn) {
        &lt;span class="nt"&gt;&amp;lt;app-dashboard&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    }
    @else {
        &lt;span class="nt"&gt;&amp;lt;app-login&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    }
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;a class="mentioned-user" href="https://dev.to/for"&gt;@for&lt;/a&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    @for (user of userList; track user) {
        &lt;span class="nt"&gt;&amp;lt;app-card&lt;/span&gt; &lt;span class="na"&gt;[data]=&lt;/span&gt;&lt;span class="s"&gt;"user"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    }
    @empty {
        &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;There were no items in the list&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    }
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A few notes here. Track property is &lt;strong&gt;mandatory&lt;/strong&gt; to avoid &lt;strong&gt;memory problems&lt;/strong&gt;. We can use &lt;strong&gt;&lt;a class="mentioned-user" href="https://dev.to/empty"&gt;@empty&lt;/a&gt;&lt;/strong&gt;, when the array has no elements, to directly show something.&lt;/p&gt;

&lt;h3&gt;
  
  
  @switch
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
    @switch (membershipStatus) {
        @case ("gold") {
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Your discount is 20%&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        }
        @default {
            &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Keep earning rewards.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        }
    }
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This new control flow makes the template render sometimes &lt;strong&gt;90% faster&lt;/strong&gt; than before. It is &lt;strong&gt;optional&lt;/strong&gt; and a &lt;strong&gt;migration&lt;/strong&gt; is available for it.&lt;/p&gt;




&lt;h2&gt;
  
  
  6 - Defer syntax is in developer preview
&lt;/h2&gt;

&lt;p&gt;Now we are going to be able to defer some parts of the template. It is &lt;strong&gt;non-blocking&lt;/strong&gt;. Here you have a complete example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;#trigger&lt;/span&gt; &lt;span class="na"&gt;(click)=&lt;/span&gt;&lt;span class="s"&gt;"load = true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Load component
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

@defer (on viewport(trigger); when load == true) {
    &lt;span class="nt"&gt;&amp;lt;recommended-movies&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
} @placeholder (minimum 500ms) {
    &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"placeholder-image.png"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
} @loading (after 500ms; minimum 1s) {
    &lt;span class="nt"&gt;&amp;lt;spinner&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
} @error {
    &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; Oops, something went wrong&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are some built-in triggers, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;idle&lt;/strong&gt;: load as soon as your browser reports it is in an idle state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;interaction&lt;/strong&gt;: load when an element is clicked, focused, or similar behavior.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;viewport&lt;/strong&gt;: load when the content enters the client's viewport window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;hover&lt;/strong&gt;: load when the mouse is hovering over an area.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;timer&lt;/strong&gt;: load after a specific timeout.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also do prefetching and also create custom triggers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;#trigger&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    ...
    @defer (prefetch on immediate;
            prefetch when val === true) {
        &lt;span class="nt"&gt;&amp;lt;large-component&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    }
    ...
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The documentation has been improved and it's available at &lt;a href="https://angular.dev/guide/defer" rel="noopener noreferrer"&gt;angular.dev/guide/defer&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  7 - Standalone components &lt;strong&gt;by default&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The team has decided to set standalone components enabled by default. NgModules are &lt;strong&gt;still valid&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  8 - Webpack &lt;strong&gt;deprecated&lt;/strong&gt; in favor of Esbuild and Vite
&lt;/h2&gt;

&lt;p&gt;As Standalone Components, &lt;strong&gt;Esbuild is enabled by default&lt;/strong&gt; for new projects. As an example, the angular material documentation website now builds &lt;strong&gt;2.5 times faster&lt;/strong&gt; using this configuration.&lt;/p&gt;

&lt;p&gt;They &lt;strong&gt;recommend&lt;/strong&gt; migrating all projects to Esbuild because of the performance improvements and future better support.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F62w8eddkqdveuheg0hlm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F62w8eddkqdveuheg0hlm.jpg" alt="Vite logo"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  9 - New inspect mode for dependency injection graph
&lt;/h2&gt;

&lt;p&gt;It is available in the &lt;strong&gt;angular dev tools&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4mhs8jesxki78gs0o0h9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4mhs8jesxki78gs0o0h9.jpg" alt="Devtools capture"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  10 - Custom @Input transforms
&lt;/h2&gt;

&lt;p&gt;If the value has to be transformed and normalized to a certain type, there are some built-in transformers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;custom-slider&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CustomSlider&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Input&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;trimString&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="nx"&gt;label&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;trimString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  11 - Minor refactor in styles and styleUrl properties
&lt;/h2&gt;

&lt;p&gt;Last but not least, they updated these properties while creating a component. Before, they were arrays. Now you can write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;styleUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./user-profile.component.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;styles&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.username {color: red; }&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;I hope you have learned something new from all. If you think this might help other people, please hit the like button so that others can read it. ❤️&lt;/p&gt;

&lt;p&gt;If you have any thoughts or questions, feel free to leave a comment!&lt;/p&gt;

</description>
      <category>angular</category>
      <category>webdev</category>
      <category>programming</category>
      <category>news</category>
    </item>
    <item>
      <title>Top 20 Must-Know Tips for Web Accessibility</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Wed, 12 Jul 2023 14:55:01 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/top-20-must-know-tips-for-web-accessibility-452</link>
      <guid>https://dev.to/playfulprogramming/top-20-must-know-tips-for-web-accessibility-452</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fismaestro%2Fimage%2Fupload%2Fv1691247539%2Fismaelramos%2Fposts%2Ftop-20-must-know-tips-for-web-accessibility%2Flast-words_qm7hua.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fismaestro%2Fimage%2Fupload%2Fv1691247539%2Fismaelramos%2Fposts%2Ftop-20-must-know-tips-for-web-accessibility%2Flast-words_qm7hua.jpg" alt="two hands reaching out to help each other"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
1 - Learn how to use a screen reader

&lt;ul&gt;
&lt;li&gt;Most commonly used keys&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

2 - Gain good knowledge of ARIA

&lt;ul&gt;
&lt;li&gt;Most common ARIA attributes&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

3 - Use semantic HTML

&lt;ul&gt;
&lt;li&gt;Examples of semantic usage of HTML tags&lt;/li&gt;
&lt;li&gt;The main advantage of semantic HTML&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Basic concepts

&lt;ul&gt;
&lt;li&gt;4 - Use tabindex, but with caution&lt;/li&gt;
&lt;li&gt;5 - Create proper outlines&lt;/li&gt;
&lt;li&gt;6 - Allow keyboard navigation throughout your website&lt;/li&gt;
&lt;li&gt;7 - Identify the language&lt;/li&gt;
&lt;li&gt;8 - Ensure ARIA attributes are in the correct language&lt;/li&gt;
&lt;li&gt;9 - Texts must be resizable&lt;/li&gt;
&lt;li&gt;10 - Use headings in the proper order&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Accessibility in base components

&lt;ul&gt;
&lt;li&gt;11 - Make images accessible&lt;/li&gt;
&lt;li&gt;12 - Create icons for everyone&lt;/li&gt;
&lt;li&gt;13 - Don't forget states in buttons&lt;/li&gt;
&lt;li&gt;14 - Create descriptive links&lt;/li&gt;
&lt;li&gt;15 - Ensure forms are accessible&lt;/li&gt;
&lt;li&gt;16 - Include captions for videos&lt;/li&gt;
&lt;li&gt;17 - Provide transcripts or audio descriptions for audio content&lt;/li&gt;
&lt;li&gt;18 - Use titles and make iframes responsive&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

Other improvements

&lt;ul&gt;
&lt;li&gt;19 - Make downloads descriptive&lt;/li&gt;
&lt;li&gt;20 - Create a link to bypass blocks&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Last words&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;This &lt;strong&gt;third part&lt;/strong&gt; of the series aims to provide you with &lt;strong&gt;essential&lt;/strong&gt; principles (not all of them, as that's almost impossible!), &lt;strong&gt;practical advice&lt;/strong&gt;, and &lt;strong&gt;examples&lt;/strong&gt; for creating accessible websites.&lt;/p&gt;

&lt;p&gt;I'll share some essential guidelines that our team has followed to make our website accessible and achieve a double A level of accessibility.&lt;/p&gt;

&lt;p&gt;We'll uncover the secrets of creating clear descriptions for images, explore the world of navigating using only the keyboard, and much more, so that everyone can browse your site like a &lt;strong&gt;pro&lt;/strong&gt;. :)&lt;/p&gt;




&lt;h2&gt;
  
  
  1 - Learn how to use a screen reader
&lt;/h2&gt;

&lt;p&gt;Before getting into the code, it's important to understand how to use a screen reader. It's a fundamental skill that will help you to know the challenges users face when navigating your website.&lt;/p&gt;

&lt;p&gt;In our team, most of us use &lt;a href="https://support.apple.com/guide/voiceover/welcome/mac" rel="noopener noreferrer"&gt;Voiceover&lt;/a&gt; as we work under MacOs. But there are alternatives for Windows systems like &lt;a href="https://speechify.com/" rel="noopener noreferrer"&gt;Speechify&lt;/a&gt;, &lt;a href="https://www.freedomscientific.com/products/software/jaws/" rel="noopener noreferrer"&gt;JAWS&lt;/a&gt; and &lt;a href="https://www.nvaccess.org/" rel="noopener noreferrer"&gt;NVDA&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Taking the time to familiarize yourself with a screen reader will provide you with valuable insights into the user experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fscqn570ooter01e720qh.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fscqn570ooter01e720qh.gif" alt="showing how a screen reader looks like in dev.to"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Most commonly used keys
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tab and Shift+Tab&lt;/strong&gt;: these keys allow users to move &lt;strong&gt;forward and backward&lt;/strong&gt; through interactive elements on a web page, such as links, form fields, and buttons.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Arrow Keys&lt;/strong&gt;: the arrow keys are used to navigate within a block of text or &lt;strong&gt;move&lt;/strong&gt; between different components, such as headings, paragraphs, and lists. Users can move up, down, left, or right to explore the content in detail.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nodes&lt;/strong&gt;: navigating by nodes allows you to explore and interact with every element, like moving from one piece of the puzzle to another. In Voiceover you can navigate by pressing &lt;code&gt;Control + Option + Arrow key&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enter or Spacebar&lt;/strong&gt;: these keys are used to activate buttons, links, or form controls. When a user lands on an interactive element, they can press &lt;strong&gt;Enter&lt;/strong&gt; or &lt;strong&gt;Spacebar&lt;/strong&gt; to trigger the associated action or follow a link.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Headings&lt;/strong&gt;: many screen readers provide shortcut keys to jump between headings. For example, &lt;strong&gt;pressing the "H" key&lt;/strong&gt; allows users to navigate to the &lt;strong&gt;next heading&lt;/strong&gt;, making it easier to skim through the structure of a web page.&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Search&lt;/strong&gt;: screen readers often provide a search function that enables users to find specific words or phrases on a webpage. By entering keywords, users can quickly locate relevant information without having to navigate the entire page. Also there is a &lt;strong&gt;very useful combination&lt;/strong&gt; in Voiceover to display all headings, links and form controls, which is &lt;code&gt;Control + Shift + U&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fodikkbwq5flah3erjw6v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fodikkbwq5flah3erjw6v.jpg" alt="icons of all screen readers mentioned"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2 - Gain good knowledge of ARIA
&lt;/h2&gt;

&lt;p&gt;In this second tip, I thinks it's important to give context about what ARIA means. Basically, ARIA stands for Accessible Rich Internet Applications. It's a term that refers to a set of guidelines and tools designed to enhance the user-friendliness of websites for individuals with disabilities.&lt;/p&gt;

&lt;p&gt;ARIA assists in providing &lt;strong&gt;additional information&lt;/strong&gt; to web elements, such as buttons or links, so that screen readers and other assistive technologies can better understand them. It's like giving a shout-out to those who can't see or use a mouse, so they can navigate and interact with websites smoothly.&lt;/p&gt;




&lt;h3&gt;
  
  
  Most common ARIA attributes
&lt;/h3&gt;

&lt;p&gt;These are the ARIA attributes that we &lt;strong&gt;primarily&lt;/strong&gt; use in our journey to achieve double A accessibility for the website we were working on. There are more attributes available, but it's crucial to be familiar with at least these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden" rel="noopener noreferrer"&gt;aria-hidden&lt;/a&gt;: by setting &lt;code&gt;aria-hidden="true"&lt;/code&gt;, we indicate to assistive technologies that the icon should be hidden from the accessibility tree. It's used for non-interactive elements.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon-button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"visually-hidden"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Close&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;i&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"fas fa-times"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/i&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label" rel="noopener noreferrer"&gt;aria-label&lt;/a&gt;: provides a text alternative for an element when no visible label is present.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon-button"&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;i&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"fas fa-search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/i&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby" rel="noopener noreferrer"&gt;aria-labelledby&lt;/a&gt;: associates an element with another element that serves as its label.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"alert-message"&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"alert"&lt;/span&gt; &lt;span class="na"&gt;aria-labelledby=&lt;/span&gt;&lt;span class="s"&gt;"alert-heading alert-description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h3&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"alert-heading"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Important Info!&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"alert-description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Please be aware of the upcoming changes.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The value of the attribute, &lt;code&gt;"alert-heading alert-description,"&lt;/code&gt; corresponds to the IDs of the heading &lt;code&gt;(&amp;lt;h3&amp;gt;)&lt;/code&gt; and paragraph &lt;code&gt;(&amp;lt;p&amp;gt;)&lt;/code&gt; elements that provide the label and description for the alert message.&lt;/p&gt;

&lt;p&gt;By using &lt;code&gt;aria-labelledby&lt;/code&gt;, you establish a relationship between the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; element and the labeled heading and description. The screen reader will read the entire text inside those elements.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby" rel="noopener noreferrer"&gt;aria-describedby&lt;/a&gt;: associates an element with another element that describes its purpose.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Username:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt; &lt;span class="na"&gt;aria-describedby=&lt;/span&gt;&lt;span class="s"&gt;"username-description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"username-description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Please enter a unique username consisting of letters and numbers.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One common situation is to provide extra information in inputs like usernames, emails, and passwords, where the user has to use a specific set of characters.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded" rel="noopener noreferrer"&gt;aria-expanded&lt;/a&gt;: indicates whether a collapsible element is currently expanded or collapsed.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"toggle-button"&lt;/span&gt; &lt;span class="na"&gt;aria-expanded=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt; &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"toggleContent()"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  Toggle Content
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By dynamically updating the &lt;code&gt;aria-expanded&lt;/code&gt; attribute based on the state of the content, the screen read can announce the current state to the user.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled" rel="noopener noreferrer"&gt;aria-disabled&lt;/a&gt;: indicates that an element is disabled and cannot be interacted with.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;aria-disabled=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live" rel="noopener noreferrer"&gt;aria-live&lt;/a&gt;:  indicates that content within an element should be dynamically announced to the screen reader. We often use this to &lt;strong&gt;inform the user&lt;/strong&gt; of form errors.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;aria-live=&lt;/span&gt;&lt;span class="s"&gt;"polite"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"status-message"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  New message received: You have 1 unread notification.
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fny0xxmwe09wlp8u6ocye.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fny0xxmwe09wlp8u6ocye.jpg" alt="a form with an alert showing errors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;role: used to define the purpose or type of an element on a web page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The role attribute can be applied to a wide range of HTML elements, such as &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, and more. Some common role values include "button," "link," "navigation," "heading," "list," "form," and "banner," among others. Each role value conveys a specific meaning and functionality to assistive technologies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"alert"&lt;/span&gt; &lt;span class="na"&gt;aria-live=&lt;/span&gt;&lt;span class="s"&gt;"assertive"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is an important alert message!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you need to &lt;strong&gt;create a component with a specific role&lt;/strong&gt;, you can refer to &lt;a href="https://www.w3.org/WAI/ARIA/apg/patterns/" rel="noopener noreferrer"&gt;the patterns website&lt;/a&gt; of the W3C.&lt;/p&gt;




&lt;h2&gt;
  
  
  3 - Use semantic HTML
&lt;/h2&gt;

&lt;p&gt;Well, semantic HTML is like using special tags that provide meaning and structure to your web content. Instead of just slapping any old tag on things, you can use tags like &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt; to show the structure and purpose of different parts of your page.&lt;/p&gt;

&lt;p&gt;For example, instead of using a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; for your website's navigation menu, you would use the &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt; tag. This tells  humans, search engines, and screen readers that the content inside it represents the site's navigation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/about"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/services"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Services&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/contact"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contact&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Examples of semantic usage of HTML tags
&lt;/h3&gt;

&lt;p&gt;These are important situations where you have to use the&lt;br&gt;
appropriate tags.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;&lt;/strong&gt;: represents the introductory or top section of a page.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to My Website&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Navigation menu --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt;&lt;/strong&gt;: represents the main content of a document.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;About Me&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;I'm passionate about web development, ...&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;&lt;/strong&gt;: represents a self-contained composition, such as a blog post, news article, or forum post.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;article&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Post title&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Recently, I went on an amazing trip...&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;&lt;/strong&gt;: represents a standalone section within a document.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Services&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Web Design&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Front-end Development&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;footer&amp;gt;&lt;/code&gt;&lt;/strong&gt;: represents the bottom section of a document &lt;strong&gt;or section&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;&lt;span class="ni"&gt;&amp;amp;copy;&lt;/span&gt; 2023 MyWebsite. All rights reserved.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;nav&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Footer navigation goes here --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt;&lt;/strong&gt;: is used to group the contact information fields together.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;fieldset&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;legend&amp;gt;&lt;/span&gt;Contact Information&lt;span class="nt"&gt;&amp;lt;/legend&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Name:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Message:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;textarea&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/fieldset&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The main advantage of semantic HTML
&lt;/h3&gt;

&lt;p&gt;Semantic HTML elements contribute to a logical and well-organized tab order. Keyboard-only users heavily rely on the tab key to navigate through interactive elements on a webpage.&lt;/p&gt;

&lt;p&gt;By using appropriate semantic elements like &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;, and form elements with proper labeling, &lt;strong&gt;you ensure that keyboard users can efficiently navigate and interact with your website&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without Semantic HTML&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Welcome!&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Some paragraph&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"button-container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Register&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Or, if you have any questions, feel free to &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"link"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/contact"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;contact us&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;With Semantic HTML&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;section&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Welcome!&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Some paragraph&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;Register&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Or, if you have any questions, feel free to &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/contact"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;contact us&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This consideration is crucial for individuals with motor disabilities who may not be able to use a mouse.&lt;/p&gt;

&lt;p&gt;So go ahead, &lt;strong&gt;embrace Semantic HTML&lt;/strong&gt; and enjoy the ride!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpkouh87rhptpggwf2v4y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpkouh87rhptpggwf2v4y.jpg" alt="two forms, on the left using only divs, and on the right using proper tags"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Basic concepts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  4 - Use tabindex, but with caution
&lt;/h3&gt;

&lt;p&gt;Tabindex is an attribute you can add to HTML elements to control their keyboard navigation order. It allows you to determine which elements receive focus when users navigate through your web page using the &lt;em&gt;Tab&lt;/em&gt; key.&lt;/p&gt;

&lt;p&gt;By setting &lt;code&gt;tabindex&lt;/code&gt; values, you can customize the order and make your site more accessible to all users, especially those who rely on keyboards for navigation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0qh1d5tbu98jcsyz3qg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0qh1d5tbu98jcsyz3qg.jpg" alt="four buttons that show how to tab order works because the second one has focus"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Best practices for tabindex
&lt;/h4&gt;

&lt;p&gt;Only modify the tabindex values when necessary. Most interactive elements &lt;strong&gt;automatically receive focus&lt;/strong&gt; in the default Tab order, so only intervene when it improves &lt;strong&gt;the overall user experience&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Possible values&lt;/strong&gt;: the two possible values that are recommended, are "0" and "-1".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If &lt;code&gt;tabindex="0"&lt;/code&gt; is used to make elements focusable, the keyboard interaction must be correct and intuitive for that element. This means that elements that are presented as buttons, for example, must respond to both Enter and Spacebar key presses.&lt;/p&gt;

&lt;p&gt;By giving them a tabindex value of 0, you ensure that these elements &lt;strong&gt;can receive keyboard focus&lt;/strong&gt; and be easily accessed using the Tab key. It's like opening the door for keyboard users to interact with these elements that wouldn't typically be clickable.&lt;/p&gt;

&lt;p&gt;When you set &lt;code&gt;tabindex="-1"&lt;/code&gt;, it takes the element out of the regular navigation flow.&lt;/p&gt;

&lt;p&gt;However, it's important to note that you should not assign the value "-1" to elements that need to be accessible via keyboard, such as links or buttons that sighted users can easily click on with a mouse.&lt;/p&gt;

&lt;p&gt;Generally speaking, it is recommended &lt;strong&gt;to avoid the use of tabindex="-1"&lt;/strong&gt; unless you have a specific reason to do so.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Maintain a logical flow&lt;/strong&gt;: arrange tabindex values in a logical order that reflects the visual and reading flow of your content. Users should be able to navigate through your website naturally, without encountering unexpected jumps or skipping important elements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Skip non-interactive elements&lt;/strong&gt;: avoid assigning tabindex to non-interactive elements like text paragraphs or images. This helps users focus on interactive elements that require action or input.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  5 - Create proper outlines
&lt;/h3&gt;

&lt;p&gt;Outlines are like visual hugs that surround interactive elements such as buttons, links, and form fields when you interact with them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.focus-outline&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
   &lt;span class="nl"&gt;outline-offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They provide a clear visual indication, usually a border or highlight, to show you which element is currently in focus. Whether you're using a keyboard or a mouse, these outlines ensure you can easily identify and interact with the right elements on a webpage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxikopmurqabymnq6yw88.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxikopmurqabymnq6yw88.jpg" alt="representation of an outline"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Best practices for outlines
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visibility:&lt;/strong&gt; outlines should be visible and clearly distinguishable, ensuring they stand out from the surrounding content. It is important to choose colors and styles that provide sufficient contrast, and to avoid designs that may cause confusion or distract from the main content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid removing outlines:&lt;/strong&gt; it's crucial not to remove or disable outlines unless you have replaced them with a suitable and accessible alternative. Removing outlines altogether can disorient and confuse users, especially those who rely on keyboard navigation. Unfortunately, some developers occasionally choose to remove outlines. However, it's highly recommended &lt;strong&gt;not to do it&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Design consistency&lt;/strong&gt;: look for a consistent outline style across your website. This helps users develop familiarity with the visual cues, promoting a smooth and intuitive browsing experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are a &lt;strong&gt;designer&lt;/strong&gt;, please read the &lt;a href="https://dev.to/ismaestro/designing-for-all-achieving-web-accessibility-in-web-design-32je"&gt;&lt;strong&gt;second part&lt;/strong&gt;&lt;/a&gt; of this series.&lt;/p&gt;




&lt;h3&gt;
  
  
  6 - Allow keyboard navigation throughout your website
&lt;/h3&gt;

&lt;p&gt;Keyboard navigation is one of &lt;strong&gt;the most important parts&lt;/strong&gt; of web accessibility.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntz7axiyne05q2glyl9z.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fntz7axiyne05q2glyl9z.jpg" alt="a person using a braille keyboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, you have to know that it is closely related to &lt;strong&gt;semantic HTML and native elements&lt;/strong&gt;. When you combine these two, something amazing happens - users can effortlessly navigate through most of the website using just their keyboard, &lt;strong&gt;without needing any special tweaks or tricks&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So, one of the principles that we are following when creating new components and develop new features, is to always use native elements whenever possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I will give you an example with the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog" rel="noopener noreferrer"&gt;dialog element&lt;/a&gt;.&lt;/strong&gt; Instead of creating your own modal, you should use the native component because it implements all the necessary features like escape, trap focus, close button, etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dialog&lt;/span&gt; &lt;span class="na"&gt;open&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is a simple dialog!&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"dialog"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&amp;gt;&lt;/span&gt;nice! ok!&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dialog&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One last advice about this is to take the &lt;strong&gt;#nomouse challenge&lt;/strong&gt;! Try navigating the web page and controlling all its features using the tab key on a keyboard; don’t touch the mouse. This simple test is typically a good indicator of accessibility. For more information, see &lt;a href="//nomouse.org"&gt;nomouse.org&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  7 - Identify the language
&lt;/h3&gt;

&lt;p&gt;You need to provide context about the language that the webpage is based on and specific paragraphs or components that are in a different language.&lt;/p&gt;

&lt;h4&gt;
  
  
  The &lt;code&gt;lang&lt;/code&gt; attribute
&lt;/h4&gt;

&lt;p&gt;Setting the &lt;code&gt;lang&lt;/code&gt; attribute in the HTML tag allows you to declare the language of the web page. This helps screen readers and other assistive technologies identify and present the content correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep in mind that if there is a paragraph in a different language you have to &lt;strong&gt;specify its language&lt;/strong&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- English (US) content --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en-US"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Explore and enjoy our diverse content.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

  &lt;span class="c"&gt;&amp;lt;!-- Hindi content --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"hi"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;हमारी विविधतापूर्ण सामग्री का अन्वेषण और आनंद लें।&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anyway, there are a few &lt;strong&gt;exceptions&lt;/strong&gt; like quotations, proper terms, technical terms, foreign words like "Sushi" or the language selector:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flngvpbg306jdq34nqb8o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flngvpbg306jdq34nqb8o.jpg" alt="language selector showing different languages in amazon website"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  8 - Ensure ARIA attributes are in the correct language
&lt;/h3&gt;

&lt;p&gt;If your webpage is primarily in English, it's important to ensure that aria attributes are also in English.&lt;/p&gt;

&lt;p&gt;However, if the user switches to a different language, the aria attributes should change accordingly. It's advisable to &lt;strong&gt;avoid mixing languages&lt;/strong&gt; as much as possible to maintain consistency and clarity throughout the user experience.&lt;/p&gt;




&lt;h3&gt;
  
  
  9 - Texts must be resizable
&lt;/h3&gt;

&lt;p&gt;To make your website more user-friendly and accessible, it's crucial to ensure that the text is resizable.&lt;/p&gt;

&lt;p&gt;Ideally, users should be able to increase the font size &lt;strong&gt;by up to 200%&lt;/strong&gt; without any content getting cut off or losing any functionality.&lt;/p&gt;

&lt;p&gt;Generally speaking, you should use &lt;strong&gt;&lt;code&gt;em&lt;/code&gt; units&lt;/strong&gt; for font sizes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="nc"&gt;.a&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;14px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt;//&lt;/span&gt; &lt;span class="err"&gt;:(&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="nc"&gt;.b&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt;//&lt;/span&gt; &lt;span class="err"&gt;:)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="nc"&gt;.c&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.2em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt;//&lt;/span&gt; &lt;span class="err"&gt;:)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By using scalable units like &lt;code&gt;em&lt;/code&gt; and &lt;code&gt;rem&lt;/code&gt;, we enable users to control the scale of the sites, thereby, providing us with our desired accessibility.&lt;/p&gt;

&lt;p&gt;If you are thinking about using &lt;code&gt;rem&lt;/code&gt;, keep in mind that scaling up and down accurately can be a challenge for all the text elements to adjust properly.&lt;/p&gt;

&lt;p&gt;But for sure, try to &lt;strong&gt;avoid &lt;code&gt;px&lt;/code&gt;&lt;/strong&gt; unit on font sizes. They simply do not scale.&lt;/p&gt;




&lt;h3&gt;
  
  
  10 - Use headings in the proper order
&lt;/h3&gt;

&lt;p&gt;When structuring your content, it's essential to use headings &lt;strong&gt;in a logical hierarchy&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Start with the main heading (usually &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;) for the page title or main section, followed by subheadings (&lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt;) for major subsections, and so on.&lt;/p&gt;

&lt;p&gt;This hierarchy helps users understand the content's organization and allows screen readers to navigate through the page more effectively.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Best practices for Web Accessibility!&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Basic concepts&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Headings&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h4&amp;gt;&lt;/span&gt;Best practices for headings&lt;span class="nt"&gt;&amp;lt;/h4&amp;gt;&lt;/span&gt;
....
&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Advanced concepts&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;h3&amp;gt;&lt;/span&gt;Creating an accessible component library&lt;span class="nt"&gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's essential to follow a consistent heading order &lt;strong&gt;without skipping levels&lt;/strong&gt;. For example, don't jump from &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;h4&amp;gt;&lt;/code&gt; directly. Skipping levels can &lt;strong&gt;confuse&lt;/strong&gt; screen readers and make it harder for users to understand the content's structure.&lt;/p&gt;

&lt;p&gt;As a final tip in this section, I would like to recommend you to place &lt;strong&gt;important interactive elements higher up&lt;/strong&gt; in the web page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh35j0gye856j1hfp8nhv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh35j0gye856j1hfp8nhv.jpg" alt="different headings all with a proper order"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessibility in base components
&lt;/h2&gt;

&lt;h3&gt;
  
  
  11 - Make images accessible
&lt;/h3&gt;

&lt;p&gt;Let's explore &lt;strong&gt;easy-to-implement&lt;/strong&gt; techniques to optimize your images for web accessibility.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Provide descriptive alt text:&lt;/strong&gt; make sure to use concise and descriptive language to describe the content and purpose of the image.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"example.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"A group of friends enjoying a picnic in the park"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decorative alt:&lt;/strong&gt; in some cases, you may include decorative images that don't add any significant information to your content. For such images, it's best to provide an &lt;strong&gt;empty alt text or use the aria-hidden&lt;/strong&gt; attribute to let screen readers skip over them.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"decoration.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Provide captions and image descriptions:&lt;/strong&gt; for complex images, charts, or infographics, it's helpful to provide additional context through captions or detailed image descriptions.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;figure&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"infographic.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Data visualization of population growth"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;figcaption&amp;gt;&lt;/span&gt;Data visualization of population growth in the last decade&lt;span class="nt"&gt;&amp;lt;/figcaption&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/figure&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;File formats:&lt;/strong&gt; use widely supported formats like JPEG, PNG, or GIF for regular images. If you have complex graphics or images with transparency, consider using SVG. These formats &lt;strong&gt;ensure compatibility&lt;/strong&gt; with various browsers and assistive technologies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Implement responsive images:&lt;/strong&gt; use the &lt;code&gt;srcset&lt;/code&gt; attribute to provide multiple image sources of varying sizes.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;srcset=&lt;/span&gt;&lt;span class="s"&gt;"small.jpg 320w,
              medium.jpg 768w,
              large.jpg 1200w"&lt;/span&gt;
     &lt;span class="na"&gt;sizes=&lt;/span&gt;&lt;span class="s"&gt;"(max-width: 768px) 100vw,
            50vw"&lt;/span&gt;
     &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"large.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"A responsive image"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz852609m5jzhc3thrtuy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz852609m5jzhc3thrtuy.jpg" alt="summary from above inside a decision graph"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  12 - Create icons for everyone
&lt;/h3&gt;

&lt;p&gt;Instead of using icons solely as decorative elements, &lt;strong&gt;consider&lt;/strong&gt; implementing semantic HTML elements like &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;  or &lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; and provide an appropriate text alternative.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;📞&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"sr-only"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Phone&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In addition, icon fonts and SVGs are &lt;strong&gt;highly recommended&lt;/strong&gt; for accessibility. They allow icons to be resized without losing quality and ensure compatibility across various devices and browsers.&lt;/p&gt;

&lt;p&gt;For complex SVGs consider using &lt;code&gt;title&lt;/code&gt; and &lt;code&gt;desc&lt;/code&gt; elements along with &lt;code&gt;aria-labelledby&lt;/code&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; 
   &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"img"&lt;/span&gt;
   &lt;span class="na"&gt;aria-labelledby=&lt;/span&gt;&lt;span class="s"&gt;"svg-title svg-description"&lt;/span&gt;
   &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt; 
   &lt;span class="na"&gt;xmlns:xlink=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/1999/xlink"&lt;/span&gt;
   &lt;span class="na"&gt;x=&lt;/span&gt;&lt;span class="s"&gt;"0px"&lt;/span&gt;
   &lt;span class="na"&gt;y=&lt;/span&gt;&lt;span class="s"&gt;"0px"&lt;/span&gt;
   &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 48 48"&lt;/span&gt;
   &lt;span class="na"&gt;xml:space=&lt;/span&gt;&lt;span class="s"&gt;"preserve"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;title&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"svg-title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;A short title to resume the purpose of the svg!&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;desc&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"svg-description"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;A description with more details.&lt;span class="nt"&gt;&amp;lt;/desc&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"..."&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  13 - Don't forget states in buttons
&lt;/h3&gt;

&lt;p&gt;Buttons are fundamental elements of web design, providing interactive functionality and serving as important &lt;strong&gt;call-to-action&lt;/strong&gt; components.&lt;/p&gt;

&lt;p&gt;Apart from using the semantic html tag &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;and providing a descriptive text like "Send Message", you should also provide visual feedback using the &lt;code&gt;:focus&lt;/code&gt; and &lt;code&gt;:hover&lt;/code&gt; states.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"primary-button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Save Changes&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.primary-button&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#42b983&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.primary-button&lt;/span&gt;&lt;span class="nd"&gt;:focus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#342455&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is also the &lt;strong&gt;disabled&lt;/strong&gt; state, that will require you to use &lt;code&gt;aria-disabled&lt;/code&gt; if its focusable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;aria-disabled=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  Continue
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the button is fully disabled then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;disabled&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  Continue
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For toggle buttons you should use the, &lt;strong&gt;aria-pressed="true/false"&lt;/strong&gt; attribute, and for menus you can use &lt;strong&gt;aria-expanded="true/false"&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhoygyatwac5pleaj83z.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhoygyatwac5pleaj83z.jpg" alt="3 examples of buttons, two of the with icons inside"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  14 - Create descriptive links
&lt;/h3&gt;

&lt;p&gt;Sometimes, it can be challenging to decide between using buttons or links. Our rule for making this decision is that if the user &lt;strong&gt;is redirected to another page&lt;/strong&gt; or location, it should be &lt;strong&gt;a link&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Even if a link appears as a big shiny button, it is crucial to use the &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element when coding it.&lt;/p&gt;

&lt;p&gt;Remember, this is a design tip that we covered in the second part of this series. It's important to avoid using generic link labels like "click here" or "read more."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; links should not solely consist of the URL, unless it is intended for printing purposes, such as in a Word document. Additionally, if a link opens in a new window, make sure to mention that to the user.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; Article about Web Accessibility (opens in new tab)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92ueb3fxl1tgvnv68ppc.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F92ueb3fxl1tgvnv68ppc.jpg" alt="an example of the w3c link in google"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  15 - Ensure forms are accessible
&lt;/h3&gt;

&lt;p&gt;Here, we encounter one of the most challenging aspects of web accessibility.&lt;/p&gt;

&lt;p&gt;Forms can consist of a wide range of components, such as comboboxes, inputs with various types like numbers or dates, text areas, and many more.&lt;/p&gt;

&lt;p&gt;Ensuring the accessibility of each form component is crucial, but discussing every component in detail would be insane. Instead, I will provide you with more general but equally important tips:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Semantic HTML (yes, again):&lt;/strong&gt; when structuring your forms, use semantic HTML elements like &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;legend&amp;gt;&lt;/code&gt; to provide a clear and organized structure.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;fieldset&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;legend&amp;gt;&lt;/span&gt;Do you agree?&lt;span class="nt"&gt;&amp;lt;/legend&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"checkbox"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"chbx"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"agree"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Yes!"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"chbx"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;I agree&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/fieldset&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows the screen reader to &lt;strong&gt;provide context&lt;/strong&gt; about the &lt;strong&gt;field&lt;/strong&gt; the user &lt;strong&gt;has to fill&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use labels:&lt;/strong&gt; ensure each form field has a descriptive label associated with it. Use the &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; element and associate it with the corresponding form field using the "for" attribute or by nesting the input element within the label.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Name:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Clear instructions: include clear and concise instructions to &lt;strong&gt;guide users&lt;/strong&gt; through the form-filling process. Place instructions near the related form fields, using additional text or elements such as &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Email:&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"instructions"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Please enter a valid email address.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Provide error validation and feedback:&lt;/strong&gt; associate error messages with their respective form fields using ARIA attributes, and use visually distinct styles or alert boxes to &lt;strong&gt;notify users of errors&lt;/strong&gt; while maintaining color contrast for readability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is an example, but since this is a &lt;strong&gt;complex topic&lt;/strong&gt;, I recommend you reading Sandrina's post on &lt;a href="https://www.smashingmagazine.com/2023/02/guide-accessible-form-validation/#invalid-fields" rel="noopener noreferrer"&gt;Accessible Form Validation&lt;/a&gt;. Simply amazing!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt;
  &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"address"&lt;/span&gt;
  &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt;
  &lt;span class="na"&gt;required=&lt;/span&gt;&lt;span class="s"&gt;"required"&lt;/span&gt;
  &lt;span class="na"&gt;aria-invalid=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
  &lt;span class="na"&gt;aria-describedby=&lt;/span&gt;&lt;span class="s"&gt;"addressError addressHint"&lt;/span&gt;
&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"addressError"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Address cannot be empty.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"addressHint"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Remember to include the door and apartment.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  16 - Include captions for videos
&lt;/h3&gt;

&lt;p&gt;This is not as common as forms, but on the other hand, it is generally easier to make them accessible.&lt;/p&gt;

&lt;p&gt;First, &lt;strong&gt;you need to provide captions&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;video&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"video.mp4"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"video/mp4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;track&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"captions.vtt"&lt;/span&gt; &lt;span class="na"&gt;kind=&lt;/span&gt;&lt;span class="s"&gt;"captions"&lt;/span&gt; &lt;span class="na"&gt;label=&lt;/span&gt;&lt;span class="s"&gt;"English"&lt;/span&gt; &lt;span class="na"&gt;srclang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt; &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/video&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And second, always &lt;strong&gt;make controls available&lt;/strong&gt; for keyboard users:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;video&lt;/span&gt; &lt;span class="na"&gt;controls&lt;/span&gt; &lt;span class="na"&gt;tabindex=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;source&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"video.mp4"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"video/mp4"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/video&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some other tips are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Avoid using flashing or blinking content that can trigger seizures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoid using auto-playing media or animations that may cause distractions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Color plays a significant role in videos, from subtitles to graphical elements. Ensure that the color contrast between the text and background is correct.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Choose an accessible video media player&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  17 - Provide transcripts or audio descriptions for audio content
&lt;/h3&gt;

&lt;p&gt;In this case we can provide transcripts like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;audio controls&amp;gt;
  &amp;lt;source src="audio.mp3" type="audio/mpeg"&amp;gt;
&amp;lt;/audio&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;a href="audio-transcript.txt"&amp;gt;Read the audio transcript&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify that the audio content, transcripts, captions, and audio descriptions are correctly interpreted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Audio descriptions should provide a detailed and concise narrative of the visual elements and actions taking place in the video.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bs5n74c1h5rrh5l5r7m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8bs5n74c1h5rrh5l5r7m.jpg" alt="a deaf person"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  18 - Use titles and make iframes responsive
&lt;/h3&gt;

&lt;p&gt;Iframes are versatile tools that enable seamless embedding of external content into your website. However, some improvements are necessary to enhance their accessibility.&lt;/p&gt;

&lt;h4&gt;
  
  
  Use descriptive titles
&lt;/h4&gt;

&lt;p&gt;When using iframes, provide descriptive titles that convey the purpose and content of the embedded page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"external-page.html"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"Weather Forecast"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Make them responsive
&lt;/h4&gt;

&lt;p&gt;Ensure that iframes are responsive and adapt well to different screen sizes and resolutions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"wrapper"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;'some url'&lt;/span&gt; &lt;span class="na"&gt;frameborder=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;allowfullscreen&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.wrapper&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;56.25%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* 16:9 */&lt;/span&gt;
  &lt;span class="nl"&gt;padding-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;25px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.wrapper&lt;/span&gt; &lt;span class="nt"&gt;iframe&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Provide a fallback option
&lt;/h4&gt;

&lt;p&gt;In some cases, iframes may not be supported or accessible for certain users or devices. To ensure that all users can access the essential information, provide a fallback option.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"external-page.html"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"fallback-image.jpg"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Fallback Image: Content Not Available"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;If you are unable to view the content, please try accessing it directly using the &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"external-page.html"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;fallback link&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Other improvements
&lt;/h2&gt;

&lt;h3&gt;
  
  
  19 - Make downloads descriptive
&lt;/h3&gt;

&lt;p&gt;Let me briefly touch upon this topic because occasionally we encounter tricky situations that can confuse users.&lt;/p&gt;

&lt;p&gt;This tip is basically use a &lt;strong&gt;descriptive link text, provide the file extension and the file size&lt;/strong&gt; (if possible).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"document.pdf"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Download the User Manual (PDF, 2.5MB)&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  20 - Create a link to bypass blocks
&lt;/h3&gt;

&lt;p&gt;Bypass blocks are essential in web accessibility. They allow users to skip repetitive or non-essential content and navigate directly to the main content of a webpage.&lt;/p&gt;

&lt;p&gt;An example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#main-content"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"skip-link"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Skip to Main Content&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.skip-link&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;fixed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;9999&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#42b983&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.skip-link&lt;/span&gt;&lt;span class="nd"&gt;:not&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;:focus&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nd"&gt;:not&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nd"&gt;:active&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-9999px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-9999px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.skip-link&lt;/span&gt;&lt;span class="nd"&gt;:focus&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#0066cc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The skip link is positioned &lt;code&gt;fixed&lt;/code&gt; and visible initially. However, I use the &lt;code&gt;:not(:focus):not(:active)&lt;/code&gt; selector, so it is hidden &lt;code&gt;(position: absolute; top: -9999px; left: -9999px;)&lt;/code&gt; for mouse users.&lt;/p&gt;

&lt;p&gt;It only becomes visible when it receives focus or is active, following the styles defined in the &lt;code&gt;:focus&lt;/code&gt; selector.&lt;/p&gt;

&lt;p&gt;This way, the skip link will be accessible and hidden for mouse users while remaining visible and functional for keyboard users.&lt;/p&gt;

&lt;p&gt;You can test it out for yourself on dev.to :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F227agn3foq5956x1ah9c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F227agn3foq5956x1ah9c.jpg" alt="skip to content button inside dev.to"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Last words
&lt;/h2&gt;

&lt;p&gt;So there you have it! We've covered what I believe are the top 20 must-know tips for web accessibility. Special thanks to &lt;a class="mentioned-user" href="https://dev.to/pablo_medina"&gt;@pablo_medina&lt;/a&gt; and &lt;a class="mentioned-user" href="https://dev.to/juanpabloamador"&gt;@juanpabloamador&lt;/a&gt; for their feedback!&lt;/p&gt;

&lt;p&gt;The next article in the series will be about "Common accessibility challenges our team has faced". Stay tuned!&lt;/p&gt;

&lt;p&gt;And remember, making your website accessible is not just a good practice, &lt;strong&gt;it is the right thing to do&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46h91w549md139kmu2jn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46h91w549md139kmu2jn.jpg" alt="two hands reaching out to help each other"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This post may be long but I hope you have learned something new from among all. If you think this might help other people, please hit the like button so that others can read it. ❤️&lt;/p&gt;

&lt;p&gt;If you have any thoughts or questions, feel free to leave a comment!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>What framework should I use to create an accessible component library?</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Wed, 05 Jul 2023 13:16:26 +0000</pubDate>
      <link>https://dev.to/ismaestro/what-framework-should-i-use-to-create-a-component-library-1o3d</link>
      <guid>https://dev.to/ismaestro/what-framework-should-i-use-to-create-a-component-library-1o3d</guid>
      <description>&lt;p&gt;So I need to create a component library, and the requirements are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Components must be accessible. Be careful with this. More info &lt;a href="https://alice.pages.igalia.com/blog/how-shadow-dom-and-accessibility-are-in-conflict/"&gt;here&lt;/a&gt;, &lt;a href="https://coryrylan.com/blog/accessibility-with-id-referencing-and-shadow-dom"&gt;here&lt;/a&gt;, and &lt;a href="https://nolanlawson.com/2022/11/28/shadow-dom-and-accessibility-the-trouble-with-aria/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Components must work with different technologies, like, SSR and SPAs like Angular.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The library has to be lightweight.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Candidates: Stencil, Lit, FAST, Solid, anything else?&lt;/p&gt;

&lt;p&gt;I think Lit does not allow removing shadow dom (because of accessibility) and use slots. Does Stencil?&lt;/p&gt;

&lt;p&gt;I need opinions!!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>discuss</category>
      <category>programming</category>
    </item>
    <item>
      <title>Designing for All: Achieving Web Accessibility in Web Design</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Thu, 29 Jun 2023 10:40:10 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/designing-for-all-achieving-web-accessibility-in-web-design-32je</link>
      <guid>https://dev.to/playfulprogramming/designing-for-all-achieving-web-accessibility-in-web-design-32je</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of contents&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clear and Logical Structure&lt;/li&gt;
&lt;li&gt;Typography Guidelines&lt;/li&gt;
&lt;li&gt;Responsive Design&lt;/li&gt;
&lt;li&gt;
Designing with Color in Mind: A Key Focus Area

&lt;ul&gt;
&lt;li&gt;Color Contrast&lt;/li&gt;
&lt;li&gt;Alternative indicators&lt;/li&gt;
&lt;li&gt;Error messages&lt;/li&gt;
&lt;li&gt;Designing in &lt;strong&gt;greyscale&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Consistent Navigation&lt;/li&gt;

&lt;li&gt;Consistency in UI Components&lt;/li&gt;

&lt;li&gt;Non-Motion-based Solutions&lt;/li&gt;

&lt;li&gt;Focus Indication&lt;/li&gt;

&lt;li&gt;Optimal Touch Target Size and Spacing&lt;/li&gt;

&lt;li&gt;Open Links in New Window &lt;/li&gt;

&lt;li&gt;Creating Links with Purpose&lt;/li&gt;

&lt;li&gt;Animations and Flashing Content&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Continuing with the next part of this series, we'll learn more  about designing accessible web pages. It is crucial to prioritize accessibility in our designs.&lt;/p&gt;

&lt;p&gt;On our path to achieving the double A, we sometimes encounter issues during development, which are actually problems that stem from earlier, from the design phase.&lt;/p&gt;

&lt;p&gt;Here I'm going to explain the most important aspects, a designer must know and fulfil when making accessible designs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clear and Logical Structure
&lt;/h2&gt;

&lt;p&gt;A logical structure helps users with screen readers or assistive technologies understand and navigate the content easily.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ensure your page titles are &lt;strong&gt;descriptive and informative&lt;/strong&gt;. Use informative headings and labels for forms and interactive controls. This is particularly beneficial for users with limited short-term memory, low vision, or difficulty reading text. These users may &lt;strong&gt;only see a few words&lt;/strong&gt; at a time, so &lt;strong&gt;clear headings&lt;/strong&gt; and labels help them understand the purpose of each section effectively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Also, generate content that possesses the ability to be showcased in various formats, such as a simplified layout, while &lt;strong&gt;retaining both its information and structure&lt;/strong&gt;. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Very important, ensure clarity &lt;strong&gt;in all your writing&lt;/strong&gt;, not only headings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fva7kexw966z1pmtpcwn4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fva7kexw966z1pmtpcwn4.png" alt="example headings in order. First H1 then the rest by index." width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Typography Guidelines
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Leave a space following paragraphs that is at least 2 times the font size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Line height (line spacing) should be a minimum of 1.5 times the font size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maintain word spacing of at least 0.16 times the font size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set letter spacing (tracking) to a minimum of 0.12 times the font size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Avoid using font sizes smaller than 10 points.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ioyi94m0s5vd6tmfxyx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ioyi94m0s5vd6tmfxyx.png" alt="an example of a typography that is accessible" width="724" height="474"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Responsive Design
&lt;/h2&gt;

&lt;p&gt;This is very obvious, but create a responsive design that adapts to different screen sizes and devices. It ensures that users can access and navigate the website seamlessly on desktops, tablets, and mobile devices. &lt;/p&gt;

&lt;p&gt;I prefer developing using &lt;strong&gt;mobile-first approach&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4fsb8urdaf1luox9qhxm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4fsb8urdaf1luox9qhxm.png" alt="a desktop monitor, tablet and mobile devices" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Designing with Color in Mind: A Key Focus Area
&lt;/h2&gt;

&lt;p&gt;While color is undoubtedly important in web design, it is crucial to ensure that it does not create barriers for individuals with visual impairments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Color Contrast
&lt;/h3&gt;

&lt;p&gt;Ensure sufficient contrast between text and background colors to &lt;strong&gt;make content readable&lt;/strong&gt;. Consider users with visual impairments and use color contrast checkers to verify that your color combinations meet accessibility standards.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ensure that text maintains a color contrast ratio of at least 4.5:1 with its background.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Icons and graphical objects should have a contrast ratio of at least 3:1 when compared to adjacent color(s).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Large-scale text should have a contrast ratio of at least 3:1.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the text is integrated &lt;strong&gt;within a logo or brand name&lt;/strong&gt;, there is no minimum contrast requirement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuemg5kq5toe62wkavblx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuemg5kq5toe62wkavblx.png" alt="Four colors with text above them in different colors" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Alternative indicators
&lt;/h3&gt;

&lt;p&gt;Avoid relying solely on color to convey information. Provide additional indicators such as &lt;strong&gt;icons, labels, or patterns&lt;/strong&gt; to ensure that users with color vision deficiencies can still understand and interact with the content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb43qy5jpxd4f3foyro01.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb43qy5jpxd4f3foyro01.png" alt="a bunch of icons" width="600" height="360"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Error messages
&lt;/h3&gt;

&lt;p&gt;If color is used to indicate status, error messages, or alerts, ensure that there is also a non-color element or text-based explanation accompanying it. This ensures that users who cannot perceive color differences can still comprehend the information being conveyed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdd1mxzpvcavk8sp91pnt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdd1mxzpvcavk8sp91pnt.png" alt="three inputs showing error not only with color red" width="540" height="204"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Designing in &lt;strong&gt;greyscale&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One effective technique in achieving accessibility is &lt;strong&gt;designing in greyscale&lt;/strong&gt;, where colors are removed and the website is presented in shades of grey.&lt;/p&gt;

&lt;p&gt;This approach ensures that the website's content and visual elements can still be perceived and understood by individuals with visual impairments or color vision deficiencies. Designing in greyscale allows for a &lt;strong&gt;focus on contrast&lt;/strong&gt;, &lt;strong&gt;typography&lt;/strong&gt;, and &lt;strong&gt;clear visual hierarchy&lt;/strong&gt;, enabling an accessible and user-friendly experience for a wider range of users.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fljuzbm6atssx9w2ds88y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fljuzbm6atssx9w2ds88y.png" alt="a design in greyscale" width="800" height="790"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use color simulation tools to experience how your website appears to individuals with different types of color vision deficiencies. These tools can help identify potential issues and allow for necessary adjustments to improve accessibility.&lt;/p&gt;




&lt;h2&gt;
  
  
  Consistent Navigation
&lt;/h2&gt;

&lt;p&gt;Maintain a consistent and predictable navigation structure throughout the website. &lt;strong&gt;Clear labels, logical menus, and breadcrumb trails&lt;/strong&gt; make it easier for users to locate and access different sections of the website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpfotq9c1tyst2ot8cy8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpfotq9c1tyst2ot8cy8.png" alt="some breadcrumbs in a webpage" width="800" height="526"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Consistency in UI Components
&lt;/h2&gt;

&lt;p&gt;It is important to ensure that components with similar functionality maintain consistency throughout the website or application. Establishing a &lt;strong&gt;design system, pattern library, or style guide&lt;/strong&gt; is highly recommended to emphasize and maintain consistency within the team.&lt;/p&gt;

&lt;p&gt;This enhances usability, reduces cognitive load, and establishes a cohesive visual identity &lt;strong&gt;for the brand&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Additionally, a design system or style guide streamlines the development process, promotes collaboration, and facilitates efficient teamwork. &lt;/p&gt;

&lt;p&gt;We use &lt;a href="https://storybook.js.org/" rel="noopener noreferrer"&gt;storybook&lt;/a&gt; in our development cycle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwp6krz9j7gfhk2c9uyr6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwp6krz9j7gfhk2c9uyr6.png" alt="an example of styleguide" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Non-Motion-based Solutions
&lt;/h2&gt;

&lt;p&gt;If you rely on device motion to activate a specific feature, it is essential to offer &lt;strong&gt;an alternative&lt;/strong&gt; user interface for accessing that feature. Alternatively, allow users to disable the motion activation of the feature altogether.&lt;/p&gt;




&lt;h2&gt;
  
  
  Focus Indication
&lt;/h2&gt;

&lt;p&gt;Provide clear visual cues to indicate the focus state of interactive elements, such as &lt;strong&gt;links, buttons, and form fields&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0d4ms90v48s18wjcmn6h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0d4ms90v48s18wjcmn6h.png" alt="buttons with different states. Hover, Focus, Disabled and Enabled" width="375" height="375"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Optimal Touch Target Size and Spacing
&lt;/h2&gt;

&lt;p&gt;In web accessibility, it is recommended that the size of pointer targets for interactive elements be at &lt;strong&gt;least 44x44 pixels&lt;/strong&gt;, ensuring easy and accurate interaction. However, there are a few exceptions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Equivalent:&lt;/strong&gt; If the target can be accessed through an equivalent link or control on the same page, &lt;strong&gt;which is also&lt;/strong&gt; at least 44x44 pixels, the size requirement can be met by the alternative element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inline:&lt;/strong&gt; If the target is embedded within a sentence or a block of text, the size requirement may be adjusted &lt;strong&gt;to fit within the context&lt;/strong&gt;, considering the surrounding content.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xof8g34rdflvr5jyilj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6xof8g34rdflvr5jyilj.png" alt="showcase of a button and its spacing inside a pagination component" width="600" height="350"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Open Links in New Window
&lt;/h2&gt;

&lt;p&gt;Opening links in new windows can be &lt;strong&gt;disorienting&lt;/strong&gt; for users, especially those who rely on screen readers or have cognitive disabilities. It can &lt;strong&gt;disrupt&lt;/strong&gt; their browsing experience and make it challenging to navigate back to the original page.&lt;/p&gt;

&lt;p&gt;Instead, it is best to &lt;strong&gt;allow users to control how they open links&lt;/strong&gt; by providing clear and descriptive link text, and letting them decide whether to open links in the same window or a new tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvui8shb0gm55v6b635p0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvui8shb0gm55v6b635p0.png" alt="the icon that shows that the link opens in new window" width="200" height="200"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Creating Links with Purpose
&lt;/h2&gt;

&lt;p&gt;Use descriptive and meaningful links instead of generic phrases like 'Click here' or content-free text such as 'More details' when applying them to a list of links.&lt;/p&gt;




&lt;h2&gt;
  
  
  Animations and Flashing Content
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Avoid&lt;/strong&gt; using excessive or intense animations, especially those with high contrast, rapid movement, or frequent flashing. If animations are necessary, provide users with options &lt;strong&gt;to control or pause them&lt;/strong&gt;, allowing individuals to navigate and consume content at their own pace.&lt;/p&gt;

&lt;p&gt;Additionally, ensure that any essential information presented in animations or flashing content is also available &lt;strong&gt;through non-animated means&lt;/strong&gt;, such as descriptive text or alternative formats. This guarantees that users who cannot perceive or may be affected by the animations can still access and understand the information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lxi65mdmeuce7bi8jgm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5lxi65mdmeuce7bi8jgm.gif" alt="a carousel going too fast" width="511" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Furthermore, &lt;strong&gt;provide the option&lt;/strong&gt; for users to pause, stop, or hide any moving, blinking, scrolling, or automatically updating elements within the content, such as dynamically-updating news tickers or chat messages.&lt;/p&gt;




&lt;p&gt;Remember, designing an accessible website is an ongoing process that requires continuous evaluation and improvement. By considering these items, you can ensure that your websites are inclusive, user-friendly, and accessible to a diverse range of users.&lt;/p&gt;

&lt;p&gt;If we approach web accessibility from the beginning, developers, and most importantly, end users, will experience gratitude and satisfaction.&lt;/p&gt;




&lt;p&gt;I hope you have learned something new. If you think this might help other people, please hit the like button so that others can read it. ❤️&lt;/p&gt;

&lt;p&gt;If you have any thoughts or questions, feel free to leave a comment!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>design</category>
    </item>
    <item>
      <title>Beyond Barriers: 4 Key Reasons to Embrace Web Accessibility</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Thu, 29 Jun 2023 09:32:32 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/beyond-barriers-unlocking-the-benefits-of-web-accessibility-2l9n</link>
      <guid>https://dev.to/playfulprogramming/beyond-barriers-unlocking-the-benefits-of-web-accessibility-2l9n</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
Why you should care about web accessibility?

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inclusivity&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Different types of disabilities&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Legal and Ethical Obligations&lt;/strong&gt;&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Sectors with legal requirements&lt;/strong&gt;&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Improved User Experience&lt;/strong&gt;&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Search Engine Optimization (SEO)&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
Some examples

&lt;ul&gt;
&lt;li&gt;Semantic HTML Markup&lt;/li&gt;
&lt;li&gt;Alternative Text for Images&lt;/li&gt;
&lt;li&gt;Transcripts for Multimedia Content&lt;/li&gt;
&lt;li&gt;Responsive Design and Mobile Accessibility&lt;/li&gt;
&lt;li&gt;Improved User Experience&lt;/li&gt;
&lt;li&gt;Keyboard Accessibility&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Wrapping Up&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;Welcome to the world of &lt;a href="https://www.w3.org/WAI/fundamentals/accessibility-intro/" rel="noopener noreferrer"&gt;web accessibility&lt;/a&gt;, where you hold the power to create inclusive websites that leave no user behind.&lt;/p&gt;

&lt;p&gt;You're reading this article right now 'cause a year ago, my team had this goal to make the website we were working on double AA accessible and I'm gonna share my experiences with you.&lt;/p&gt;

&lt;p&gt;This series contains a total of 5 posts, which topics are:&lt;br&gt;
  1. Why you should create accessible websites.&lt;br&gt;
  2. First, create accessible designs.&lt;br&gt;
  3. Key fundamentals on Web Accessibility (in progress)&lt;br&gt;
  4. Common accessibility challenges we faced (in progress)&lt;br&gt;
  5. Accessibility tools you must know (in progress)&lt;/p&gt;

&lt;p&gt;So It's time to make the web accessible, one line of code at a time but first, let me give you &lt;strong&gt;four reasons&lt;/strong&gt; that should be enough to convince you that learning and continuously developing accessible websites is the way to go.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi2fsara5fusve11g3o7e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi2fsara5fusve11g3o7e.jpg" alt="a men hand writing in a braille keyboard"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why you should care about web accessibility?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Inclusivity&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Accessibility ensures that individuals with disabilities can access and use websites without barriers. By making your website accessible, you open doors to &lt;a href="https://www.w3.org/WAI/people-use-web/abilities-barriers/" rel="noopener noreferrer"&gt;a wider audience&lt;/a&gt; and create an inclusive online environment where everyone can participate, engage, and benefit from the information and services you provide. &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Different types of disabilities&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visual disabilities&lt;/strong&gt;: Users who are blind, have low vision, or experience color blindness.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hearing disabilities&lt;/strong&gt;: Users who are deaf or hard of hearing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Motor disabilities&lt;/strong&gt;: Users with motor impairments that affect their ability to use a mouse or keyboard effectively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cognitive disabilities&lt;/strong&gt;: Users with cognitive impairments that affect their comprehension or ability to process information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Autism spectrum disorder (ASD)&lt;/strong&gt;: Individuals with ASD may have unique sensory and communication needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Elderly users&lt;/strong&gt;: Older adults may experience age-related disabilities such as decreased vision, hearing loss, or reduced motor skills.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learning disabilities&lt;/strong&gt;: Users with learning disabilities, such as dyslexia or attention deficit hyperactivity disorder (ADHD), may face challenges in processing and understanding information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speech impairments&lt;/strong&gt;: Users with speech impairments may have difficulty speaking or communicating verbally.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dkswe4avmhqd9yw1eu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9dkswe4avmhqd9yw1eu7.png" alt="a graph showing different levels of disabilities"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Legal and Ethical Obligations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Many countries have laws and regulations that require websites to be accessible. If you're in the EU, take a moment to read up on the &lt;a href="https://ec.europa.eu/social/main.jsp?catId=1202" rel="noopener noreferrer"&gt;European Accessibility Act&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Sectors with legal requirements&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Public Sector&lt;/strong&gt;: government websites, portals, and online services provided by federal, state, or local governments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Education&lt;/strong&gt;: schools, colleges, and universities, often have legal obligations to ensure their websites and online learning platforms are accessible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Healthcare&lt;/strong&gt;: hospitals, clinics, and healthcare providers, may have legal obligations to ensure individuals with disabilities can access vital healthcare information, make appointments, access medical records, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Banking and Financial Services&lt;/strong&gt;: banks, financial institutions, and insurance companies are often required to be  accessible so users can access banking services, manage accounts, make transactions, and access financial information independently.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3kamt6p9ag4k5vle5m5f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3kamt6p9ag4k5vle5m5f.png" alt="accesibility logo and a judge gavel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Travel and Hospitality&lt;/strong&gt;: airlines, hotels, and travel agencies, may have legal obligations to provide accessible booking systems, airline websites, hotel reservations, and travel information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Entertainment and Media&lt;/strong&gt;: movie theaters, streaming services, and news websites, often have legal requirements to make their digital content accessible. This includes providing closed captions, audio descriptions, and accessible video players to ensure individuals with disabilities can access and enjoy their content.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By ensuring accessibility compliance, you not only meet legal obligations &lt;strong&gt;but also demonstrate a commitment to ethical practices&lt;/strong&gt;, promoting equal access and equal opportunities for all users.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Improved User Experience&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Accessibility often goes hand in hand with a better user experience for all users, not just those with disabilities. Elements such as clear navigation, well-structured content, and sufficient color contrast benefit everyone by making websites easier to understand, navigate, and interact with.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73o8plb5p9u5gj0u4tvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F73o8plb5p9u5gj0u4tvc.png" alt="buttons with small spaces and other that is accessible"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An accessible website streamlines user interactions, making it easier and more efficient for users to find information, complete tasks, and achieve their goals. By removing barriers and providing accessible design elements, users can navigate through the website seamlessly, locate desired content quickly, and interact with features effectively.&lt;/p&gt;

&lt;p&gt;A website that is accessible and usable generates higher user engagement and satisfaction. When users can easily access and interact with the content, they are &lt;strong&gt;more likely to&lt;/strong&gt; stay on the site, explore further, and accomplish their objectives.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy9snkk67v164k5c6vpze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy9snkk67v164k5c6vpze.png" alt="An Accessible Sidewalk Designed for Wheelchair Users"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Search Engine Optimization (SEO)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let's say you are not convinced yet about the efford that this requires and the benefits we all get. Well, here's one &lt;strong&gt;significant advantage&lt;/strong&gt; for the website.&lt;/p&gt;

&lt;p&gt;Accessibility features align with SEO best practices. For instance, providing alternative text for images helps search engines understand the content, improving your website's visibility and ranking in search results. Additionally, accessible websites tend to have better performance, mobile optimization, and clean code, which positively impact SEO efforts.&lt;/p&gt;

&lt;h4&gt;
  
  
  Some examples
&lt;/h4&gt;

&lt;h5&gt;
  
  
  Semantic HTML Markup
&lt;/h5&gt;

&lt;p&gt;Using &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML" rel="noopener noreferrer"&gt;semantic HTML&lt;/a&gt; tags, such as heading tags (H1, H2, etc.) and proper markup for lists and tables, improves both web accessibility and SEO. Screen readers rely on these tags to navigate and understand page structure, while search engines interpret them to determine the importance and context of content.&lt;/p&gt;

&lt;h5&gt;
  
  
  Alternative Text for Images
&lt;/h5&gt;

&lt;p&gt;Providing descriptive alternative text (alt text) for images not only makes them accessible to visually impaired users but also allows search engines to understand the image context. This can improve the website's visibility &lt;strong&gt;in image search results&lt;/strong&gt; and contribute to overall SEO efforts.&lt;/p&gt;

&lt;h5&gt;
  
  
  Transcripts for Multimedia Content
&lt;/h5&gt;

&lt;p&gt;Including transcripts for audio and video content not only makes the content accessible to users who are deaf or hard of hearing but also provides textual content that search engines can index. Transcripts &lt;strong&gt;can increase keyword relevance&lt;/strong&gt;, improve search rankings, and attract more organic traffic to the website.&lt;/p&gt;

&lt;h5&gt;
  
  
  Responsive Design and Mobile Accessibility
&lt;/h5&gt;

&lt;p&gt;Since mobile-friendliness is a crucial factor in search engine algorithms, an accessible and mobile-responsive website can positively impact SEO rankings.&lt;/p&gt;

&lt;h5&gt;
  
  
  Improved User Experience
&lt;/h5&gt;

&lt;p&gt;Search engines value positive user experiences and tend to reward websites that prioritize accessibility and user-centric design. This can lead to increased user engagement, longer visit durations, and lower bounce rates, all of which can positively impact SEO performance.&lt;/p&gt;

&lt;h5&gt;
  
  
  Keyboard Accessibility
&lt;/h5&gt;

&lt;p&gt;This also improves SEO because search engines assess the website's accessibility and usability, taking into account keyboard accessibility as a positive user experience signal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4dlytpchb3hli19wxu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4dlytpchb3hli19wxu7.png" alt="A hat, a website with a code snippet"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;I think these examples illustrate the importance of always prioritizing accessibility when creating your websites, so you enhance inclusivity, meet legal requirements, improve the user experience, and boost your online presence through better SEO. &lt;/p&gt;

&lt;p&gt;Ultimately, it's a &lt;strong&gt;win-win situation&lt;/strong&gt; for both users and website owners.&lt;/p&gt;




&lt;p&gt;I hope you have learned something new. If you think this might help other people, please hit the like button so that others can read it. ❤️&lt;/p&gt;

&lt;p&gt;If you have any thoughts or questions, feel free to leave a comment!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>Increase coverage on every feature with Karma/Jest and Husky</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Thu, 23 Feb 2023 16:43:59 +0000</pubDate>
      <link>https://dev.to/ismaestro/increase-coverage-on-every-feature-with-karmajest-and-husky-1jfc</link>
      <guid>https://dev.to/ismaestro/increase-coverage-on-every-feature-with-karmajest-and-husky-1jfc</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check your coverage percentage&lt;/li&gt;
&lt;li&gt;Execute tests before pushing&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Have you ever add new features and after some time, coverage seems to be decreasing, even if you are creating or updating some tests? &lt;/p&gt;

&lt;p&gt;I'm going to explain how we can always be sure that coverage increase and not the opposite. It's a combination of two things:&lt;/p&gt;

&lt;h2&gt;
  
  
  Check your coverage percentage
&lt;/h2&gt;

&lt;p&gt;First, we need to be sure that coverage &lt;strong&gt;does not decrease&lt;/strong&gt; over a certain percentage.&lt;/p&gt;

&lt;p&gt;This is an example for those using &lt;a href="https://github.com/karma-runner/karma"&gt;Karma&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// karma.conf.js&lt;/span&gt;
&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;
    &lt;span class="na"&gt;coverageReporter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="p"&gt;...&lt;/span&gt;
      &lt;span class="na"&gt;check&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;global&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;statements&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;42.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;lines&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;44.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;41.4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;functions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;26.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or if you are using &lt;a href="https://jestjs.io/docs/configuration#coveragethreshold-object"&gt;Jest&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// jest.config.js&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;jest&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coverageThreshold&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;global&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;branches&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;functions&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lines&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;statements&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will provoke the command to &lt;strong&gt;fail&lt;/strong&gt; (usually npm test or equivalent), if &lt;strong&gt;at least&lt;/strong&gt; one of them does not reach the minimum required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Execute tests before pushing
&lt;/h2&gt;

&lt;p&gt;The second thing you have to do, is to run all your tests just &lt;strong&gt;before&lt;/strong&gt; pushing changes to the repository.&lt;br&gt;
This is just an idea, maybe you want to do it before you commit those changes, I leave it to you.&lt;/p&gt;

&lt;p&gt;To do that, I'm going to use &lt;a href="https://github.com/typicode/husky"&gt;husky&lt;/a&gt;. You just need to install it, and then create your first hook like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// .husky/pre-push&lt;/span&gt;&lt;span class="cp"&gt;
#!/bin/sh
&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$(dirname &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="nx"&gt;$0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;)/_/husky.sh&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="p"&gt;[&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$CI&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;exit&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;

&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="nx"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have an angular app where you can find this examples which is using karma and husky in &lt;a href="https://github.com/Ismaestro/angular-example-app"&gt;this repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope you have learned something new. If you think this might help other people, please hit the like button so that others can read it. ❤️&lt;/p&gt;

&lt;p&gt;If you have any thoughts or questions, feel free to leave a comment!&lt;/p&gt;

</description>
      <category>testing</category>
      <category>programming</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>innerText vs textContent in 2023</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Tue, 07 Feb 2023 12:00:00 +0000</pubDate>
      <link>https://dev.to/ismaestro/innertext-vs-textcontent-in-2023-1jf8</link>
      <guid>https://dev.to/ismaestro/innertext-vs-textcontent-in-2023-1jf8</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The basics&lt;/li&gt;
&lt;li&gt;innerText&lt;/li&gt;
&lt;li&gt;textContent&lt;/li&gt;
&lt;li&gt;
Other differences

&lt;ul&gt;
&lt;li&gt;Text-transform property&lt;/li&gt;
&lt;li&gt;Setter&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Conclusion&lt;/li&gt;

&lt;/ul&gt;




&lt;p&gt;What do I need to use? innerText or textContent? Here I´m going to analyse the differences&lt;br&gt;
between both, and some hidden abilities that you may not know.&lt;/p&gt;

&lt;p&gt;The code is available in this &lt;strong&gt;&lt;a href="https://stackblitz.com/edit/innertext-vs-textcontent?devToolsHeight=33&amp;amp;file=index.html,index.js" rel="noopener noreferrer"&gt;stackblitz&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  The basics
&lt;/h2&gt;

&lt;p&gt;Giving this HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"display: none"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;HIDDEN SECTION&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&amp;lt;style&amp;gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt; Paragraph with line &lt;span class="nt"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;break, spaces     and bold style.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;this is a script tag&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;containerDiv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#container&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;textNode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createTextNode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  innerText
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;It is used to get the rendered text of &lt;strong&gt;an&lt;/strong&gt; element.&lt;/li&gt;
&lt;li&gt;Does not include hidden elements like styles or scripts. Requires layout to calculate the result.&lt;/li&gt;
&lt;li&gt;Not available for text nodes, only for HTMLElement objects.&lt;/li&gt;
&lt;li&gt;Evaluates breaking lines tags. &amp;lt;br&amp;gt; -&amp;gt; \n&lt;/li&gt;
&lt;li&gt;No spaces will be concatenated.&lt;/li&gt;
&lt;li&gt;More performance-heavy. Take it wisely. In general, users won't notice the difference.&lt;/li&gt;
&lt;li&gt;98.61% supported. &lt;a href="https://caniuse.com/innertext" rel="noopener noreferrer"&gt;Can I use&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;containerDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// Paragraph with line&lt;/span&gt;
&lt;span class="c1"&gt;// break and bold style.&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;textNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// undefined&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  textContent
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;It represents the full-text content of an element &lt;strong&gt;and&lt;/strong&gt; its descendants.&lt;/li&gt;
&lt;li&gt;Includes hidden elements like styles or scripts.&lt;/li&gt;
&lt;li&gt;Available for all Node objects.&lt;/li&gt;
&lt;li&gt;Evaluates control characters like \n.&lt;/li&gt;
&lt;li&gt;Can prevent XSS attacks. More info &lt;a href="https://dom.spec.whatwg.org/#dom-node-textcontent" rel="noopener noreferrer"&gt;in this dom spec&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;98.91% supported. &lt;a href="https://caniuse.com/textcontent" rel="noopener noreferrer"&gt;Can I use&lt;/a&gt;. Be careful with IE 6-8.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;containerDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// &lt;/span&gt;
&lt;span class="c1"&gt;// HIDDEN SECTION&lt;/span&gt;
&lt;span class="c1"&gt;// &lt;/span&gt;
&lt;span class="c1"&gt;// &lt;/span&gt;
&lt;span class="c1"&gt;// p {&lt;/span&gt;
&lt;span class="c1"&gt;//   font-weight: bold;&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;
&lt;span class="c1"&gt;// &lt;/span&gt;
&lt;span class="c1"&gt;// Paragraph with line break, spaces and bold style.&lt;/span&gt;
&lt;span class="c1"&gt;// &lt;/span&gt;
&lt;span class="c1"&gt;// &lt;/span&gt;
&lt;span class="c1"&gt;// console.log('this is a script tag');&lt;/span&gt;
&lt;span class="c1"&gt;// &lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;textNode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// word1&lt;/span&gt;
&lt;span class="c1"&gt;// word2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Other differences
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Text-transform property
&lt;/h3&gt;

&lt;p&gt;In this case, we are going to use &lt;em&gt;text-transform&lt;/em&gt; and this is what happens:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"transform"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"text-transform: uppercase;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;text uppercase&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;transformDiv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#transform&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// innerText&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;transformDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;innerText&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// TEXT UPPERCASE&lt;/span&gt;

&lt;span class="c1"&gt;// textContent&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;transformDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// text uppercase&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setter
&lt;/h3&gt;

&lt;p&gt;And what happens if we set textContent to some random text? You will lose all children nodes!&lt;br&gt;
In fact, this is a very simple and fast way to delete them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"setter"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;style&amp;gt;span&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt; basic &lt;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;text&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;setterDiv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#setter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;setterDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// span {font-weight: bold;} basic text&lt;/span&gt;

&lt;span class="nx"&gt;setterDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;some other text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;setterDiv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// some other text&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, we lose all nodes inside the container.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So if you are trying to simply get the text from an element you can use &lt;strong&gt;innerText&lt;/strong&gt;.&lt;br&gt;
Consider also the use of innerHTML, which lets you work with HTML rich text and doesn't automatically encode and decode text, depending on what are your needs. Otherwise, &lt;strong&gt;textContent&lt;/strong&gt; is the way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzg9bjz03iihojzk7tixt.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzg9bjz03iihojzk7tixt.webp" alt="a happy mandalorian" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you have learned something new. If you think this might help other people, please hit the like button so that others can read it. ❤️&lt;/p&gt;

&lt;p&gt;If you have any thoughts or questions, feel free to leave a comment!&lt;/p&gt;

</description>
      <category>announcement</category>
      <category>devto</category>
      <category>community</category>
    </item>
    <item>
      <title>Implementing Standalone Components in Angular 15</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Mon, 16 Jan 2023 20:57:48 +0000</pubDate>
      <link>https://dev.to/ismaestro/implementing-standalone-components-in-angular-15-3c2p</link>
      <guid>https://dev.to/ismaestro/implementing-standalone-components-in-angular-15-3c2p</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bootstrap&lt;/li&gt;
&lt;li&gt;App Component, but standalone&lt;/li&gt;
&lt;li&gt;Lazy loading routes&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;In this article, I'm going to show you the most important parts to create an angular app using only standalone components. Yes, &lt;strong&gt;no ngmodule is needed&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You have all the code available in &lt;a href="https://github.com/Ismaestro/angular-example-app" rel="noopener noreferrer"&gt;this repo&lt;/a&gt;, which tries to represent &lt;strong&gt;a real-world app&lt;/strong&gt;. If you are learning Angular, give it a try, and give me your thoughts!&lt;/p&gt;

&lt;p&gt;DEMO HERE: &lt;a href="https://angular-example-app.netlify.app/" rel="noopener noreferrer"&gt;https://angular-example-app.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fismaestro%2Fimage%2Fupload%2Fv1673822678%2Fismaelramos%2Fposts%2Fimplementing-standalone-components-in-angular-15%2Fangular4_v1nfsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Fismaestro%2Fimage%2Fupload%2Fv1673822678%2Fismaelramos%2Fposts%2Fimplementing-standalone-components-in-angular-15%2Fangular4_v1nfsn.png" title="Angular logo" alt="image of angular logo" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bootstrap
&lt;/h2&gt;

&lt;p&gt;The most important change is inside the &lt;strong&gt;src/main.ts&lt;/strong&gt; file. First of all, we need to bootstrap the application in a different way:&lt;/p&gt;

&lt;p&gt;Before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;platformBrowserDynamic&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;bootstrapModule&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;AppModule&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;importProvidersFrom&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;bootstrapApplication&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/platform-browser&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;provideRouter&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@angular/router&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;

&lt;span class="nf"&gt;bootstrapApplication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;AppComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;providers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;importProvidersFrom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;HttpClientModule&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nf"&gt;provideRouter&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;HomePageComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;pathMatch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;full&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;404&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Error404PageComponent&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;**&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;redirectTo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;404&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;]),&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we are using &lt;em&gt;provideRouter&lt;/em&gt; and &lt;em&gt;importProvidersFrom&lt;/em&gt;. These methods allow us to provide routes and extract providers from some modules without importing them.&lt;/p&gt;

&lt;h2&gt;
  
  
  App Component, but standalone
&lt;/h2&gt;

&lt;p&gt;Following the bootstrap configuration, we need to create components and enable the &lt;strong&gt;standalone flag&lt;/strong&gt;. The &lt;em&gt;app.component.ts&lt;/em&gt; looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;styleUrls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.component.scss&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;RouterOutlet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;NgIf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...],&lt;/span&gt;
  &lt;span class="na"&gt;standalone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AppComponent&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nx"&gt;OnInit&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how can we import other standalone components directly, and even other ngmodules, like for example &lt;em&gt;ReactiveFormsModule&lt;/em&gt;. Other than that, everything inside the component works as before.&lt;br&gt;
Here another example of component using other standalone components and modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-edit-profile&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./edit-profile.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;standalone&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;ReactiveFormsModule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;TrimDirective&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;FormErrorsComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;LowercaseDirective&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;NgIf&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;EditProfileComponent&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nx"&gt;OnInit&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Lazy loading routes
&lt;/h2&gt;

&lt;p&gt;Lastly, I'm going to show you how to lazy loading routes. You have to do it while defining the bootstrap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;auth&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;loadChildren&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app/modules/auth/auth.routes&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mod&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;mod&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AUTH_ROUTES&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here I'm using a constant called AUTH_ROUTES to hold my auth routes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;authPaths&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;auth&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;logIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;log-in&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;register&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;logout&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;authRoutes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;logIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logIn&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;register&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AUTH_ROUTES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Route&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;LogInPageComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;canActivate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;NoAuthGuard&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RegisterPageComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;canActivate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;NoAuthGuard&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;authPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;LogoutPageComponent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;**&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;redirectTo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;appPaths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error404&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By doing this, I can refactor route names easily.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Remember&lt;/strong&gt;, you have a complete real world app in &lt;a href="https://github.com/Ismaestro/angular-example-app" rel="noopener noreferrer"&gt;this repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;DEMO HERE: &lt;a href="https://angular-example-app.netlify.app/" rel="noopener noreferrer"&gt;https://angular-example-app.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you have learned something new. If you think this might help other people, please hit the like button so that others can read it. ❤️&lt;/p&gt;

&lt;p&gt;If you have any thoughts or questions, feel free to leave a comment!&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>What do you think about my portfolio website?</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Thu, 31 Mar 2022 06:37:56 +0000</pubDate>
      <link>https://dev.to/ismaestro/what-do-you-think-about-my-portfolio-website-3ok7</link>
      <guid>https://dev.to/ismaestro/what-do-you-think-about-my-portfolio-website-3ok7</guid>
      <description>&lt;p&gt;&lt;a href="https://www.ismaelramos.dev/"&gt;ismaelramos.dev&lt;/a&gt;&lt;br&gt;
I released my website last week. Any suggestions? Do you like the design?&lt;/p&gt;

&lt;p&gt;(UPDATE)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We all agree the cookie consent is bothering a lot. I decided to remove analytics tools...&lt;/li&gt;
&lt;li&gt;The button to toggle the theme vision has been updated&lt;/li&gt;
&lt;li&gt;The timeline is now inverted&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>discuss</category>
      <category>showdev</category>
      <category>design</category>
      <category>webdev</category>
    </item>
    <item>
      <title>24 ideas to include in your Definition of Done</title>
      <dc:creator>Ismael Ramos 🚀</dc:creator>
      <pubDate>Tue, 29 Mar 2022 10:55:14 +0000</pubDate>
      <link>https://dev.to/ismaestro/24-ideas-to-include-in-your-definition-of-done-34kb</link>
      <guid>https://dev.to/ismaestro/24-ideas-to-include-in-your-definition-of-done-34kb</guid>
      <description>&lt;p&gt;&lt;strong&gt;Table of content&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User story double-checked&lt;/li&gt;
&lt;li&gt;Code is readable and clean&lt;/li&gt;
&lt;li&gt;Check if changes can affect several components&lt;/li&gt;
&lt;li&gt;Check if changes can affect several types of users&lt;/li&gt;
&lt;li&gt;No errors in the console&lt;/li&gt;
&lt;li&gt;Internationalization: all languages are filled&lt;/li&gt;
&lt;li&gt;Must be responsive&lt;/li&gt;
&lt;li&gt;Must be accessible&lt;/li&gt;
&lt;li&gt;HTML and CSS are valid&lt;/li&gt;
&lt;li&gt;Functionality tested in multiple browsers&lt;/li&gt;
&lt;li&gt;New metrics if necessary&lt;/li&gt;
&lt;li&gt;Code is bug-free&lt;/li&gt;
&lt;li&gt;Unit tests covering most of the branches and with meaningful expects&lt;/li&gt;
&lt;li&gt;End-to-end tests are passing&lt;/li&gt;
&lt;li&gt;Integration tests are passing&lt;/li&gt;
&lt;li&gt;Performance tests are passing&lt;/li&gt;
&lt;li&gt;Security standards have been met&lt;/li&gt;
&lt;li&gt;Any configuration, build changes, or model changes are documented&lt;/li&gt;
&lt;li&gt;Documentation: Confluence / Swagger / StoryBook / Readme&lt;/li&gt;
&lt;li&gt;Screenshot for the sprint demo&lt;/li&gt;
&lt;li&gt;Code review and functionality tested by team members&lt;/li&gt;
&lt;li&gt;Approved by QA&lt;/li&gt;
&lt;li&gt;Approved by stakeholders (customer, manager, product owner)&lt;/li&gt;
&lt;li&gt;Pipeline or build are passing&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;After a few years of being a software developer, I want to make a list of some tips and examples that you can include in the definition of done.&lt;/p&gt;

&lt;p&gt;I will keep an eye on the comments to add new items if necessary.&lt;/p&gt;

&lt;p&gt;Keep in mind that the best DoD is that one that &lt;strong&gt;has been agreed upon across the team&lt;/strong&gt;. The order is meant to be &lt;strong&gt;logical&lt;/strong&gt; from a &lt;strong&gt;dev perspective&lt;/strong&gt;, and some of them are &lt;strong&gt;front end specific&lt;/strong&gt;:&lt;/p&gt;

&lt;h2&gt;
  
  
  User story double-checked
&lt;/h2&gt;

&lt;p&gt;It could seem obvious but is not. Read the user story after you think everything is done, in case you have forgotten something.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code is readable and clean
&lt;/h2&gt;

&lt;p&gt;It would be also well-formatted, complying with the style guide used by the team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check if changes can affect several components
&lt;/h2&gt;

&lt;p&gt;Try not to break other functionalities while developing new features. If the changes affect other parts, validate all of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check if changes can affect several types of users
&lt;/h2&gt;

&lt;p&gt;It is common to have different roles (administrators, consumers, publishers, etc). Test the functionality against all of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  No errors in the console
&lt;/h2&gt;

&lt;p&gt;Sometimes everything seems to be ok, but there are still some errors in the console. If you are working in the frontend, maybe you&lt;br&gt;
can try a javascript error notifier chrome extension.&lt;/p&gt;

&lt;h2&gt;
  
  
  Internationalization: all languages are filled
&lt;/h2&gt;

&lt;p&gt;Be sure to check that all translations are ok and every i18n file contains the right language.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TvIoWNmI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/ismaestro/image/upload/v1648140711/ismaelramos/posts/24-ideas-to-include-in-your-definition-of-done/unnamed-21-1_wfl0cd_bpblsb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TvIoWNmI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/ismaestro/image/upload/v1648140711/ismaelramos/posts/24-ideas-to-include-in-your-definition-of-done/unnamed-21-1_wfl0cd_bpblsb.png" alt="internationalization meme!" width="498" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Must be responsive
&lt;/h2&gt;

&lt;p&gt;If the feature requires some new markup, it has to be responsive. Check also that there is no horizontal overflow.&lt;br&gt;
I wrote &lt;a href="https://www.ismaelramos.dev/how-to-test-if-there-is-any-element-outside-the-viewport-with-cypress/"&gt;an article&lt;/a&gt; just about this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Must be accessible
&lt;/h2&gt;

&lt;p&gt;Always keep in mind that what you do should be accessible and meet the &lt;a href="https://www.w3.org/WAI/standards-guidelines/wcag/"&gt;WCAG standard&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  HTML and CSS are valid
&lt;/h2&gt;

&lt;p&gt;Validate the HTML and CSS rules. You can use the W3C &lt;a href="https://validator.w3.org/"&gt;Markup Validation Service&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Functionality tested in multiple browsers
&lt;/h2&gt;

&lt;p&gt;Test always at least two browsers. Knowing the most used browsers for your app/website should help to run specific tests in that ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  New metrics if necessary
&lt;/h2&gt;

&lt;p&gt;Sometimes we need to measure how much value is being delivered to the user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code is bug-free
&lt;/h2&gt;

&lt;p&gt;Try to break the new feature. Test for basic and non-basic functionality issues. What if you fill forms with empty inputs, incorrect types, or too long texts?&lt;br&gt;
Also, if I'm developing a new endpoint and, I don't receive all the data? (try to use schema validations).&lt;/p&gt;

&lt;h2&gt;
  
  
  Unit tests covering most of the branches and with meaningful expects
&lt;/h2&gt;

&lt;p&gt;Try to cover at least 85% of the lines, and the majority of the branches. Expects have to make sense, and tests descriptions as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lCfM7EXc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/ismaestro/image/upload/v1648140711/ismaelramos/posts/24-ideas-to-include-in-your-definition-of-done/XG0cb7qTXiGHwHIhjWjJgRu7V3puAAaKwm3M-zcEDwY_agvyic_lfmbvo.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lCfM7EXc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/ismaestro/image/upload/v1648140711/ismaelramos/posts/24-ideas-to-include-in-your-definition-of-done/XG0cb7qTXiGHwHIhjWjJgRu7V3puAAaKwm3M-zcEDwY_agvyic_lfmbvo.webp" alt="shitty expects meme!" width="552" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  End-to-end tests are passing
&lt;/h2&gt;

&lt;p&gt;In our team we use Cypress, and sometimes it is required to make a new e2e test for some parts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integration tests are passing
&lt;/h2&gt;

&lt;p&gt;Very important if we don't want to break the application as a whole.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance tests are passing
&lt;/h2&gt;

&lt;p&gt;Very few projects that I've worked on had performance tests. But they are important and this could apply in some cases.&lt;br&gt;
&lt;a href="https://www.artillery.io/"&gt;Artillery&lt;/a&gt; saved my life in the past.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security standards have been met
&lt;/h2&gt;

&lt;p&gt;Ohhh this is hard but always having in mind security could save yours. We use SonarQube and &lt;a href="https://www.kiuwan.com/"&gt;Kiuwan&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Any configuration, build changes, or model changes are documented
&lt;/h2&gt;

&lt;p&gt;Maybe this user story requires doing something after everything is deployed. Or maybe there is a model change that has to be notified to other&lt;br&gt;
teams that depend on us. We use RFCs, but the user story should reflect those situations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Documentation: Confluence / Swagger / StoryBook / Readme
&lt;/h2&gt;

&lt;p&gt;It depends on the side you are working on, but documentation is your ally. Also meet the backend and frontend standards like Swagger, Storybook,&lt;br&gt;
or a basic Readme file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Screenshot for the sprint demo
&lt;/h2&gt;

&lt;p&gt;At the end of every sprint, you should be doing a demo to show and review new functionalities. Once you have everything ready, just make a screenshot&lt;br&gt;
before continuing with another user story.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code review and functionality tested by team members
&lt;/h2&gt;

&lt;p&gt;So you came through all of that, well done. Now leave other team members, ideally, more than two, review your work.&lt;br&gt;
Three persons think more and better than just one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approved by QA
&lt;/h2&gt;

&lt;p&gt;If you can have a QA team in charge of that part, perfect. They should give you the ok.&lt;/p&gt;

&lt;h2&gt;
  
  
  Approved by stakeholders (customer, manager, product owner)
&lt;/h2&gt;

&lt;p&gt;I've been in some teams in which ones the PO had to give his approval to continue.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pipeline or build are passing
&lt;/h2&gt;

&lt;p&gt;And if everything seems ready, just be sure the pipeline is passing and there is no problem with the build process as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qNebZoES--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/ismaestro/image/upload/v1648141438/ismaelramos/posts/24-ideas-to-include-in-your-definition-of-done/4tp6pw8qnw621_mb99xz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qNebZoES--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/ismaestro/image/upload/v1648141438/ismaelramos/posts/24-ideas-to-include-in-your-definition-of-done/4tp6pw8qnw621_mb99xz.jpg" alt="done meme!" width="640" height="480"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;So these are some ideas that maybe can fit in your definition of done. What do you think? What is yours?&lt;/p&gt;

&lt;p&gt;I hope you have learned something new. If you think this might help other people, please hit the like button so that others can read it. ❤️&lt;/p&gt;

&lt;p&gt;If you have any thoughts or questions, feel free to leave a comment!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
