<?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: Grace Wambui</title>
    <description>The latest articles on DEV Community by Grace Wambui (@grace_wambui_21df8ebf1ae3).</description>
    <link>https://dev.to/grace_wambui_21df8ebf1ae3</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4222068%2Ff7b218d2-00d8-4a9b-9adc-cc3db53df23b.png</url>
      <title>DEV Community: Grace Wambui</title>
      <link>https://dev.to/grace_wambui_21df8ebf1ae3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/grace_wambui_21df8ebf1ae3"/>
    <language>en</language>
    <item>
      <title>Semantic HTML &amp; Accessibility: what I learned and Fixed</title>
      <dc:creator>Grace Wambui</dc:creator>
      <pubDate>Mon, 02 Nov 2026 10:47:50 +0000</pubDate>
      <link>https://dev.to/grace_wambui_21df8ebf1ae3/semantic-html-accessibility-what-i-learned-and-fixed-1b10</link>
      <guid>https://dev.to/grace_wambui_21df8ebf1ae3/semantic-html-accessibility-what-i-learned-and-fixed-1b10</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Building my first personal portfolio website taught me that creating a website is not just about making it look attractive. It is also about making it accessible, understandable, and easy to navigate for everyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Semantic HTML?
&lt;/h2&gt;

&lt;p&gt;Semantic HTML means using HTML elements that describe the meaning and purpose of their content. For example, &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt; identifies introductory content, &lt;code&gt;&amp;lt;nav&amp;gt;&lt;/code&gt; identifies navigation links, and &lt;code&gt;&amp;lt;main&amp;gt;&lt;/code&gt; identifies the primary content of a page.&lt;/p&gt;

&lt;p&gt;Semantic HTML improves accessibility because assistive technologies, such as screen readers, can use these elements to help users understand and navigate a webpage. It also makes code easier to read, maintain, and organize.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and After: Improving HTML Structure
&lt;/h2&gt;

&lt;p&gt;Initially, a webpage might use generic &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; elements for everything:&lt;/p&gt;

&lt;h3&gt;
  
  
  Before — Non-semantic HTML
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"header"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"nav"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;Contact&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Welcome to My Portfolio&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;This is my introduction.&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  After — Semantic HTML
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;nav&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Main navigation"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"index.html"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"about.html"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;About&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"contact.html"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Contact&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to My Portfolio&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is my introduction.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The semantic version clearly identifies the page structure and provides meaningful, keyboard-accessible navigation links.&lt;/p&gt;

&lt;h2&gt;
  
  
  Accessibility Issues I Found and Fixed
&lt;/h2&gt;

&lt;p&gt;During my accessibility audit, I focused on three important areas:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Images Without Alternative Text
&lt;/h3&gt;

&lt;p&gt;Images without descriptive &lt;code&gt;alt&lt;/code&gt; attributes can be difficult for screen-reader users to understand. I added appropriate alternative text to meaningful images and empty alt attributes to decorative images.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Inconsistent Heading Hierarchy
&lt;/h3&gt;

&lt;p&gt;Using headings only for their visual appearance can confuse users navigating with assistive technology. I organized headings logically, starting with one &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; and using &lt;code&gt;&amp;lt;h2&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;h3&amp;gt;&lt;/code&gt; for nested sections.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Unclear Links and Form Labels
&lt;/h3&gt;

&lt;p&gt;Generic link text such as "Click here" does not explain the destination. I replaced it with descriptive text. I also associated every form input with a visible &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; so users can identify what information is required.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;Accessibility is not an optional feature added at the end of development. It is an essential part of building a good website from the beginning. Semantic HTML, descriptive links, accessible images, and properly labeled forms make websites more usable for a wider range of people.&lt;/p&gt;

&lt;p&gt;You can explore my portfolio here: [&lt;a href="https://dev.to/grace_wambui_21df8ebf1ae3/semantic-html-accessibility-what-i-learned-and-fixed-1b10"&gt;https://dev.to/grace_wambui_21df8ebf1ae3/semantic-html-accessibility-what-i-learned-and-fixed-1b10&lt;/a&gt;]&lt;br&gt;
As I continue learning web development, I will keep accessibility in mind throughout the design and development process.&lt;/p&gt;

</description>
      <category>a11y</category>
      <category>frontend</category>
      <category>html</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
