<?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>Forem: Excel Bill</title>
    <description>The latest articles on Forem by Excel Bill (@frontend_jedi).</description>
    <link>https://forem.com/frontend_jedi</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%2F884938%2F7a49da01-0dd8-4480-a41d-e397f72ab4d2.png</url>
      <title>Forem: Excel Bill</title>
      <link>https://forem.com/frontend_jedi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/frontend_jedi"/>
    <language>en</language>
    <item>
      <title>Understanding the Compose Function in JavaScript</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Wed, 15 Mar 2023 17:01:57 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/understanding-the-compose-function-in-javascript-3g34</link>
      <guid>https://forem.com/frontend_jedi/understanding-the-compose-function-in-javascript-3g34</guid>
      <description>&lt;p&gt;&lt;em&gt;One of my least favourite concepts in JavaScript had to be the compose and pipe functions, I mean, they are great functions and definitely save a lot of time, but while learning it, it just looked like a bunch of functions returning each other, it was difficult to understand what was really happening.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this article, we'll be going over the compose function line by line while I explain like to a toddler.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before we start, you atleast need a little knowledge of javaScript.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a compose function
&lt;/h3&gt;

&lt;p&gt;The compose function is a higher-order function that takes two or more functions as arguments and returns a new function that applies these functions in a right-to-left order. Basically, a compose function receives a bunch of functions as argument and then sends them to another function inside of itself which applies them from right to left using the reduceRight method in javaScript. et's dive right into it.&lt;/p&gt;

&lt;p&gt;Given a typical compose function;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function compose(...funcs) {
  return function(arg) {
    return funcs.reduceRight((accum, fn) =&amp;gt; {
      return fn(accum);
    }, arg);
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's break it down line by line and digest it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function compose(...funcs) {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the beginning of a function called compose(the function doesn't have to be called compose). It takes any number of arguments (functions) and stores them in an array using the spread operator(...).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return function(arg) {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we return a function which recieves a single argument, the argument it recieves is going to be the element which these functions will be exercuted on.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return funcs.reduceRight((accum, fn) =&amp;gt; {
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This line starts a reduceRight method on the funcs array(remember the array was created virtually, using spread[...] operator), which applies the callback function to each element in the array, starting from the right side. If you don't understand, don't fret, I'll still explain how the reduce function works as you read down.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return fn(accum);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This line applies each function in funcs to the accum variable. accum is initially set to the value of arg (the argument passed to the returned function), and it gets updated each time a function in funcs is applied to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;}, arg);
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we set the initial value of accum to the value of arg.&lt;/p&gt;

&lt;h3&gt;
  
  
  The reduceRight function
&lt;/h3&gt;

&lt;p&gt;In JavaScript, the &lt;code&gt;reduceRight&lt;/code&gt; method takes a callback function as its first argument, which is used to apply a given operation to each element in the array, and reduce the array to a single value. The callback function takes two arguments: the accumulator (which starts as the last element in the array) and the current value (which starts as the second-to-last element in the array).&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;compose&lt;/code&gt; function, the callback function being used with &lt;code&gt;reduceRight&lt;/code&gt; is an arrow function with two parameters: &lt;code&gt;accum&lt;/code&gt; and &lt;code&gt;fn&lt;/code&gt;. &lt;code&gt;accum&lt;/code&gt; is the accumulator that gets passed from one iteration to the next, and &lt;code&gt;fn&lt;/code&gt; is the current value being processed by the &lt;code&gt;reduceRight&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;The callback function returns the result of applying &lt;code&gt;fn&lt;/code&gt; to &lt;code&gt;accum&lt;/code&gt;. This means that each function in &lt;code&gt;funcs&lt;/code&gt; is being applied to the previous result, and the final result is the output of the last function in the array after it has been applied to the previous result.&lt;/p&gt;

&lt;h3&gt;
  
  
  How the compose function executes
&lt;/h3&gt;

&lt;p&gt;Let me walk you through an example callstack for the compose function to demonstrate how it works.&lt;/p&gt;

&lt;p&gt;Let's say we have the following functions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function addOne(x) {
  return x + 1;
}

function double(x) {
  return x * 2;
}

function square(x) {
  return x * x;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we call compose 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;const composedFunction = compose(square, double, addOne);
const result = composedFunction(2);
console.log(result); // Output: 36
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's what happens step by step:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;we call compose with the arguments &lt;code&gt;square&lt;/code&gt;, &lt;code&gt;double&lt;/code&gt;, and &lt;code&gt;addOne&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const composedFunction = compose(square, double, addOne);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Inside the compose function, the &lt;code&gt;reduceRight&lt;/code&gt; method is called on the &lt;code&gt;funcs&lt;/code&gt; array &lt;code&gt;([square, double, addOne])&lt;/code&gt;. The initial value of the accumulator (&lt;code&gt;accum&lt;/code&gt;) is set to the value of the argument passed to the returned function (&lt;code&gt;arg&lt;/code&gt;), which in this case is 2.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;result = 2;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The first iteration of the &lt;code&gt;reduceRight&lt;/code&gt; method starts, with &lt;code&gt;fn&lt;/code&gt; set to &lt;code&gt;addOne&lt;/code&gt;. The function is called with &lt;code&gt;accum&lt;/code&gt; as the argument, and returns the value 3. This becomes the new value of &lt;code&gt;accum&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;accum = addOne(accum); // result = 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The second iteration of the &lt;code&gt;reduceRight&lt;/code&gt; method starts, with &lt;code&gt;fn&lt;/code&gt; set to &lt;code&gt;double&lt;/code&gt;. The function is called with &lt;code&gt;accum&lt;/code&gt; as the argument, and returns the value 6. This becomes the new value of &lt;code&gt;accum&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;accum = double(accum); // result = 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The third and final iteration of the &lt;code&gt;reduceRight&lt;/code&gt; method starts, with &lt;code&gt;fn&lt;/code&gt; set to &lt;code&gt;square&lt;/code&gt;. The function is called with &lt;code&gt;accum&lt;/code&gt; as the argument, and returns the value 36. This becomes the final value of &lt;code&gt;acuum&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;accum = square(accum); // result = 36
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The returned function from &lt;code&gt;compose&lt;/code&gt; is called with the argument 2. This function applies each function in the funcs array to the argument in a right-to-left order. First, &lt;code&gt;addOne&lt;/code&gt; is called with the argument 2, which returns 3. Then, &lt;code&gt;double&lt;/code&gt; is called with the argument 3, which returns 6. Finally, &lt;code&gt;square&lt;/code&gt; is called with the argument 6, which returns 36&lt;/p&gt;

&lt;p&gt;So, in summary, the compose function takes any number of functions as arguments and returns a new function that applies these functions in a right-to-left order. The returned function takes a single argument and applies each function in the provided array to it, starting from the right side. By doing this, we can create a new function that is composed of multiple smaller functions, which can make our code more modular and easier to read.&lt;/p&gt;

&lt;p&gt;As usual thank you for reading and I hope you got value for your time. Follow me &lt;a class="mentioned-user" href="https://dev.to/frontend_jedi"&gt;@frontend_jedi&lt;/a&gt; to find more educating reads. Follow me on twitter @&lt;a href="https://twitter.com/excel_bill" rel="noopener noreferrer"&gt;Frontend_Jedi&lt;/a&gt; let's connect and grow together.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1547292393174716418-691" src="https://platform.twitter.com/embed/Tweet.html?id=1547292393174716418"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1547292393174716418-691');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1547292393174716418&amp;amp;theme=dark"
  }



&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Creating Web Accessibility: CSS Best Practices</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Thu, 02 Mar 2023 00:14:39 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/creating-web-accessibility-css-best-practices-46fm</link>
      <guid>https://forem.com/frontend_jedi/creating-web-accessibility-css-best-practices-46fm</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Almost everything has a part to play in enhancing or creating accessibility in the web for all users.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this post, we'll be focusing on some of the ways we can create accessibility using CSS. Let's dive right into it!&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Resets:
&lt;/h2&gt;

&lt;p&gt;If you've been around long enough, you've probably heard of css resets. It's a few lines of css code that resets all predefined properties back to default or zero. There are a few HTML elements that come with predefined styling, these styles may vary in different browsers. Elements like &lt;code&gt;h1&lt;/code&gt;-&lt;code&gt;h6&lt;/code&gt; come with a predefined margin and so does other elements like &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; etc. Leaving these styles unchecked can lead to layout problems in different browsers. There are a few libraries that offer resets which you can use in your application, you can read about some of the &lt;a href="https://krdevnotes.com/5-best-css-reset-normalization-libraries/" rel="noopener noreferrer"&gt;Best CSS Reset/Normalization Libraries&lt;/a&gt; to find the one that works best for you. Alternatively, you can add a few lines of code to the main stylesheet to reset or normalize the styling accross the entire app like so;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*{
    margin: 0 !important;
    padding: 0;
    box-sizing: border-box;
    font-size: 15px;
    max-width: 100%;
    list-style: none;
    text-decoration: none;
    font-weight: lighter;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Font Formatting:
&lt;/h2&gt;

&lt;p&gt;As a designer or frontend developer, you'll realize that things like spacing, font weight, font size etc can easily create hierarchy and distinction between two body of text. consider the image below; &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%2Fqlwayrjt2dydeiy42c4g.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%2Fqlwayrjt2dydeiy42c4g.png" alt="proper typography rules, spacing text and emphazing headers with bigger font weight" width="800" height="187"&gt;&lt;/a&gt;&lt;br&gt;
The left side of the image shows a poorly structured body of text with heading, sub heading and description. Apart from it being poorly structured it is also very difficult to read. Here are a few tips to properly structure text content on a website or application;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Maintaining the same font size and weight for similar text. E.g. all &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; headings on your page should have the same size and spacing, so should all subheadings and normal text.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using stronger font weight to show importance, i.e. Headings should be bigger than subheadings which in turn should be bigger than regular text.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use color to differentiate different messages, i.e. in a form for example, you should use certain colors to display different messages or alerts such as errors, warnings, info and success messages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adding an option to increase font size. Some users may still have difficulty reading text of upto 18px in size, in order to preserve the page layout but still have the option to read large text, it is important to add the ability to increase and reduce the page's font size.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Color contrast:
&lt;/h2&gt;

&lt;p&gt;The importance of good color contrasts cannot be overstated, I can be the difference between readable and unreadable text. Contrast is simply the distinction between the container's background color and the foreground color&lt;br&gt;&lt;br&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%2Fchz28i76gpon1ez5hjjj.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%2Fchz28i76gpon1ez5hjjj.jpg" alt="color contrast chart" width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;image source: "Color Contrast Chart" by ThoughtCo, published on September 13, 2021. Retrieved from &lt;a href="https://www.thoughtco.com/color-contrast-chart-373318" rel="noopener noreferrer"&gt;ThoughtCo&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It is important that your text is clear, visible and readable even for users without disabilities.&lt;/p&gt;
&lt;h2&gt;
  
  
  Theme
&lt;/h2&gt;

&lt;p&gt;Having light, dim and dark theme is not only for aesthetics, it is very important especially for users with sensitive eyes and those with preference for a certain theme, I for example particularly likes dark theme. You can easily check for user preference using the &lt;code&gt;prefers-color-scheme&lt;/code&gt; media query like so;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.theme-a {
  background: #dca;
  color: #731;
}
@media (prefers-color-scheme: dark) {
  .theme-a.adaptive {
    background: #753;
    color: #dcb;
    outline: 5px dashed #000;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This checks the user's operating system for a prefered theme and usually has a value of either &lt;code&gt;light&lt;/code&gt; or &lt;code&gt;dark&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Animation reduction
&lt;/h2&gt;

&lt;p&gt;Animated elements, such as flashing images or scrolling text, can cause seizures in people with photosensitive epilepsy, while fast-moving animations can be difficult for individuals with attention deficit disorders to follow. By reducing the amount of animation on a website or application, users with these conditions can more easily navigate and interact with the content without experiencing any negative effects. Additionally, animation reduction can also benefit users with slow internet connections or older devices by improving the loading speed and performance of the website or application.&lt;/p&gt;

&lt;p&gt;In conclusion, accessibility is of utmost importance for creating an inclusive digital environment that accommodates individuals with disabilities. By designing digital content with accessibility in mind, we can ensure that all users, regardless of their abilities or disabilities, have equal access to information and services online. This not only benefits individuals with disabilities but also improves the user experience for everyone. Accessibility is not just a legal requirement but also a moral and ethical responsibility to create an inclusive and equitable digital world for all.&lt;/p&gt;

&lt;p&gt;Again, thank you for reading and I hope you got value for your time. Follow me &lt;a class="mentioned-user" href="https://dev.to/frontend_jedi"&gt;@frontend_jedi&lt;/a&gt; to stay updated on my posts and follow me on twitter @&lt;a href="https://twitter.com/excel_bill" rel="noopener noreferrer"&gt;Frontend_Jedi&lt;/a&gt; let's connect and grow together.&lt;/p&gt;

</description>
      <category>logistics</category>
      <category>productivity</category>
      <category>career</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Creating Web Accessibility: HTML Attributes</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Tue, 21 Feb 2023 14:54:40 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/creating-web-accessibility-html-attributes-5cnj</link>
      <guid>https://forem.com/frontend_jedi/creating-web-accessibility-html-attributes-5cnj</guid>
      <description>&lt;p&gt;Back on the topic of accessibility and today we'll be focusing on some of the HTML attributes that can enhance accessibility.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before diving right in, let's fulfill all righteousness by defining what HTML Attributes are&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;According to &lt;a href="https://www.javatpoint.com/html-attributes"&gt;Java point&lt;/a&gt;, HTML attributes are special words which provide additional information about the elements or attributes are the modifier of the HTML elements.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now that we've gotten that out of the way let's dive into some attributes that enhance accessibility for users&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;alt attribute&lt;/strong&gt;: &lt;br&gt;
This attribute provides a text description of an image, which is read aloud by screen readers for users who are blind or visually impaired. It is important to provide an accurate and descriptive alt text for every image on a web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;title attribute&lt;/strong&gt;:&lt;br&gt;
This attribute displays a tooltip when the user hovers over an element and also provides additional information about that element. It is very useful when using icons or symbols that are not very familiar to users, also for users who have difficulties with small or hard-to-read text.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;aria-label attribute&lt;/strong&gt;:&lt;br&gt;
This attribute provides a text label for an element that is not visible on the screen or cannot be interacted with. aria-label is almost exactly like the image alt attribute, it can be used to provide more information for users who are blind or visually impaired. They are used in elements such as buttons, inputs, tables, links etc. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;There are so many aria attributes that can be used to enhance accessibility but unfortunately cannot make it on this list, visit the W3C comprehensive &lt;a href="https://www.w3.org/TR/wai-aria-1.1/expanded.html"&gt;list of ARIA attributes&lt;/a&gt; on their website to learn more&lt;/em&gt;. Back to the list!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;tabindex attribute&lt;/strong&gt;:&lt;br&gt;
This attribute controls the order in which elements are focused when a user navigates a web page using the keyboard. It is important to ensure that the focus order is logical and intuitive for users with mobility impairments or who rely on the keyboard to navigate. You can read more about the tabindex attribute &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;role attribute&lt;/strong&gt;:&lt;br&gt;
This attribute can also be used to control the focus order of elements on a web page, which can be helpful for users with mobility impairments or who rely on the keyboard to navigate.&lt;br&gt;
For example, if you have a section of your website that contains a list of links, you could use the role attribute to indicate that the section is a navigation menu. This would allow a screen reader to announce to the user that the section is a menu, and provide additional navigation options.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;accesskey attribute&lt;/strong&gt;:&lt;br&gt;
This attribute can be used to assign a keyboard shortcut to an element, such as a link or a button. This can be helpful for users who have difficulty using a mouse or other pointing device, allowing them to navigate a web page more quickly and easily.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;When creating a website or application, it is paramount that you have all types of users in mind, because, of what use will your app be if your users can't make sense of their left from their right. Accessibility should be your first thought!&lt;/p&gt;

&lt;p&gt;As usual, thank you for reading and I hope you got value for your time. Follow &lt;a class="mentioned-user" href="https://dev.to/frontend_jedi"&gt;@frontend_jedi&lt;/a&gt; to stay updated on this series and other frontend development topics. Follow me on twitter @&lt;a href="https://twitter.com/excel_bill"&gt;Frontend_Jedi&lt;/a&gt; let's connect and learn more together!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Creating Web Accessibility: Semantic Tags</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Sun, 19 Feb 2023 11:10:58 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/creating-web-accessibility-semantic-tags-50bl</link>
      <guid>https://forem.com/frontend_jedi/creating-web-accessibility-semantic-tags-50bl</guid>
      <description>&lt;p&gt;The term "semantic" refers to the meaning or purpose of content, and in the context of HTML, it refers to the use of HTML tags to clearly identify the different parts of a webpage. Using semantic HTML helps to provide a clear and understandable structure to a webpage, making it easier for screen readers and other assistive technologies to interpret and navigate. &lt;/p&gt;

&lt;p&gt;In this post we'll only be focusing on the most commonly used HTML tags and best practices&lt;/p&gt;

&lt;p&gt;Semantic HTML is further divided into two parts viz;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Semantic tags for page structure&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Semantic tags for text&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Semantic tags for page structure
&lt;/h2&gt;

&lt;p&gt;Before HTML5 pages had a rather static structure where almost everything was wrapped in a div, in a div, inside a div... &lt;em&gt;you get the idea&lt;/em&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%2Frqlci4xnmzyxxxjwn0yo.jpeg" 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%2Frqlci4xnmzyxxxjwn0yo.jpeg" alt="semantic html, comparison of html and html5" width="800" height="496"&gt;&lt;/a&gt; &lt;em&gt;Image source: &lt;a href="https://towardsdatascience.com/how-to-build-a-recommender-system-quickly-without-setting-up-any-infrastructure-674e30194e8c" rel="noopener noreferrer"&gt;https://towardsdatascience.com/how-to-build-a-recommender-system-quickly-without-setting-up-any-infrastructure-674e30194e8c&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The introduction of html5 brought about page structuring through assigned tags, this not only structures the page better but also provides hierarchy of content for both machine and user readability. Here are some of the commonly used tags, what they represent and where to use them&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;: Defines a header for a section or page. It contains things like; logo, contact info, navigation menu, call to action buttons, social links and breadcrumbs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt;: Defines a navigation section on a web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt;: Defines the main content area of a web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;article&amp;gt;&lt;/code&gt;: Defines an article or section of content on a web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;: Defines a section of a web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;aside&amp;gt;&lt;/code&gt;: Defines content that is related to the main content, but not central to it. like a table of content or author infomation by the side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt;: Defines a self-contained content, such as an image or a video, with an optional caption.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;figcaption&amp;gt;&lt;/code&gt;: Defines a caption for a  element.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are just few of the numerous semantic tags that were introduced with html5, checkout &lt;a href="https://www.w3schools.com/TAGS/default.asp" rel="noopener noreferrer"&gt;list of of html tags&lt;/a&gt; to learn more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Semantic tags for text
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;-&lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt;: Defines six levels of headings, with &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; being the most important and &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; being the least important.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;: Defines a paragraph of text.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;ol&amp;gt;&lt;/code&gt;: Define unordered and ordered lists, respectively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt;: Defines a list item within a list.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;&amp;lt;blockquote&amp;gt;&lt;/code&gt;: Defines a section of quoted text.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The importance of semantic tags to accessibility can not be overemphasized, Technology as we know it is constantly evolving and so are assistive technologies. Writing semantic HTML helps these technologies to properly read your page layout and content to users with certain disabilities. You can read more on &lt;a href="https://www.accessibility.com/blog/assistive-technology-and-your-website" rel="noopener noreferrer"&gt;how assistive technology reads your website&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Thank you for reading and I hope you go value for your time. Follow me &lt;a class="mentioned-user" href="https://dev.to/frontend_jedi"&gt;@frontend_jedi&lt;/a&gt; to stay updated on this series. Follow me on twitter @excel_bill let's connect and learn together.&lt;iframe class="tweet-embed" id="tweet-1624857760620748800-542" src="https://platform.twitter.com/embed/Tweet.html?id=1624857760620748800"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1624857760620748800-542');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1624857760620748800&amp;amp;theme=dark"
  }



&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Creating Web Accessibility: Meta Tags</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Thu, 16 Feb 2023 06:31:16 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/creating-web-accessibility-meta-tags-1pcp</link>
      <guid>https://forem.com/frontend_jedi/creating-web-accessibility-meta-tags-1pcp</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;It is not enough to just have a visually appealing or aesthetically pleasing website. If users find it difficult to navigate your page, It is a failure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;when designing or building websites, it's essential to consider accessibility for all users, including those with disabilities, especially those with disabilities because the web is for everyone. One way to improve the accessibility of your web pages is to include meta tags in the HTML head section. In this post, we'll discuss a few important accessibility meta tags that you can use to improve the user experience of your website.&lt;/p&gt;

&lt;p&gt;some of these tags come pre-written in the html template, but it's important to konw what they do and how they work.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lang&lt;/strong&gt;&lt;br&gt;
The "lang" attribute in the HTML tag specifies the language of the web page. This is important for screen readers, which can use the language information to select the appropriate voice and pronunciation for the content. Make sure to include the "lang" attribute and set the value to the appropriate language code, such as "en" for English or "es" for Spanish. Here is a list of &lt;a href="https://www.w3schools.com/tags/ref_language_codes.asp" rel="noopener noreferrer"&gt; supported language codes&lt;/a&gt;&lt;br&gt;
Example: &lt;code&gt;&amp;lt;html lang="en"&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;title&lt;/strong&gt;&lt;br&gt;
The "title" element in the head section of the HTML page provides a short, descriptive title for the page. Screen readers and other assistive technologies can use the title to help users navigate and understand the content of the page. Make sure to include a descriptive and concise title that accurately represents the content of the page.&lt;br&gt;
Example: &lt;code&gt;&amp;lt;title&amp;gt;Important Accessibility Meta Tags in HTML&amp;lt;/title&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;description&lt;/strong&gt;&lt;br&gt;
The "description" meta tag provides a brief summary of the content of the page, which can be used by search engines and other tools to display a preview or snippet of the page. This tag can also be useful for users who may use assistive technology to browse search engine results. Make sure to include a descriptive and concise summary of the page's content.&lt;br&gt;
Example: &lt;code&gt;&amp;lt;meta name="description" content="Learn about important accessibility meta tags in HTML for improving the user experience of your website."&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;viewport&lt;/strong&gt;&lt;br&gt;
The "viewport" meta tag helps to ensure that the web page is properly displayed on different devices and screen sizes. This is important for users with disabilities who may use different devices or screen magnification tools to view the content. Make sure to include a "viewport" meta tag that sets the width of the page to the device width and disables zooming.&lt;br&gt;
Example: &lt;code&gt;&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Aside from accessibility, these meta tags can also help search engines and other tools better understand and display your content. Remember to always follow best practices for web accessibility to ensure that your website is accessible to all users.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Best Practices for Building Responsive and Accessible Web Applications</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Fri, 10 Feb 2023 01:36:03 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/best-practices-for-building-responsive-and-accessible-web-applications-1fc4</link>
      <guid>https://forem.com/frontend_jedi/best-practices-for-building-responsive-and-accessible-web-applications-1fc4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;As a frontend developer, building responsive and accessible web applications is an essential part of your job. These applications not only need to look great on different devices and screen sizes, but also need to be easy to use for everyone, including users with disabilities.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;In this post we are going to go about how to make your application or website more responsive and accessible for users. Below are some of the best practices for building responsive and accessible web applications.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Design for Different Screen Sizes
&lt;/h3&gt;

&lt;p&gt;With the increasing use of mobile devices, it's important to design web applications that look good on different screen sizes. This means using responsive design techniques, such as media queries and flexible grids, to adjust the layout and presentation of the application based on the size of the device's screen.&lt;/p&gt;

&lt;p&gt;To get started with responsive design, you can use CSS frameworks, such as Bootstrap or Foundation, which provide a set of pre-designed components that you can easily customize and use in your own projects. Additionally, you can use tools such as Flexbox or Grid to create flexible and responsive layouts, and adjust the font size, line height, and other typographic elements based on the screen size.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Optimize for Performance
&lt;/h3&gt;

&lt;p&gt;Performance is key to providing a great user experience, especially on mobile devices. There are several ways to optimize the performance of your web applications, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Minifying and compressing your CSS, JavaScript, and HTML files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using image compression tools to reduce the size of images used in your application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lazy loading images, videos, and other media that are not immediately visible on the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implementing efficient algorithms and data structures to reduce the amount of processing time required to render the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Code splitting to reduce loading time by downloading only the required files at a given time.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Make it Accessible
&lt;/h3&gt;

&lt;p&gt;Accessibility is the practice of making web applications usable by people with disabilities, such as visual or motor impairments. To make your web applications accessible, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Use semantic HTML elements, such as header, nav, abbr, figure, figcaption, ul and main, to provide context and structure to the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Provide alternative text for images and other non-text content. This enables screen readers to pickup on what the element video or image is, for visually impaired users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use ARIA attributes to provide additional information about the elements on the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make sure that your web applications are keyboard-navigable, so that users can use the keyboard to interact with the page.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Building responsive and accessible web applications is an important part of frontend development. By designing for different screen sizes, optimizing for performance, and making it accessible, you can provide a great user experience for all users, regardless of the device they are using. These are just a few of the best practices to keep in mind when building your next web application. Good luck!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thank you for reading and I hope you got value for your time. Follow me on twitter @&lt;a href="https://twitter.com/excel_bill" rel="noopener noreferrer"&gt;Frontend_Jedi&lt;/a&gt; to connect and learn more about web development and ocassional sarcasm. Follow me here on dev.to &lt;a class="mentioned-user" href="https://dev.to/frontend_jedi"&gt;@frontend_jedi&lt;/a&gt; for more contents like this. Remember to leave a comment.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>react</category>
      <category>tailwindcss</category>
    </item>
    <item>
      <title>7 mistakes developers make while looking for jobs</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Mon, 06 Feb 2023 03:00:36 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/7-mistakes-developers-make-while-looking-for-jobs-1aei</link>
      <guid>https://forem.com/frontend_jedi/7-mistakes-developers-make-while-looking-for-jobs-1aei</guid>
      <description>&lt;p&gt;Junior developers can make a variety of mistakes while looking for their first job or early in their career that can impact their future opportunities. I have compiled a short list of the most important ones to avoid in your journey, let's go 🚀&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not networking enough:&lt;/strong&gt; Failing to actively network with people in the industry, attend industry events, and build relationships with others can limit job opportunities. Networking also includes asking for feedback from others, such as mentors or colleagues, on how to improve.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Being too focused on one technology:&lt;/strong&gt; Becoming too focused on one technology or programming language and not diversifying skills can limit job opportunities in the future. The world and tech itself is constantly changing, being unwilling to adapt to new technologies or programming languages, or being resistant to change, can limit job opportunities in a rapidly evolving field.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jumping from stack to stack:&lt;/strong&gt; Although the world of tech is changing and increasingly becoming fluid, it is very easy to get carried away by new technologies, one of the way this happens is from following job requirements and learning too many technologies to be qualified for a certain job and ultimately not being solid in any of these technologies and/or languages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ignoring the importance of a portfolio:&lt;/strong&gt; In as much as a degree or certificate is good, it still doesn't beat the importance of a strong portfolio. Not having a portfolio of work to showcase skills and abilities to potential employers can make it difficult to land a job.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not being proactive:&lt;/strong&gt; Don't wait for opportunities to come to you, actively search and apply for jobs, reach out to recruiters, and attend networking events to expand your chances of finding the right job.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Underestimating the importance of soft skills:&lt;/strong&gt; personal attributes that enable someone to interact effectively and harmoniously with other people. Soft skills, such as communication, teamwork, and problem-solving, are just as important as technical skills in many industries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not updating your online presence:&lt;/strong&gt; A strong online presence, including a professional LinkedIn profile and a portfolio website, can help you stand out to potential employers. Failing to keep your online presence updated can hurt your job prospects.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are a lot of other mistakes and neglects, but I chose to focus on these 7 which I consider to be more important or more detrimental.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanks for reading
&lt;/h2&gt;

&lt;p&gt;connect with me on twitter @&lt;a href="https://twitter.com/excel_bill" rel="noopener noreferrer"&gt;Frontend Jedi&lt;/a&gt; and follow me here for bi weekly content on frontend engineering. &lt;/p&gt;

</description>
      <category>devto</category>
      <category>web3</category>
      <category>announcement</category>
      <category>community</category>
    </item>
    <item>
      <title>Box-sizing: CSS Box Model Explained</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Sun, 05 Feb 2023 04:33:52 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/box-sizing-css-box-model-explained-35n4</link>
      <guid>https://forem.com/frontend_jedi/box-sizing-css-box-model-explained-35n4</guid>
      <description>&lt;p&gt;&lt;em&gt;If you're like me, you've probably wondered what box-sizing: border-box and content-box really does and how it works. Well buckle up, cos you're about to get your answers.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;One of the fundamental concepts in CSS is the box model, which defines the size and spacing of elements on a web page. The box model consists of content, padding, borders, and margins. Understanding the box model is crucial for creating effective and aesthetically pleasing web designs. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The box-sizing property is a CSS property that gives you control over the size and behavior of an element's box. This property allows you to specify whether the size of an element should include its padding and borders or not.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Everyone who's used CSS knows you just have to set box-sizing to border-box &lt;em&gt;but how does it really work&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  box-sizing: content-box;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;By default, the box-sizing property is set to "content-box," meaning that the size of an element is determined by its content, and padding is added outside of the defined width and height.&lt;/p&gt;
&lt;/blockquote&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%2Fjv6kq8ojj9k8mq5c8cpl.png" 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%2Fjv6kq8ojj9k8mq5c8cpl.png" alt="css box model || content-box"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What this means is that the inner element does not take it's containing element's width into consideration when calculating it's border and padding. By default in the CSS box model, the width and height you assign to an element is applied only to the element's content box. If the element has any border or padding, this is then added to the width and height to arrive at the size of the box that's rendered on the screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  box-sizing: border-box;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;This box-sizing value means that the size of an element is determined by its content, padding, and borders, and they are all included within the defined width and height of the element.&lt;/p&gt;
&lt;/blockquote&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%2Fom0pre0lx8t8fulcte8j.png" 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%2Fom0pre0lx8t8fulcte8j.png" alt="css box model || border-box"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This means that the width of an element with the border-box value for box-sizing is the total width of the element, including both its content and padding, plus the width of the borders. In other words, the padding and borders are included within the defined width of the element when using the border-box value for the box-sizing property. This makes it easier to calculate the size of an element and can help you avoid layout issues.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Basically, for content-box, If you set an element's width to 100 pixels, then the element's content box will be 100 pixels wide, and the width of any border or padding will be added to the final rendered width, making the element wider than 100px. *&lt;em&gt;while *&lt;/em&gt; for border-box, the browser accounts for any border and padding in the values you specify for an element's width and height. If you set an element's width to 100 pixels, that 100 pixels will include any border or padding you added, and the content box will shrink to absorb that extra width.&lt;/p&gt;

&lt;p&gt;consider following me on twitter @&lt;a href="https://twitter.com/excel_bill" rel="noopener noreferrer"&gt;Frontend Jedi&lt;/a&gt; let's connect!&lt;/p&gt;

</description>
      <category>design</category>
      <category>beginners</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Difference between call, bind and apply methods in javascript</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Sun, 29 Jan 2023 14:52:14 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/difference-between-call-bind-and-apply-methods-in-javascript-42dj</link>
      <guid>https://forem.com/frontend_jedi/difference-between-call-bind-and-apply-methods-in-javascript-42dj</guid>
      <description>&lt;p&gt;Call(), bind() and apply() are javascript methods used to call a function with a specific this value and arguments where required. They are often used to set the context of a function and make it easier to reuse functions.&lt;/p&gt;

&lt;p&gt;Asumming you have two objects, one contains a name and an annonymous function and the other only has a name 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;let person1 = {
  name: "John",
  sayHi: function(hobby) {
    return "Hi, I'm " + this.name + " and I love " + hobby;
  }
};

let person2 = {
  name: "Frontend Jedi"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but you'd to call the sayHi method for &lt;code&gt;person2&lt;/code&gt;. This is where the call(), bind() and apply() methods come in, to do this, you simply set the &lt;code&gt;this&lt;/code&gt; value of the method or function to point at the object it is referencing.&lt;/p&gt;

&lt;p&gt;Here's how to go about it ;&lt;/p&gt;

&lt;h3&gt;
  
  
  Call() method
&lt;/h3&gt;

&lt;p&gt;The call method recieves the new context i.e the new object, as the first argument followed by the function's arguments if any like so;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log( person1.sayHi.call(person2, "writing code") )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  apply() method
&lt;/h3&gt;

&lt;p&gt;The apply method also recives the new context as the first argument but unlike the call method, the function's arguments are passed in as an array and seperated by comas if more than one. Like so;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log( person1.sayHi.apply(person2, ["writing code"]) )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;so if we had more than one &lt;code&gt;hobby&lt;/code&gt;, our apply method would now look 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;console.log( person1.sayHi.apply(person2, ["writing code", "designing"]) )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  bind() method
&lt;/h3&gt;

&lt;p&gt;The bind method is a lot more different from the call and apply methods. To use the bind method, you need to first of all declare a variable and initialize it with the method or function you are referencing followed by the bind keyword and then the context object is then passed in as argument to the bind method. After initializing the variable like so;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let newSayHi = person1.sayHi.bind(person2)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;the newly declared variable is then called as a function and the required arguments are then passed to it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log( newSayHi("writing code")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In conclusion, bind(), call(), and apply() are important methods in JavaScript that allow us to control the value of the 'this' keyword and reuse functions more effectively. Understanding how to use these methods can greatly improve your ability to write more efficient and reusable code.&lt;/p&gt;

&lt;p&gt;follow me on twitter @&lt;a href="https://twitter.com/excel_bill"&gt;Frontend Jedi&lt;/a&gt; to stay updated. thanks.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Improve Your Site's Ranking using Lighthouse Chrome Extension</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Mon, 23 Jan 2023 11:51:29 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/how-to-improve-your-sites-ranking-using-lighthouse-chrome-extension-20bo</link>
      <guid>https://forem.com/frontend_jedi/how-to-improve-your-sites-ranking-using-lighthouse-chrome-extension-20bo</guid>
      <description>&lt;p&gt;Optimizing your website for performance is crucial for providing a positive user experience. One of the best ways to do this is by using the Lighthouse tool, a free and open-source tool that is built into Google Chrome's developer tools. Lighthouse can help you identify and fix performance issues on your website, and it provides a detailed report on how to improve your website's performance.&lt;/p&gt;

&lt;p&gt;To use Lighthouse, open the developer tools in Google Chrome, click on the Lighthouse tab and then click on analyze page load. Lighthouse will then analyze your website, and provide you with a report that includes information on the performance, accessibility, best practices, and SEO of your website.&lt;/p&gt;

&lt;p&gt;The report is divided into several sections, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance:&lt;/strong&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%2F6qszf7um0ucmu24ln8sz.png" alt="Lighthouse Performance" width="800" height="430"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This section provides information on how quickly your website loads, including the time it takes for the main content of your website to load, the time it takes for the entire website to load, and the time it takes for the website to become interactive.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accessibility:&lt;/strong&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%2Fwa5eh4isxpmsfeyf4g42.png" alt="Accessibility Lighthouse" width="800" height="493"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This section provides information on how accessible your website is, including the use of semantic HTML, the use of ARIA roles, and the use of color contrast.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Practices:&lt;/strong&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%2Fs3dr5pys3w27vj8bas8s.png" alt="Best Practices Lighthouse" width="800" height="411"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This section provides information on how well your website follows best practices for web development, including the use of HTTPS, the use of HTTP/2, and the use of service workers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SEO:&lt;/strong&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%2Fx9dla78mwet24bfd9st4.png" alt="SEO Lighthouse" width="800" height="472"&gt;
This section provides information on how well your website is optimized for search engines, including the use of meta tags, the use of structured data, and the use of sitemaps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you have the report, you can start working on improving the performance of your website by following the recommendations provided by Lighthouse. Some of the most common recommendations include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Minifying and compressing your website's files: Minifying your website's files removes unnecessary characters, such as white spaces, comments, and line breaks, which can significantly reduce the size of your files and improve the loading time of your website. Compressing your files also can reduce the loading time of your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimizing images: Optimizing images involves compressing and resizing them, which can significantly reduce their file size and improve the loading time of your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using a content delivery network (CDN): A CDN is a network of servers that are distributed around the world, which can improve the loading time of your website by delivering content from the server that is closest to the user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enabling browser caching: Browser caching allows your website's files to be stored in the user's browser, which can improve the loading time of your website by reducing the number of requests that need to be made to the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using a service worker: A service worker is a script that runs in the background of the user's browser, and can be used to cache your website's files, which can improve the loading time of your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improving the accessibility of your website, by providing clear and descriptive labels, providing alternative text for images, and ensuring that your website's color contrast is adequate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimizing your website's SEO by including relevant keywords in your meta tags, adding structured data, and creating a sitemap.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By following the recommendations provided by Lighthouse, you can significantly improve the performance of your website, and provide a better user experience for your visitors. It's worth to mention that Lighthouse can also be run from the command line, integrated with your CI/CD pipeline, and also you can use it as a chrome extension.&lt;/p&gt;

&lt;p&gt;Overall, Lighthouse is a powerful tool that can help you identify and fix performance issues on your website. By following the recommendations&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>nextjs</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Difference Between Responsive Design and Adaptive Design</title>
      <dc:creator>Excel Bill</dc:creator>
      <pubDate>Sat, 21 Jan 2023 00:58:25 +0000</pubDate>
      <link>https://forem.com/frontend_jedi/difference-between-responsive-design-and-adaptive-design-906</link>
      <guid>https://forem.com/frontend_jedi/difference-between-responsive-design-and-adaptive-design-906</guid>
      <description>&lt;p&gt;As a frontend developer or UI designer, this is definitely one of the most asked questions according to &lt;a href="https://www.javatpoint.com/front-end-developer-interview-questions" rel="noopener noreferrer"&gt;Java Point&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Responsive design and adaptive design are both methods used to make a website or application look and function well on different devices with different screen sizes and resolutions. However, they work in slightly different ways.&lt;/p&gt;

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

&lt;p&gt;Responsive design is a design approach that uses flexible grid-based layout, flexible images, and CSS media queries to make a website or application automatically adjust its layout and elements to fit the screen on which it's being viewed. In other words, the layout and elements of the website or application change based on the screen size and resolution, so it looks and functions well on any device.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adaptive design
&lt;/h3&gt;

&lt;p&gt;Adaptive design is a design approach that uses a set of pre-designed layouts for specific screen sizes and resolutions. These layouts are called "breakpoints" and the website or application switches to a different layout based on the screen size and resolution. In other words, the layout and elements of the website or application are fixed for specific screen sizes and resolutions. E.g. creating several image file sizes to carter for different screen sizes.&lt;/p&gt;

&lt;h3&gt;
  
  
  In summary:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Responsive design is a fluid and flexible approach that adapts to different devices using a single codebase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adaptive design is a more rigid approach that uses different layouts for specific devices with different codebase.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both approaches have their own advantages and disadvantages, but responsive design is considered more popular and flexible for modern web development.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>architecture</category>
      <category>discuss</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
