<?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: Émile Perron</title>
    <description>The latest articles on DEV Community by Émile Perron (@emileperron).</description>
    <link>https://dev.to/emileperron</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%2F624340%2F24b2b84a-6d71-4ffc-940f-f021100cf7d6.jpg</url>
      <title>DEV Community: Émile Perron</title>
      <link>https://dev.to/emileperron</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/emileperron"/>
    <language>en</language>
    <item>
      <title>A Comprehensive Guide to Website Testing</title>
      <dc:creator>Émile Perron</dc:creator>
      <pubDate>Tue, 29 Nov 2022 17:13:12 +0000</pubDate>
      <link>https://dev.to/emileperron/a-comprehensive-guide-to-website-testing-166n</link>
      <guid>https://dev.to/emileperron/a-comprehensive-guide-to-website-testing-166n</guid>
      <description>&lt;p&gt;Let's say you built a new website. It looks good, and you're happy with it, and your clients are happy about it too. Fantastic!&lt;/p&gt;

&lt;p&gt;But before you launch it for the whole world to see, how are you to know if you've made a mistake? Did you forget to remove placeholder content somewhere? Or miss a bug that will cripple your visitors' experience?&lt;/p&gt;

&lt;p&gt;If you want your website to be tip-top, there is no way around it: &lt;strong&gt;you must test it&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;In this guide, you'll find everything you need to know to start testing your sites. Clear instructions, battle-tested tools, curated resources and more await in the lines below.&lt;/p&gt;

&lt;p&gt;So what are you waiting for? Jump in and give your visitors the high-quality browsing experience they deserve!&lt;/p&gt;

&lt;h2&gt;
  
  
  Before you start testing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Define the scope of your project
&lt;/h3&gt;

&lt;p&gt;Testing a website without defining a scope is sure to cause never-ending changes. And never-ending changes are sure to cause tensions.&lt;/p&gt;

&lt;p&gt;To avoid that, take a few minutes to think about each of the key points below. This will help you define ahead of time which types of issues you must resolve, and which types you can ignore.&lt;/p&gt;

&lt;p&gt;If you're working with a team, make sure you do this part together. You may have different perspectives, opinions and knowledge. Unifying these early on will help you avoid problems later on.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h4&gt;
  
  
  Deadlines
&lt;/h4&gt;

&lt;p&gt;You don't want to find yourself having to launch when you haven't yet tested your most important pages.&lt;/p&gt;

&lt;p&gt;So before you get started with the testing, you need to know what your deadlines are.&lt;/p&gt;

&lt;p&gt;Here are some questions to kick-start your discussion on that topic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  When do you need to launch the site?&lt;/li&gt;
&lt;li&gt;  Can you push back the launch if need be?&lt;/li&gt;
&lt;li&gt;  Does someone have to approve the changes you make? If so, how long will that take? Should you plan time in case they request more changes at that point?&lt;/li&gt;
&lt;li&gt;  If you run out of time, can you do more changes after the launch?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You should also discuss any other factors that may affect your deadlines.&lt;/p&gt;

&lt;p&gt;Defining the deadlines ahead of time will help you define how much testing you'll be able to do. Once that's known, you can set priorities and plan accordingly.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h4&gt;
  
  
  Target audience
&lt;/h4&gt;

&lt;p&gt;A website selling skateboards will be different than a site about retirement pensions. They have completely different purposes and audiences.  &lt;/p&gt;

&lt;p&gt;With different audiences and purposes come different expectations and requirements. Knowing your audience is important. It will help you make good decisions for the user experience when testing.  &lt;/p&gt;

&lt;p&gt;Here are a few examples of questions you may want to ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Is the audience tech-savvy?&lt;/li&gt;
&lt;li&gt;  Are they looking to buy something or to get information?&lt;/li&gt;
&lt;li&gt;  Do they know what they're looking for, or do you need to help them find it?&lt;/li&gt;
&lt;li&gt;  Do they have the same vocabulary? (ex.: they look for "oak trees" while you use the term "Quercus Fagaceae").&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Answering such questions will help you understand if your design and UX are appropriate.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h4&gt;
  
  
  Client expectations
&lt;/h4&gt;

&lt;p&gt;Even if you know the audience well, your clients may have extra requirements that you didn't think of.  &lt;/p&gt;

&lt;p&gt;They may have special accessibility and/or user privacy needs. They may need special features that are specific to their industry. They may need to have legal notices on certain pages.  &lt;/p&gt;

&lt;p&gt;Oftentimes, clients provide these requirements early on in the project's lifecycle. But they may have forgotten - or perhaps you have!  &lt;/p&gt;

&lt;p&gt;Make sure you are aware of these requirements before you start testing and implementing changes.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h4&gt;
  
  
  Laws and regulations
&lt;/h4&gt;

&lt;p&gt;The last thing you want is to get your client sued (or to get sued yourself). To prevent that, you have to be aware of the legal requirements for the website you build.  &lt;/p&gt;

&lt;p&gt;There are many basic laws and regulations for web development. &lt;a href="https://elementor.com/blog/website-legal-requirements/" rel="noopener noreferrer"&gt;Elementor's Starting Guide to Legal Compliance&lt;/a&gt; offers guidance on the most popular ones.  &lt;/p&gt;

&lt;p&gt;You should also be aware of any industry-specific laws that apply. If you're not sure, make sure to ask your client(s). If they aren't sure, recommend that they contact an attorney to learn more about it.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Define clear roles for team members
&lt;/h3&gt;

&lt;p&gt;If your team doesn't have a testing process in place, make sure you define clear roles for who does what.  &lt;/p&gt;

&lt;p&gt;Here are a few questions to help you define the roles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Will one person test the entire site, or will you split the testing among many people?&lt;/li&gt;
&lt;li&gt;  Will the person who tests the website also fix the issues they notice? Or should they report them to the team to get them fixed?&lt;/li&gt;
&lt;li&gt;  How will you keep track of the changes you make during the testing process? Should you inform someone about them?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What should I test?
&lt;/h2&gt;

&lt;p&gt;Now that you've established the scope of the tests for your project, it's time to start testing!&lt;/p&gt;

&lt;p&gt;First off, every page on your site should load without any blatant errors. Okay, you probably did not need our guide to figure that part out.&lt;/p&gt;

&lt;p&gt;Here is a comprehensive list of things you should test your websites for.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  First impression
&lt;/h3&gt;

&lt;p&gt;When visitors first come to your site, &lt;a href="https://www.nngroup.com/articles/how-long-do-users-stay-on-web-pages/" rel="noopener noreferrer"&gt;you have about 10 seconds to capture their interest&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If your website does not clearly communicate what it's about and how it can help the visitors, you're toast. End of story. Goodbye!&lt;/p&gt;

&lt;p&gt;There are countless guides on how to improve your landing pages, but here is a quick summary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Clearly state what your website is about, in a way that your target audience will understand right away.&lt;/li&gt;
&lt;li&gt;  Keep things simple: too many options and attention-grabbing elements can confuse visitors.&lt;/li&gt;
&lt;li&gt;  Have a clear call to action to guide your visitors.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.nngroup.com/articles/overlay-overload/" rel="noopener noreferrer"&gt;Avoid popups, overlays, prompts, flashing chat boxes, etc.&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Content
&lt;/h3&gt;

&lt;p&gt;Writing great content and formatting it for the web can be tricky.&lt;/p&gt;

&lt;p&gt;Here are a few guidelines to make sure your pages present content that is helpful to users and that they will read it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The content is formatted into easily scannable chunks, with short paragraphs, (sub)headings, lists, etc.&lt;/li&gt;
&lt;li&gt;  Each page starts with the most important piece(s) of information.&lt;/li&gt;
&lt;li&gt;  Every piece of content serves a purpose: there is no filler content.&lt;/li&gt;
&lt;li&gt;  The content is free of typos, grammatical errors, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;About that last point: you might have heard that pages need a certain word count to be "good". But that's a bit misleading.&lt;/p&gt;

&lt;p&gt;Your website's content is only good if it helps your target audience. If you can provide the same amount of value with fewer, simpler words, you should do that. &lt;strong&gt;Write your content for humans, not search engine algorithms&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Navigation
&lt;/h3&gt;

&lt;p&gt;So you have good content. Awesome!&lt;/p&gt;

&lt;p&gt;But... can your visitors find it?&lt;/p&gt;

&lt;p&gt;Ensuring your visitors can easily navigate through your site to find the information they're looking for is key.&lt;/p&gt;

&lt;p&gt;To get started, here are a few things you should verify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The logo in the header links to the homepage.&lt;/li&gt;
&lt;li&gt;  The navigation contains links to all of the main pages and sections of your site.&lt;/li&gt;
&lt;li&gt;  Every link in the navigation works correctly and leads to the right place.&lt;/li&gt;
&lt;li&gt;  Dropdown menus and mega menus work as intended.&lt;/li&gt;
&lt;li&gt;  The mobile/tablet menu button (often referred to as the "hamburger" button) opens the navigation when it is clicked or tapped.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Searchability
&lt;/h4&gt;

&lt;p&gt;Not every website has or needs a search feature. But most common CMS, such as WordPress, Webflow and Shopify offer search functionalities.&lt;/p&gt;

&lt;p&gt;If your site has many pages containing lots of information on various topics, it could likely benefit from being searchable.&lt;/p&gt;

&lt;p&gt;If you do offer search features, here are a few more things you should ensure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  All relevant types of content are indexed in your search engine.&lt;/li&gt;
&lt;li&gt;  Search results are appropriate and sorted based on relevancy and/or closest matches.&lt;/li&gt;
&lt;li&gt;  Typos, accented characters, capitalization and pluralization in search queries still result in appropriate results.&lt;/li&gt;
&lt;li&gt;  Your results page clearly indicates when no results are found, and suggests alternatives.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Design
&lt;/h3&gt;

&lt;p&gt;Design is very subjective: what pleases one person may be despised by another.&lt;/p&gt;

&lt;p&gt;Despite that, here are a few design guidelines that will provide a better user experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Photos and images on each page convey relevant information (i.e. avoid useless stock images).&lt;/li&gt;
&lt;li&gt;  Clickable elements (links, buttons, paginations, etc.) have clear visual indicators showing that they can be clicked.&lt;/li&gt;
&lt;li&gt;  The icons used on the website are either standard and immediately recognizable or are accompanied by a text label.&lt;/li&gt;
&lt;li&gt;  Empty states are designed and implemented for all lists that could potentially be empty.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, if you have a large website with lots of pages, products and/or articles, you should ensure that &lt;a href="https://www.nngroup.com/articles/change-the-color-of-visited-links/" rel="noopener noreferrer"&gt;visited links are displayed in a different colour or style&lt;/a&gt; in order to look "used".&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Usability
&lt;/h3&gt;

&lt;p&gt;Even a well-designed site with good content can push visitors away if it's riddled with annoying bugs and usability issues.&lt;/p&gt;

&lt;p&gt;We don't know exactly what your website contains in terms of interactive elements, but here are a few things to ensure when testing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Every link on the website works as intended (&lt;a href="https://validator.w3.org/checklink" rel="noopener noreferrer"&gt;W3C's Link Checker&lt;/a&gt; can help find dead links, but only a human can check if a linked page actually matches the link's label/intent).&lt;/li&gt;
&lt;li&gt;  Information that only appears on hover is adapted on touchscreens such as mobiles and tablets (learn more about this by reading Cíntia's article: &lt;a href="https://bootcamp.uxdesign.cc/mobile-doesnt-have-hover-dude-b37e8e0b586e" rel="noopener noreferrer"&gt;Mobile doesn't have hover, dude!&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;  Audio and video players do not start automatically on page load.&lt;/li&gt;
&lt;li&gt;  In-page tabs work as intended, and each tab's content matches the tab's label.&lt;/li&gt;
&lt;li&gt;  Carousels, slideshows, embedded maps, and all other widgets are working as intended.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Forms
&lt;/h3&gt;

&lt;p&gt;Online forms are incredibly useful for businesses and site owners.&lt;/p&gt;

&lt;p&gt;But when they're done wrong, forms can easily become the number one pain point for your visitors.&lt;/p&gt;

&lt;p&gt;Make sure the following points are respected in every form, and you should be in a pretty good state.&lt;/p&gt;

&lt;h4&gt;
  
  
  Content and layout
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  Every form asks for as little information as possible.&lt;/li&gt;
&lt;li&gt;  Forms are presented in a single column (unless fields are very closely coupled... and even then, exercise caution).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Form fields
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  Required fields are marked as such in every form.&lt;/li&gt;
&lt;li&gt;  Labels are close to the fields they describe.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.nngroup.com/articles/form-design-placeholders/" rel="noopener noreferrer"&gt;Labels are not displayed as placeholders&lt;/a&gt; within inputs.&lt;/li&gt;
&lt;li&gt;  In longer forms, related fields are grouped together.&lt;/li&gt;
&lt;li&gt;  Each field uses the right type of input and is sized according to its expected value.&lt;/li&gt;
&lt;li&gt;  Fields with requirements or limitations have their instructions clearly explained as help text under the field's label.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Form errors
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  Error messages provide clear indications of what is incorrect and of how it can be fixed.&lt;/li&gt;
&lt;li&gt;  Error messages in forms are placed right next to the field containing the error.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Form submissions
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  Forms are protected from spam bots (see &lt;a href="https://friendlycaptcha.com/insights/recaptcha-alternatives-compared-recaptcha-vs-hcaptcha-vs-friendly-captcha/" rel="noopener noreferrer"&gt;reCAPTCHA vs hCAPTCHA vs Friendly Captcha&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;  Forms display or redirect to a success message when they are submitted.&lt;/li&gt;
&lt;li&gt;  Form submissions trigger some sort of communication with the person responsible for the website or the form.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I've seen issues with the latter happen so often that I will repeat it once more, just to make sure it's not forgotten:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Form submissions trigger some sort of communication with the person responsible for the website or the form.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This means your form should send an email or a text message, or be submitted to a CRM. The person on the receiving end must be made aware that a new form submission came in!&lt;/p&gt;

&lt;p&gt;There is nothing more annoying for all parties than form submissions not being received by the person who's responsible for them. Visitors get no answer, and site owners get a bad rap for something that is often not their fault. So please, as a personal favour to me, make sure you test this for every form!&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Responsive
&lt;/h3&gt;

&lt;p&gt;Depending on your target audience, the devices from which they browse your site will vary a lot.&lt;/p&gt;

&lt;p&gt;But in most cases, you can expect the majority of your traffic to come from mobile devices and tablets.&lt;/p&gt;

&lt;p&gt;That's why testing your site on a variety of devices is key to ensuring that your visitors get the best experience possible, no matter what device they use.&lt;/p&gt;

&lt;p&gt;Here is a list of devices and resolutions we recommend you test your site on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  A Chromium browser (Google Chrome, Microsoft Edge, Opera, Arc, etc)&lt;/li&gt;
&lt;li&gt;  Firefox&lt;/li&gt;
&lt;li&gt;  Safari&lt;/li&gt;
&lt;li&gt;  Mobile devices of various sizes (e.g. iPhone, iPhone Pro Max, iPhone SE, etc.)&lt;/li&gt;
&lt;li&gt;  Tablets of various sizes (ex.: iPad, iPad Pro, iPad Mini)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you know some of your visitors use a specific device that isn't listed above, make sure to test it as well!&lt;/p&gt;

&lt;p&gt;When testing on phones and tablets, make sure you test on both device orientations (portrait and landscape).&lt;/p&gt;

&lt;h4&gt;
  
  
  That's a lot of devices!
&lt;/h4&gt;

&lt;p&gt;The most efficient way to do this is to own a wide range of devices and to test your websites on those devices. But as you can guess, it can quickly get complicated and costly.&lt;/p&gt;

&lt;p&gt;If you don't want to do that, you can &lt;a href="https://www.browserstack.com/" rel="noopener noreferrer"&gt;test your website with BrowserStack&lt;/a&gt;. Their service allows you to interact with real devices of just about any kind: iPhones, iPads, Android phones and tablets, MacBooks, and more.&lt;/p&gt;

&lt;p&gt;Although testing with a service like BrowserStack isn't as smooth and responsive as testing on your own devices, it is still incredibly helpful as it allows you to detect problems on devices and browsers you do not have access to.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Browser compatibility
&lt;/h3&gt;

&lt;p&gt;Now that &lt;a href="https://www.koalati.com/blog/goodbye-internet-explorer" rel="noopener noreferrer"&gt;Internet Explorer is retired&lt;/a&gt;, browser compatibility is much easier than it was before.&lt;/p&gt;

&lt;p&gt;But that does not mean it's not worth testing!&lt;/p&gt;

&lt;p&gt;There are still many different browsers in use today:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Firefox&lt;/li&gt;
&lt;li&gt;  Safari (iOS Safari and macOS Safari)&lt;/li&gt;
&lt;li&gt;  Chromium-based browsers (Chrome, Edge, Opera, Arc, Samsung Internet, and more).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These browsers all differ from one another. An easy way to see how much they differ is to look at &lt;a href="https://caniuse.com/?compare=chrome+107,edge+107,safari+16.1,firefox+106,opera+92,and_chr+107,ios_saf+16.1,samsung+19.0,op_mini+all,op_mob+72,and_uc+13.4,android+107,and_ff+106&amp;amp;compareCats=all#results" rel="noopener noreferrer"&gt;CanIUse's Browser Comparison&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Even the Chromium-based browsers differ from one another depending on the version of Chromium they use and the browser-specific implementations they provide.&lt;/p&gt;

&lt;p&gt;This is why testing on every major browser, as well as any other browsers your visitors are likely to use, is important.&lt;/p&gt;

&lt;p&gt;Here is a list of browsers and devices we recommend you test your site on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  A Chromium browser (Google Chrome, Microsoft Edge, Opera, Arc, etc)&lt;/li&gt;
&lt;li&gt;  Firefox&lt;/li&gt;
&lt;li&gt;  Safari&lt;/li&gt;
&lt;li&gt;  iPhone (iOS Safari)&lt;/li&gt;
&lt;li&gt;  Android mobile device (Chrome, Samsung Internet)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just like testing for responsive design, using &lt;a href="https://www.browserstack.com/" rel="noopener noreferrer"&gt;BrowserStack&lt;/a&gt; to test on devices and browsers that you do not own can be incredibly helpful.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Social
&lt;/h3&gt;

&lt;p&gt;There's no denying that social networks are a big part of most people's life nowadays.&lt;/p&gt;

&lt;p&gt;To make the most of that, make sure your website looks good when it's shared on social media, and that your social media channels can easily be found on your website:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Every public page has an &lt;code&gt;og:image&lt;/code&gt; meta tag with an image that represents the page/article.&lt;/li&gt;
&lt;li&gt;  Every public page has an &lt;code&gt;og:title&lt;/code&gt; meta tag with the page/article's title formatted for social media previews.&lt;/li&gt;
&lt;li&gt;  Every public page has an &lt;code&gt;og:description&lt;/code&gt; meta tag with a short and appealing snippet describing the page.&lt;/li&gt;
&lt;li&gt;  Every public page has an &lt;code&gt;og:url&lt;/code&gt; meta tag with the page's canonical URL.&lt;/li&gt;
&lt;li&gt;  Every public page has a &lt;code&gt;twitter:card&lt;/code&gt; meta tag indicating the type of card to use for display on Twitter (&lt;a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" rel="noopener noreferrer"&gt;learn more about Twitter Cards&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;  The website's footer (or header) contains links to the brand's main social media accounts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To learn more about this, take a look at our &lt;a href="https://www.koalati.com/features/social-media" rel="noopener noreferrer"&gt;Social Media optimization&lt;/a&gt; page.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Accessibility
&lt;/h3&gt;

&lt;p&gt;To quote the W3C:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Web accessibility means that people with disabilities can equally perceive, understand, navigate, and interact with websites and tools. It also means that they can contribute equally without barriers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Making sure your website can be used by everyone is simply the right thing to do.&lt;/p&gt;

&lt;p&gt;Plus, depending on your type of organization, your location, your audience and/or the locations from which your site is accessible, you may have to comply with certain web accessibility laws and regulations. The W3C has a great tool to &lt;a href="https://www.w3.org/WAI/policies/" rel="noopener noreferrer"&gt;find accessibility laws and policies&lt;/a&gt; that apply to you.&lt;/p&gt;

&lt;p&gt;In any case, here are a few basic guidelines to ensure a minimal level of accessibility for your website:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pages use &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;-&lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; heading tags to organize the structure of the content.&lt;/li&gt;
&lt;li&gt;  Elements use &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Semantics" rel="noopener noreferrer"&gt;semantic HTML&lt;/a&gt; whenever possible (e.g. using &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt; instead of &lt;code&gt;&amp;lt;div class="section"&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;div class="article"&amp;gt;&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;  Every image that conveys information or context provides a textual alternative via &lt;a href="https://accessibility.psu.edu/images/imageshtml/" rel="noopener noreferrer"&gt;the alt attribute&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Every decorative image has an empty alt attribute, indicating that it is not relevant to the content of the page.&lt;/li&gt;
&lt;li&gt;  Every page can be &lt;a href="https://webaim.org/techniques/keyboard/" rel="noopener noreferrer"&gt;navigated logically using only the keyboard&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Accessibility is a very vast subject, and these are just a few pointers to get you started.&lt;/p&gt;

&lt;p&gt;To learn more about accessibility, check out &lt;a href="https://www.koalati.com/features/accessibility" rel="noopener noreferrer"&gt;our Accessibility page&lt;/a&gt;: you'll find short explanations on the subject and great resources for accessibility testing.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  On-site SEO
&lt;/h3&gt;

&lt;p&gt;Search engine optimization is a field of its own, and it can become pretty complex if you dive into it head first&lt;/p&gt;

&lt;p&gt;SEO is no different than most of the other sections in this article, there is a myriad of things that can be done to improve your site.&lt;/p&gt;

&lt;p&gt;Here are the essential things to test for on-site SEO:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Every page has a &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; tag with a unique title (if possible, keep it around &lt;a href="https://moz.com/learn/seo/title-tag" rel="noopener noreferrer"&gt;50–60 characters&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;  Every page has a short &lt;a href="https://developers.google.com/search/docs/appearance/snippet#meta-descriptions" rel="noopener noreferrer"&gt;meta description&lt;/a&gt; that tells users what they can expect from the page.&lt;/li&gt;
&lt;li&gt;  Every page has a simple URL that is easy to read and understand (i.e. real words, not numbers or random characters!).&lt;/li&gt;
&lt;li&gt;  Every page defines its &lt;a href="https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls" rel="noopener noreferrer"&gt;canonical URL&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Every page loads in less than 3 seconds (more about this below).&lt;/li&gt;
&lt;li&gt;  Old URLs that have been renamed or removed are redirected to their new location via &lt;a href="https://moz.com/learn/seo/redirection" rel="noopener noreferrer"&gt;301 redirects&lt;/a&gt; (and have been tested).&lt;/li&gt;
&lt;li&gt;  Alternative domain names redirect to your primary domain name (e.g. &lt;code&gt;mywebsite.com&lt;/code&gt; and &lt;code&gt;www.mywebsite.com&lt;/code&gt;, or &lt;code&gt;mywebsite.ca&lt;/code&gt; and &lt;code&gt;mywebsite.com&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;  The &lt;a href="https://moz.com/learn/seo/robotstxt" rel="noopener noreferrer"&gt;robots.txt file&lt;/a&gt; allows search engines to crawl all public pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once these checks have been done, your site has its SEO basics covered. But as we said, there's a lot more to SEO than what we covered in this list, and it can be a good skill to have if you're building many websites for clients.&lt;/p&gt;

&lt;p&gt;If you want to go further, we recommend you take a look at &lt;a href="https://moz.com/beginners-guide-to-seo" rel="noopener noreferrer"&gt;Moz's Guide to SEO&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Loading speed
&lt;/h3&gt;

&lt;p&gt;As stated earlier in this article, you only have about 10 seconds to convince your users that your site is worth visiting.&lt;/p&gt;

&lt;p&gt;If your page takes 7 seconds just to load and become interactive, that leaves very little time for you to convince people.&lt;/p&gt;

&lt;p&gt;Plus, making sure your pages load and become usable quickly improves your users' experience, which should be your #1 goal.&lt;/p&gt;

&lt;p&gt;Here are some of the main things you should look at to improve your page speeds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Every image is sized appropriately and optimized.&lt;/li&gt;
&lt;li&gt;  Render-blocking JavaScript is removed, deferred, or &lt;a href="https://partytown.builder.io/" rel="noopener noreferrer"&gt;executed in a web worker&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Render-blocking stylesheets are reduced as much as possible.&lt;/li&gt;
&lt;li&gt;  CSS, Javascript and HTML are minified.&lt;/li&gt;
&lt;li&gt;  Browser caching is enabled.&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://blog.hubspot.com/website/gzip-compression" rel="noopener noreferrer"&gt;Compression is enabled&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Unnecessary redirects are eliminated.&lt;/li&gt;
&lt;li&gt;  Your server has adequate resources and configurations to handle your traffic (reducing server response time).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To start testing your website's loading speeds, check out &lt;a href="https://www.koalati.com/features/loading-speed" rel="noopener noreferrer"&gt;our Loading Speed page&lt;/a&gt;. &lt;a href="https://moz.com/learn/seo/page-speed" rel="noopener noreferrer"&gt;‍&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://moz.com/learn/seo/page-speed" rel="noopener noreferrer"&gt;Moz's write-up on Page Speed&lt;/a&gt; can also be a good place to start if you want more information about improving Page Speed.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Security
&lt;/h3&gt;

&lt;p&gt;Most of us have seen or heard about sites that got hacked or imitated by bad actors, or of user information being stolen and sold online.&lt;/p&gt;

&lt;p&gt;These guidelines will help you reach a basic level of security for your site:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  An SSL certificate is set up and configured for auto-renewal.&lt;/li&gt;
&lt;li&gt;  Requests to non-HTTPS URLs are redirected to HTTPS.&lt;/li&gt;
&lt;li&gt;  A &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP" rel="noopener noreferrer"&gt;Content Security Policy&lt;/a&gt; is set up on the site to prevent script and data injection.&lt;/li&gt;
&lt;li&gt;  The &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options" rel="noopener noreferrer"&gt;x-frame-options header&lt;/a&gt; is configured to prevent click-jacking attacks.&lt;/li&gt;
&lt;li&gt;  Website backups are set up and configured to run frequently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your site manages any information about your visitors or users, especially personal information, you should make sure to apply best practices in your development and to vet the libraries, services and vendors you use to ensure that they are secure as well. Neglecting to do so may result in fines and legal trouble, so it's worth taking the time to learn about beforehand.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Editability
&lt;/h3&gt;

&lt;p&gt;If the website you built will be managed by someone else, they need to be able to edit it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;That's not gonna be a problem: the site is built with a CMS!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Are you ready to hear the bad news?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you do not make any special effort to make using the CMS easy and intuitive, you'll find that most clients will have a hard time using it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And when people have a hard time using a CMS, the likelihood of the website breaking skyrockets. 💥&lt;/p&gt;

&lt;p&gt;So you have to put in some effort to make it more intuitive for your clients. But how?&lt;/p&gt;

&lt;p&gt;Here are a few tips to guide you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Keep in mind that your users are likely not tech-savvy.&lt;/li&gt;
&lt;li&gt;  Keep in mind that new people are likely to take over the website management role without receiving much training (if any).&lt;/li&gt;
&lt;li&gt;  Be consistent when naming things. Using two different words to mean the same thing can be confusing.&lt;/li&gt;
&lt;li&gt;  Name things using your client's vocabulary, not yours.&lt;/li&gt;
&lt;li&gt;  Disable and/or hide sections, features and links that are irrelevant to your clients.&lt;/li&gt;
&lt;li&gt;  Add guardrails where possible: validating client inputs and actions can prevent the majority of issues that commonly "break" websites.&lt;/li&gt;
&lt;li&gt;  Guide your clients: if your CMS allows you to add help text, use that to provide context and clarifications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tips may seem simple, but stick to them! Use every opportunity your CMS gives you to make the admin experience better, and it will most definitely pay off.&lt;/p&gt;

&lt;p&gt;It's also important to note that some platforms have a better user experience for their administrators than others:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Wordpress&lt;/strong&gt;'s admin panel is known for becoming increasingly bloated and confusing with every plugin you add. This can be improved by reducing the number of plugins you use and by hiding unnecessary sections and navigation links with plugins or custom code.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Shopify&lt;/strong&gt;'s basic features are easy to use, but third-party applications often come with their own management interfaces which aren't always as straightforward or intuitive. This can be improved by researching and testing different apps to find the one with the simplest interfaces and workflows.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Webflow&lt;/strong&gt;'s Editor does a great job of keeping things simple and intuitive for clients, as long as you adequately name your collections and pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Improving your client's experience will not only make them happier: it also reduces the number of support requests you receive from them. It's a win-win! ✨&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Analytics
&lt;/h3&gt;

&lt;p&gt;If you want to get some data about how your site is doing after you launch, you should set up some sort of Analytics service.&lt;/p&gt;

&lt;p&gt;The most commonly used platform for this is Google Analytics. But &lt;a href="https://www.isgoogleanalyticsillegal.com/" rel="noopener noreferrer"&gt;Google Analytics is already illegal in some EU countries&lt;/a&gt;, and will likely be ruled illegal in many others in the future unless they take a sudden turn.&lt;/p&gt;

&lt;p&gt;At Koalati, we recommend you &lt;a href="https://www.koalati.com/blog/universal-analytics-deprecated-revisit-your-analytics-habits" rel="noopener noreferrer"&gt;analyze your analytics needs&lt;/a&gt; and go with a privacy-friendly alternative like &lt;a href="https://plausible.io/" rel="noopener noreferrer"&gt;Plausible&lt;/a&gt; or &lt;a href="https://usefathom.com/" rel="noopener noreferrer"&gt;Fathom&lt;/a&gt;. You can also browse &lt;a href="https://www.isgoogleanalyticsillegal.com/alternatives" rel="noopener noreferrer"&gt;a more complete list of Google Analytics alternatives&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  A few more things...
&lt;/h3&gt;

&lt;p&gt;These last few things might not be as crucial as the rest, but they're good to test for as well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The website has a working favicon that matches the brand.&lt;/li&gt;
&lt;li&gt;  The 404 (Not Found) error page matches your brand and contains link(s) to the website.&lt;/li&gt;
&lt;li&gt;  The site's system and plugins can be updated safely and easily without major risk of breakage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;p&gt;And... that's it! You're done!&lt;/p&gt;

&lt;p&gt;Congratulations, you have thoroughly tested your site and are ready for launch! 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Thoroughly testing a website before launching it is essential to ensure a high-quality user experience.&lt;/p&gt;

&lt;p&gt;You need to think about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  First impression;&lt;/li&gt;
&lt;li&gt;  Content;&lt;/li&gt;
&lt;li&gt;  Navigation;&lt;/li&gt;
&lt;li&gt;  Design;&lt;/li&gt;
&lt;li&gt;  Usability;&lt;/li&gt;
&lt;li&gt;  Forms;&lt;/li&gt;
&lt;li&gt;  Responsive;&lt;/li&gt;
&lt;li&gt;  Browser compatibility;&lt;/li&gt;
&lt;li&gt;  Social media optimization;&lt;/li&gt;
&lt;li&gt;  Accessibility;&lt;/li&gt;
&lt;li&gt;  On-site SEO;&lt;/li&gt;
&lt;li&gt;  Loading speed;&lt;/li&gt;
&lt;li&gt;  Security;&lt;/li&gt;
&lt;li&gt;  Editability;&lt;/li&gt;
&lt;li&gt;  Analytics;&lt;/li&gt;
&lt;li&gt;  ... and even more!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To help guide you through the process, Koalati offers a comprehensive &lt;a href="https://www.koalati.com/features/website-testing-checklist" rel="noopener noreferrer"&gt;website quality control checklist&lt;/a&gt;, which you can use to test your sites along with your teammates and report issues that need to be fixed.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to disable Webflow animations for users who prefer reduced motion</title>
      <dc:creator>Émile Perron</dc:creator>
      <pubDate>Fri, 19 Aug 2022 19:10:11 +0000</pubDate>
      <link>https://dev.to/emileperron/how-to-disable-webflow-animations-for-users-who-prefer-reduced-motion-33b</link>
      <guid>https://dev.to/emileperron/how-to-disable-webflow-animations-for-users-who-prefer-reduced-motion-33b</guid>
      <description>&lt;p&gt;Webflow animations and interactions can really make a site shine.&lt;/p&gt;

&lt;p&gt;However, some of your visitors might be dizzied by all of the fading, twisting, shifting and scaling that Webflow allows you to create. Others might just prefer websites to be more static and information-focused.&lt;/p&gt;

&lt;p&gt;These users often have the "&lt;a href="https://university.webflow.com/lesson/check-system-motion-settings"&gt;Reduce motion&lt;/a&gt;" setting turned on on their computer.&lt;/p&gt;

&lt;p&gt;Respecting this user preference is important to improve your site's accessibility, especially for animation-heavy sites.&lt;/p&gt;

&lt;p&gt;In this article, we'll show you how you can disable your Webflow animations and interactions when &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion"&gt;&lt;em&gt;prefers-reduced-motion&lt;/em&gt;&lt;/a&gt; is turned on.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  The code
&lt;/h2&gt;

&lt;p&gt;Let's skip straight to the part you're most likely interested in: the code!&lt;/p&gt;

&lt;p&gt;Here is the short script that you can add to your site's footer via the &lt;a href="https://university.webflow.com/lesson/custom-code-in-the-head-and-body-tags#custom-code-in-site-settings"&gt;Site settings &amp;gt; Custom code tab&lt;/a&gt; in Webflow:&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;script&amp;gt;&lt;/span&gt;
    &lt;span class="c1"&gt;// Cancel Webflow animations for users who prefer reduced motion&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;matchMedia&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;(prefers-reduced-motion)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;matches&lt;/span&gt;&lt;span class="p"&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;cancelAnimationsInterval&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;setInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;Webflow&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;undefined&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;Webflow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;require&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;undefined&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;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="nx"&gt;clearInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cancelAnimationsInterval&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

            &lt;span class="c1"&gt;// Stop Webflow's handling of animations&lt;/span&gt;
            &lt;span class="nx"&gt;Webflow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ix2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

            &lt;span class="c1"&gt;// Reset the inline styles for every element that has already been initialized&lt;/span&gt;
            &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;animatedElementsSelector&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[style*='will-change'], [style*='opacity: 0']&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;for&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;animatedEl&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelectorAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;animatedElementsSelector&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;animatedEl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;style&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="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should place this script at the very top of your footer's custom code. Otherwise, slow or heavy scripts that precede it might prevent it from stopping the animations early enough, which could result in a weird flash of animated content for visitors with reduced motion turned on.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;When you add this script in your site's footer, it appears before the closing &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;

&lt;p&gt;At that point, Webflow's interactions script should already have been loaded and initialized, but not enough time has passed for the browser to render the animated element's starting styles.&lt;/p&gt;

&lt;p&gt;The script first checks if the user prefers reduced motions. If they do, it will:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Wait until Webflow's script has loaded.&lt;/li&gt;
&lt;li&gt; Tell Webflow to stop processing and handling interactions and animations.&lt;/li&gt;
&lt;li&gt; Remove inline styles on elements that Webflow already started animating.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In practice, all of this happens within a few milliseconds.&lt;/p&gt;

&lt;p&gt;From the visitor's point of view, your site will simply appear as though it does not have any animations when loading the page or scrolling.&lt;/p&gt;

&lt;p&gt;For visitors who don't have the "prefers reduced motion" setting turned on, the script doesn't do anything: your site will appear as you designed it, animations and all!&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  Before &amp;amp; After
&lt;/h2&gt;

&lt;p&gt;Here's a preview of Koalati's website, which is using this script, with and without the &lt;em&gt;prefers-reduced-motion&lt;/em&gt; setting turned on.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5af_MNBE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://uploads-ssl.webflow.com/614a41fb8e483ac2011e7688/62ffbd1a4d13cfd9f4155545_preview-with-animations.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5af_MNBE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://uploads-ssl.webflow.com/614a41fb8e483ac2011e7688/62ffbd1a4d13cfd9f4155545_preview-with-animations.webp" alt="The page loads and only the top navigation is visible. Then, the heading slowly fades in, followed by a video thumbnail. As the user scrolls, the text and images of each section appears with transitions such as fade-in, scale-in, etc." width="600" height="390"&gt;&lt;/a&gt;&lt;br&gt;
With prefers-reduced-motion turned OFF.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fn9OWXne--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://uploads-ssl.webflow.com/614a41fb8e483ac2011e7688/62ffbd449267bdb3b26c628c_preview-without-animations.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fn9OWXne--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://uploads-ssl.webflow.com/614a41fb8e483ac2011e7688/62ffbd449267bdb3b26c628c_preview-without-animations.webp" alt="The page loads with all the text and images visible right away. As the user scrolls, there are no fading, scaling or moving animations: the text and images are visible right away and stay static." width="600" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With prefers-reduced-motion turned ON.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  A few things to keep in mind
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Hover, focus and active effects aren't affected.
&lt;/h3&gt;

&lt;p&gt;This script only disables the animations generated via Webflow's Interactions tab.&lt;/p&gt;

&lt;p&gt;Your hover, focus, focus-visible and active styles are not affected by this script, and will therefore remain unchanged.&lt;/p&gt;

&lt;p&gt;This is by design, as hover, focus and active states are important for your site's accessibility.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Animations generated by custom code aren't affected.
&lt;/h3&gt;

&lt;p&gt;If you use custom code (Javascript and/or CSS) to create animations and interactions, these won't be disabled by this script.&lt;/p&gt;

&lt;p&gt;Only animations and interactions generated via Webflow's interactions tab are disabled by this script.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  All inline styles are removed from animated elements.
&lt;/h3&gt;

&lt;p&gt;This script will automatically remove all inline styles from the elements that are usually animated (when visitors have prefers-reduced-motion turned on).&lt;/p&gt;

&lt;p&gt;For most Webflow sites, this won't be an issue.&lt;/p&gt;

&lt;p&gt;However, if you intentionally add inline styles on some elements that also have Webflow interactions, you should make sure that these elements aren't broken when this script is introduced.&lt;/p&gt;

&lt;p&gt;If they are, you can try to update the &lt;code&gt;animatedElementsSelector&lt;/code&gt; to ignore those elements.&lt;/p&gt;

&lt;p&gt;If that doesn't work, you'll likely need to adapt the code to match your needs.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  If you use Webflow Interactions for important components (ex.: menu burger button), this script is not adequate for you.
&lt;/h3&gt;

&lt;p&gt;Seeing as the script disables all Webflow interactions, you'll want to implement your own solution if you use Interactions for important components such as a menu toggle button.&lt;/p&gt;

&lt;p&gt;However, you should be aware that using Webflow interactions for important interactive components is generally not great for accessibility to begin with, unless you manually add custom code to handle the accessibility side of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Disabling Webflow interactions and animations for users who prefer reduced motion is an easy way to improve your site's accessibility, especially if you use a lot of animations.&lt;/p&gt;

&lt;p&gt;Luckily, for most sites, it can be done in just a few minutes thanks to the short code snippet we provide in this article.&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>webflow</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Which tech stack should I choose?</title>
      <dc:creator>Émile Perron</dc:creator>
      <pubDate>Fri, 08 Jul 2022 16:18:14 +0000</pubDate>
      <link>https://dev.to/emileperron/which-tech-stack-should-i-choose-b6b</link>
      <guid>https://dev.to/emileperron/which-tech-stack-should-i-choose-b6b</guid>
      <description>&lt;p&gt;Are you looking to build a website for your product or company?&lt;/p&gt;

&lt;p&gt;Or perhaps you already have a website and you're thinking about revamping it?&lt;/p&gt;

&lt;p&gt;In this article, we'll help you understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  What a tech stack is;&lt;/li&gt;
&lt;li&gt;  How the stack you pick affects you and your users;&lt;/li&gt;
&lt;li&gt;  What matters most when selecting technologies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ready? Let's dive into it!&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  What's a tech stack?
&lt;/h2&gt;

&lt;p&gt;Simply put, a tech stack is the choice of technologies you use for a particular project.&lt;/p&gt;

&lt;p&gt;Every technology you use to build, deploy, test, maintain and update your project is a part of your "tech stack".&lt;/p&gt;

&lt;p&gt;Are you building on a website builder like Squarespace or Wix? Are you using a no-code or low-code hybrid like Webflow? Are you setting up a Wordpress website? Are you creating a complex web app with React? Are you using a CSS framework like Bootstrap or Tailwind? Are you connecting to external APIs? Are you managing a web server yourself? Are you hosting your site on GitHub pages, or perhaps Netlify?&lt;/p&gt;

&lt;p&gt;The landscape of web technologies is evolving quickly, with new technologies being released just about every week. There is a near-infinite number of combinations to choose from.&lt;/p&gt;

&lt;p&gt;So before starting development on a project, you need to decide which tools and technologies to include in your tech stack.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  What should I take into consideration when choosing a tech stack?
&lt;/h2&gt;

&lt;p&gt;Before we go into more details, here's a summary of things to take into consideration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Speed&lt;/li&gt;
&lt;li&gt;  Speed again&lt;/li&gt;
&lt;li&gt;  Security&lt;/li&gt;
&lt;li&gt;  Accessibility&lt;/li&gt;
&lt;li&gt;  SEO&lt;/li&gt;
&lt;li&gt;  Maintainability&lt;/li&gt;
&lt;li&gt;  Platform limitations&lt;/li&gt;
&lt;li&gt;  Community&lt;/li&gt;
&lt;li&gt;  Ease of use&lt;/li&gt;
&lt;li&gt;  Pricing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's dive into each of these elements to help you better understand what to look for.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Speed
&lt;/h3&gt;

&lt;p&gt;Speed is paramount on the modern web.&lt;/p&gt;

&lt;p&gt;You want every user interaction to be as fast as possible:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pages should load and become usable as fast as possible;&lt;/li&gt;
&lt;li&gt;  Loading of data within a page or component should be as fast as possible;&lt;/li&gt;
&lt;li&gt;  User-created content (ex.: a blog post, a comment, etc.) should be posted and displayed as fast as possible;&lt;/li&gt;
&lt;li&gt;  Emails and text messages (ex.: 2FA, email confirmation, etc.) should be sent and received as fast as possible;&lt;/li&gt;
&lt;li&gt;  ... you get the point.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every technology you use should therefore be well optimized to reduce unnecessary processing and connections.&lt;/p&gt;

&lt;p&gt;This applies to both backend and frontend technologies and solutions, as both will impact the user's experience.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Security
&lt;/h3&gt;

&lt;p&gt;Just about every language and technology used on the web is secure when used as intended.&lt;/p&gt;

&lt;p&gt;However, when adding external solutions and integrations into your project, you'll want to make sure they're secure.&lt;/p&gt;

&lt;p&gt;Additionally, hacks and data leaks are always a possibility, no matter how secure a product might seem.&lt;/p&gt;

&lt;p&gt;To defend yourself against potential attacks or leaks, you need to make sure that the services and technologies you use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  have access to as little of your users' data as possible;&lt;/li&gt;
&lt;li&gt;  safely hash and/or encrypt any sensitive or personal data;&lt;/li&gt;
&lt;li&gt;  do not share your data with other services or platforms unnecessarily.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Accessibility
&lt;/h3&gt;

&lt;p&gt;Speed is an essential part of the user experience, but it's not all there is to it.&lt;/p&gt;

&lt;p&gt;When choosing user-facing technologies and solutions, you want to make sure that they allow you to build good-looking interfaces that are functional and intuitive. You also want to make sure that people can actually use these interfaces.&lt;/p&gt;

&lt;p&gt;When evaluating technologies with which to build your app or website, make sure they either generate accessible interfaces and features by default or that they allow you to freely edit the HTML to improve the accessibility yourself.&lt;/p&gt;

&lt;p&gt;When evaluating an external tool, service or integration where you don't have any control over the interfaces and the code behind them, you'll want to make sure these interfaces and features match your accessibility standards.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

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

&lt;p&gt;Just like accessibility, your technologies should either be SEO-friendly right off the bat or allow you to edit the code so that you may add search engine optimizations yourself.&lt;/p&gt;

&lt;p&gt;This relates to meta tags, usage of semantic elements, pre-connection to external origins, and many more.&lt;/p&gt;

&lt;p&gt;If indexability and SEO are important for your project, you'll want to make sure you either go for a server-side or statically generated website / app, or with a SPA hybrid that allows you to render meta tags and other such elements on the server so that they're available without Javascript. This will allow crawlers who don't execute Javascript (which is... most of them) to find the data they need to display your site correctly in search results and social media previews.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Maintainability
&lt;/h3&gt;

&lt;p&gt;If you are planning on updating and maintaining your site or application over time, you need to make sure that the technologies you choose won't die out in the coming years.&lt;/p&gt;

&lt;p&gt;A good way to determine if a technology will still be maintained and viable is to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  check if it is still maintained right now (this may seem obvious, but you would be surprised at how many people start using "archived" technologies without knowing it);&lt;/li&gt;
&lt;li&gt;  check if it has a public release schedule with plans for the upcoming months or years;&lt;/li&gt;
&lt;li&gt;  check how many people are contributing to its development and maintenance (the more active and recurring contributors, the better).&lt;/li&gt;
&lt;li&gt;  check if it heavily depends on other technologies that are likely to not be maintained in the near future.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You also have to look into what it takes to keep the system up to date and running smoothly.&lt;/p&gt;

&lt;p&gt;Here are a few more questions you can ask yourself when thinking about the maintainability of your new site:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Can I update it myself?&lt;/li&gt;
&lt;li&gt;  Do you need an expert to take care of it? &lt;/li&gt;
&lt;li&gt;  If we have to bend this platform out of shape to do what we need, how easy will it be to maintain?&lt;/li&gt;
&lt;li&gt;  If I need to find someone new to maintain the project in the future, how many capable people are available in the market?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Known limitations
&lt;/h3&gt;

&lt;p&gt;We've touched on that before, but you need to know a technology's limitations before you can decide if it can work for you.&lt;/p&gt;

&lt;p&gt;For example, a no-code / low-code website platform like Webflow doesn't have a backend you can access and develop on. It doesn't have an easy-to-use file uploader and manager if you need to manage documents outside of its Collections feature. It also includes the jQuery library by default on your site, and you can't remove it.&lt;/p&gt;

&lt;p&gt;For some people, these limitations are deal-breakers. For others, they won't ever be an issue.&lt;/p&gt;

&lt;p&gt;At Koalati, we use Webflow to build and run our marketing website (the one you're on right now). Some of the limitations are minor pain points, but we knew about them ahead of time, and we decided it was worth the trade-off for the speed of development it offers.&lt;/p&gt;

&lt;p&gt;Because we knew the limitations ahead of time, we were able to make that decision knowing full well that there would be minor pains, but never any major issues.&lt;/p&gt;

&lt;p&gt;This is the type of decision you're about to make, so researching the limitations ahead of time is a must.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Community
&lt;/h3&gt;

&lt;p&gt;Many people aren't aware of this, but most web developers and designers heavily rely on online communities in their daily work.&lt;/p&gt;

&lt;p&gt;Communities are useful to help debug an issue, to find inspiration, to ask about best practices, to get a second opinion, and much more.&lt;/p&gt;

&lt;p&gt;Communities also contribute to the development and improvement of a platform or technology.&lt;/p&gt;

&lt;p&gt;Finally, the size and level of activity of a community are also good indicators of how large the talent pool for that particular technology is. This may be important if you need to find new people to help you maintain the project in the future.&lt;/p&gt;

&lt;p&gt;That is why it's important to make sure that there is a thriving community around a platform or technology before building your project around it.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Ease of use
&lt;/h3&gt;

&lt;p&gt;It's important to make sure that the end result will be easy to use by both the users and the project's maintainers.&lt;/p&gt;

&lt;p&gt;A good example is a blog platform that requires the maintainer to use Markdown or HTML to write a blog post. This might be great for the person who's maintaining the blog at the moment, but what if that person quits or has to delegate that task? Wouldn't a regular text editor have been a better option?&lt;/p&gt;

&lt;p&gt;There is no one-size-fits-all answer here: ease of use varies based on the target audience. So think about who will be using which tool and which feature, and plan accordingly.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h3&gt;
  
  
  Pricing
&lt;/h3&gt;

&lt;p&gt;Different stacks come with different price tags.&lt;/p&gt;

&lt;p&gt;Before building your entire project on top of a technology, you need to make sure that you understand the pricing implications and that you can support this price for the lifetime of the project.&lt;/p&gt;

&lt;p&gt;You also need to consider how much time a platform or tool can save you (or how much more money it can make you!), as well as what the tradeoffs are.&lt;/p&gt;

&lt;p&gt;For example, you can easily find a hosting provider that will charge you $1.99/month and give you the domain for free. But:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Is that price going to change after your first year or two?&lt;/li&gt;
&lt;li&gt;  Is that domain only included for the first year?&lt;/li&gt;
&lt;li&gt;  Does that hosting have any significant limitations? (speed, server location, server resources, etc.)&lt;/li&gt;
&lt;li&gt;  Is maintaining your site on that platform taking much longer than on an alternative platform?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just like platform limitations, understanding pricing is important as it's something you might be stuck with for a very long time.&lt;/p&gt;

&lt;p&gt;So make sure you understand the pricing structure and requirements before making that long-term decision.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  Your tech stack doesn't matter.
&lt;/h2&gt;

&lt;p&gt;Now that we've covered all of the elements that do matter, let's skip to the hard-hitting truth: your tech stack doesn't really matter.&lt;/p&gt;

&lt;p&gt;The truth is that most technologies can deliver good speed, security, accessibility and SEO when they are used correctly.&lt;/p&gt;

&lt;p&gt;Of course, we're talking about actively maintained and updated languages, frameworks, libraries and platforms - you don't want to use COBOL (an ancient language used in many legacy systems) to run your backend.&lt;/p&gt;

&lt;h3&gt;
  
  
  But X is better than Y!
&lt;/h3&gt;

&lt;p&gt;You might have heard that technology X is better than technology Y!&lt;/p&gt;

&lt;p&gt;Some technologies have a bad rap, but a lot of that is based on personal preferences and experiences (which are often biased and/or out-of-date).&lt;/p&gt;

&lt;p&gt;Unless you are building a high-availability platform with thousands of simultaneous requests and you plan on maintaining that platform for 10+ years, it's unlikely that you'll run into major technical issues, no matter which major technologies you use.&lt;/p&gt;

&lt;p&gt;Just keep things as simple as possible while ensuring fast speed, accessibility, SEO and maintainability.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  If the stack doesn't matter, what does?
&lt;/h2&gt;

&lt;p&gt;The most important part of a project's development and maintenance is &lt;strong&gt;the team behind it&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Experience, motivation and care
&lt;/h3&gt;

&lt;p&gt;A non-experienced team (or an experienced team that doesn't care) might deliver horrible results, even if they use the "best and latest" technologies. On the other hand, an experienced team who cares can deliver an outstanding experience to your users, even if they don't use the newest tech available.&lt;/p&gt;

&lt;p&gt;If your project is handled by a motivated and experienced team who truly cares about what they are creating (and the people who will use it), your tech stack doesn't matter.&lt;/p&gt;

&lt;p&gt;Let me say that twice, just to make sure it sticks in your brain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If your project is handled by a motivated and experienced team who truly cares about what they are creating (and the people who will use it), your tech stack doesn't matter.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whenever a choice has to be made, the team will decide what's best for the project and its users based on the criteria laid out above (along with other context-specific criteria).&lt;/p&gt;

&lt;p&gt;If your team is skilled and cares about the end-user, chances are the stack they choose will work just fine.&lt;/p&gt;

&lt;p&gt;‍&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;A tech stack is the combination of technologies with which your project is built, deployed and maintained.&lt;/p&gt;

&lt;p&gt;But the specific stack you go for doesn't matter a whole lot, as long as you go for technologies that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  are actively maintained (and that will be maintained in upcoming years);&lt;/li&gt;
&lt;li&gt;  have an active community behind it;&lt;/li&gt;
&lt;li&gt;  match your needs;&lt;/li&gt;
&lt;li&gt;  can deliver a good experience to end-users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What really matters most is the mindset, intent and experience of the team that builds your website or application.&lt;/p&gt;

&lt;p&gt;A non-experienced team (or an experienced team that doesn't care) might deliver horrible results, even if they use the "best and latest" technologies. On the other hand, an experienced team who cares can deliver an outstanding experience to your users, even if they don't use the newest tech available.&lt;/p&gt;

&lt;p&gt;If you have access to skilled people who know what they are doing and who really care about the end-user, chances are the stack they choose will work just fine.&lt;/p&gt;

&lt;p&gt;We publish these website audits not to shame the teams behind the sites, but to educate creators on how to audit and improve the websites they build.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>techstack</category>
    </item>
    <item>
      <title>Web components in 2021: the Good, the Bad and the Ugly</title>
      <dc:creator>Émile Perron</dc:creator>
      <pubDate>Sun, 02 May 2021 16:42:47 +0000</pubDate>
      <link>https://dev.to/emileperron/web-components-in-2021-the-good-the-bad-and-the-ugly-3kg</link>
      <guid>https://dev.to/emileperron/web-components-in-2021-the-good-the-bad-and-the-ugly-3kg</guid>
      <description>&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components" rel="noopener noreferrer"&gt;Web components&lt;/a&gt; are a native set of features that provides outstanding scoping of styles and functionalities. They can be used in a regular, framework-free web page, but also with any Javascript framework of your choice (e.g. React, Vue, Angular, Svelte, etc.). This makes web components excellent for building reusable elements that need to be shared publicly or reused across multiple projets. At least, in theory.&lt;/p&gt;

&lt;p&gt;In reality, there are some drawbacks that can make web components almost unusable in some projects. &lt;/p&gt;

&lt;p&gt;In this article, I will explain what makes web components great, what their drawbacks are, and I will provide some guidance to help you decide whether or not you should use them in your projects.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Good
&lt;/h2&gt;

&lt;p&gt;The two main features that make web components powerful are the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements" rel="noopener noreferrer"&gt;Custom Elements API&lt;/a&gt;, and the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM" rel="noopener noreferrer"&gt;Shadow DOM&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Custom Elements API is what allows you to create and register your components as new HTML elements. It also allows you to define lifecycle callbacks for your new element. Overall, it is pretty great and fairly simple to understand and get into, for both novice and experienced developers alike.&lt;/p&gt;

&lt;p&gt;The Shadow DOM is what provides all of the encapsulation of styles. It gives your components their own DOM, which is separate from the rest of your document. This means that global styles cannot affect it (except for CSS custom properties / variables), and that its own styles cannot affect other elements in the parent document. &lt;/p&gt;

&lt;p&gt;The HTML &lt;code&gt;&amp;lt;template&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;slot&amp;gt;&lt;/code&gt; elements are also used in most custom elements, allowing you to easily create templates with dynamic content without having to reach for a third-party templating system or language.&lt;/p&gt;

&lt;p&gt;Browser support for all of these features is great: unless you're still supporting Internet Explorer, you're unlikely to run into any deal-breakers. There is one exception to this, which will be explained later in "The Bad" section.&lt;/p&gt;

&lt;p&gt;Plus, as mentioned at the start of the article, not only are web components compatible with just about every Javascript framework out there, but they can also be used in good old vanilla Javascript, without a framework. That's because web components are basically just ES6 classes extending the native HTMLElement. That means you can share components across your project or your company's entire ecosystem.&lt;/p&gt;

&lt;p&gt;Additionally, there are some &lt;a href="https://www.webcomponents.org/introduction#libraries-for-building-web-components" rel="noopener noreferrer"&gt;great libraries and packages to make building web components easier&lt;/a&gt;, as well as an online platform where you can find and share web components with others: &lt;a href="https://www.webcomponents.org/" rel="noopener noreferrer"&gt;webcomponents.org&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Bad
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Flash of Unstyled Content
&lt;/h3&gt;

&lt;p&gt;Let's start with the Custom Elements API. The only drawback I have experienced with custom elements is the potential for a Flash of Unstyled Content. Since custom elements are declared and registered in Javascript, it can take a few milliseconds for them to be loaded, processed, registered, and finally rendered. While this is happening, your custom element are left unstyled or hidden.&lt;/p&gt;

&lt;p&gt;This could be a major drawback for a marketing website where you have just a few seconds to engage with your visitors in order to keep their attention, but in web applications, it's not really a deal-breaker, especially since your browser's cache dramatically dampens the issue after the initial loading.&lt;/p&gt;

&lt;p&gt;Here's an example of FOUC with a "tabbed container" web component on a reload without cache (on a local development server):&lt;br&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%2Fn7k4mxzjahpuz0rjf3gp.gif" 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%2Fn7k4mxzjahpuz0rjf3gp.gif" alt="Web component flashing unstyled content for a few milliseconds before rendering correctly"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the same component rendering on reload, with browser cache (still on a local development server):&lt;br&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%2Fvjd21un6mf1lbnjz4ay5.gif" 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%2Fvjd21un6mf1lbnjz4ay5.gif" alt="Web component loading immediately without any visual glitches or FOUC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, browser cache makes this a non-issue for repeat visits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shadow DOM doesn't play well with native forms
&lt;/h3&gt;

&lt;p&gt;The biggest issue I have encountered with web components is the fact that they do not play well at all with native form functionalities. This is due to two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Custom elements cannot extend elements other than &lt;code&gt;HTMLElement&lt;/code&gt; &lt;em&gt;(without tedious workarounds and major drawbacks)&lt;/em&gt;;&lt;/li&gt;
&lt;li&gt;Form elements inside the Shadow DOM are not considered as such by the component's parent form.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Remember how the Shadow DOM doesn't use global styles? This means that if you want to use a &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; inside a web component, you will have to re-define the styles of every &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt;, and more, within your component's styles.&lt;/p&gt;

&lt;p&gt;Of course, you could make each of these elements their own web component, so they each encapsulate their own styles. However, because form elements such as &lt;code&gt;HTMLInputElement&lt;/code&gt; cannot be extended by custom elements, your custom input component has to include the &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; in its Shadow DOM. And this is where you run into the next issue: inputs (and other form elements) within the Shadow DOM are not considered part of the form.&lt;/p&gt;

&lt;p&gt;For example, if a form's submit button is inside the Shadow DOM, the form cannot be submitted by pressing Enter inside an input anymore, unless you add your own &lt;code&gt;keydown&lt;/code&gt; event listener to replicate this feature yourself. &lt;/p&gt;

&lt;p&gt;Here is another example that is a little more complex and telling. If you want to make a custom input, you have three solutions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can generate a &lt;code&gt;&amp;lt;input type="hidden"&amp;gt;&lt;/code&gt; in the regular DOM, beside your custom element, and manually replicate a bunch of built-in features to ensure your input is synchronized correctly at all times, triggers the right events, is validated correctly, is accessible, looks good, and works well.&lt;/li&gt;
&lt;li&gt;You can make every form element, including the &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; itself, its own web component, and forego native &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; elements for your entire project.&lt;/li&gt;
&lt;li&gt;Handle every form who uses this custom input element with Javascript&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are already in a Javascript-heavy environment, where every single form is handled via Javascript, and every component implementation already requires a lot of work in order to be usable and accessible, this might not seem like a major issue.&lt;/p&gt;

&lt;p&gt;However, if you are more vanilla-oriented, newer to web development, or simply like simple solutions and environments, this is likely to be a MAJOR deal-breaker.&lt;/p&gt;

&lt;p&gt;A non-negligible percentage of the web components I would like to build are meant to work with forms or form elements in one way or an other, and I expect it is the same for most other developers. &lt;/p&gt;




&lt;h2&gt;
  
  
  The Ugly
&lt;/h2&gt;

&lt;p&gt;The worst part is that there isn't much information on the web about what is being done to fix or circumvent this issue of incompatibility with native forms. &lt;/p&gt;

&lt;p&gt;Web component libraries like &lt;a href="https://shoelace.style/" rel="noopener noreferrer"&gt;Shoelace&lt;/a&gt; simply implement their own custom form element, which must be handled manually in Javascript.&lt;/p&gt;

&lt;p&gt;Librairies that aim to help build web components, such as Google's &lt;a href="https://lit.dev" rel="noopener noreferrer"&gt;Lit&lt;/a&gt;, cannot allow extending built-in elements &lt;a href="https://github.com/lit/lit-element/issues/879#issuecomment-575236461" rel="noopener noreferrer"&gt;because Safari doesn't support customization of built-ins&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where we stand, and whether should you use them
&lt;/h2&gt;

&lt;p&gt;Overall, just a few weeks/months after embarking on my web component journey with a big smile and sparkling eyes, I find myself not pessimistic, but slightly disappointed about the current state of web components and their future outside of Javascript framework projects and ecosystems.&lt;/p&gt;

&lt;p&gt;I still believe the idea and general implementation of web components is great. But the drawbacks when it comes to native forms make them much less easy to learn and to implement into. &lt;/p&gt;

&lt;h3&gt;
  
  
  You should use web components...
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;if you're already handling all your forms manually in Javascript&lt;/li&gt;
&lt;li&gt;if you have (or plan on having) multiple projects or ecosystems with different technology stacks in which you need to share/reuse components&lt;/li&gt;
&lt;li&gt;if you don't mind taking a lot of time to reimplement built-in functionalities and accessibility before you can really start working on your own business-related features (or if you can use an existing component library like &lt;a href="https://shoelace.style/" rel="noopener noreferrer"&gt;Shoelace&lt;/a&gt; to save on the initial development time and costs)&lt;/li&gt;
&lt;li&gt;... or if you don't need your components to interact with forms or form elements&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  You should not use web components...
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;if you want to retain the ability to use native forms &lt;/li&gt;
&lt;li&gt;if you need to support legacy browsers&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  A light in the distance
&lt;/h2&gt;

&lt;p&gt;Just after I initially published this article, &lt;a class="mentioned-user" href="https://dev.to/westbrook"&gt;@westbrook&lt;/a&gt; commented to let me know about the &lt;a href="https://html.spec.whatwg.org/multipage/custom-elements.html#the-elementinternals-interface" rel="noopener noreferrer"&gt;ElementInternals spec&lt;/a&gt; which is currently implemented in Google Chrome (not in Safari or Firefox yet however). Once available in every browser, this could be a valid solution to the form-related problems I mentioned in the article. &lt;/p&gt;

&lt;p&gt;Check out the following articles to learn more about this spec, its implementations, and the available polyfills: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://web.dev/more-capable-form-controls/" rel="noopener noreferrer"&gt;More capable form controls (web.dev)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://css-tricks.com/creating-custom-form-controls-with-elementinternals/" rel="noopener noreferrer"&gt;Creating Custom Form Controls with ElementInternals (CSS-Tricks)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  One last thing...
&lt;/h2&gt;

&lt;p&gt;If you are not in a Javascript-heavy environment but would still like to use web components for your forms (e.g.: you're building a Laravel or Symfony web app), you always have to possibility of developing a universal form handler to overcome the problems that are described in this article.&lt;/p&gt;

&lt;p&gt;Sure, it's more complicated than just using native forms, and it will require you to do some more development and testing before you can get started, but it's probably the simplest workaround.&lt;/p&gt;

&lt;p&gt;If you do have any other workaround or solutions in mind, I'd love to see them here in the comments or on Twitter. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>webcomponents</category>
      <category>javascript</category>
      <category>html</category>
    </item>
  </channel>
</rss>
