October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

What Semantic HTML Taught Me About Web Accessibility

Faith’s portfolio audit uncovered generic containers, missing image alternatives, unassociated form labels and a skipped heading level. Here’s what semantic HTML can clarify—and what automated scores cannot prove.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Semantic HTML makes a page’s structure meaningful to browsers and assistive technologies. When I audited my portfolio, I found generic containers, images without useful alternative text, form fields without properly associated labels, and a heading sequence that skipped a level. Fixing those issues made the page’s structure clearer; it did not, by itself, prove the whole site accessible.

What semantic HTML is—and why it matters

Semantic HTML uses elements that describe the role of their content instead of relying on generic containers such as <div> for every part of a page. A <nav> element identifies navigation, for example, while <main> identifies the page’s primary content.

As an Amazon Associate I earn from qualifying purchases.

That meaning can help people navigate and understand a page, including people using screen readers or keyboard navigation. W3C WAI explains that landmarks can expose major page regions to assistive technologies. Its H101 guidance says: “Landmarks provide an easy way for users of assistive technology understand the programmatic structure of a page and skip over content they’re not interested in.” W3C WAI’s H101 technique gives examples including <header>, <nav> and <main>. Whether an element creates a landmark can depend on its context, so semantic markup is not a matter of assuming every meaningful element becomes one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

W3C describes its techniques as examples, not mandatory implementation recipes. The point is to communicate structure and purpose in ways that work for the page and its users—not to treat a particular set of tags as a guarantee of conformance.

#1 Best Overall

What I found when I audited my portfolio

In her DEV Community post, Faith describes auditing her portfolio and finding several opportunities to improve its markup. The examples below are her account of that site-specific audit, not findings from an independent assessment of the portfolio.

Generic containers where structure could be clearer

Faith replaced generic wrappers with elements such as <header> and <nav> where they better described the content. Using the right structural element can make a page easier to interpret and can expose landmark regions. The choice should reflect what the content actually does: a visual box does not become navigation simply because it looks like a menu.

Images without useful alternative text

She found placeholder images without descriptive alt text and added text describing a profile picture. The right alternative depends on an image’s purpose and context. A profile image may need a concise identification; a decorative image may need no spoken description. Alternative text should convey the image’s relevant purpose, not mechanically describe every visual detail.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Form fields without associated labels

Faith connected form fields to their labels using matching for and id attributes. W3C WAI’s Forms Tutorial puts the principle plainly: “A label and a form control should be associated with each other either implicitly or explicitly.” For an explicit association, the label’s for value must match the control’s id. W3C WAI’s labeling guidance also describes implicit association, where a control is placed inside its label.

For example, an explicit association looks like this:

<label for="email">Email address</label>
<input id="email" name="email" type="email">

The visible label tells users what the field is for and gives assistive technology a programmatic name to associate with the control. Placeholder text alone is not a substitute for a properly associated label.

Rank #4

A heading sequence that jumped from h1 to h3

Faith also found a page that moved directly from an <h1> to an <h3>. She restored a more hierarchical sequence. Headings are not merely large or bold text: marked-up headings help create a navigable outline. W3C WAI recommends nesting headings by rank and avoiding skipped ranks where possible. A skipped number does not automatically mean a page fails WCAG, but a coherent hierarchy is clearer to navigate. See W3C WAI’s headings guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to apply the same audit to your own page

  1. Check the page’s main regions. Identify its header, navigation, primary content and any footer. Use elements such as <header>, <nav> and <main> when they accurately describe those regions, rather than using generic containers by default.
  2. Review images in context. Ask what information or function each image contributes. Provide concise alternative text when it matters to understanding or using the page; avoid adding an unnecessary description to decorative imagery.
  3. Verify every form control has a label. Associate each label and control implicitly or explicitly. For explicit association, make sure the label’s for value exactly matches the control’s id.
  4. Inspect the heading hierarchy. Use heading elements for section headings and nest them in a logical order. Avoid skipping ranks where possible, and do not choose a heading level solely for its visual size.
  5. Use tools as checks, not as the entire evaluation. Faith says she used Chrome DevTools Lighthouse and WAVE. W3C WAI distinguishes automated evaluation from manual review and recommends choosing tools in the context of an evaluation process. Its tool-selection guidance can help clarify what a tool can and cannot assess.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What a perfect Lighthouse score can—and cannot—tell you

Faith reports that after making the fixes, her portfolio received a perfect Lighthouse accessibility score. That is her reported result, not an independently reproduced measurement, and it is not proof that every part of a site is accessible. Automated tools can detect some issues, but they do not replace appropriate manual review. A score is one useful signal within an evaluation, not a complete verdict on a person’s experience.

Faith’s central lesson is practical: meaningful markup makes structure and purpose more explicit. Pair it with thoughtful image alternatives, correctly associated labels, a logical heading hierarchy and evaluation that goes beyond automation, and a page is better positioned to serve a wider range of users.

Sources

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.