Frontend Developer

Case File: The Page Made of Divs

A small business has a website that looks fine and is nearly useless to anyone who cannot see it: every part is a plain div, so a screen reader announces no headings, no menu and no main content. Rebuild the page with elements that mean something (header, nav, main, section, headings, footer), a language, working menu links and useful alt text, and watch the lab test the real rendered page. The business and its sections are generated for you alone.

45 min

Sabi Logistics · Page 1

The Page Made of Divs

A customer who is blind tried to use a local business's website and gave up in two minutes

Zainab Compliance officer · Phone call

Zainab. We have just had a complaint from a customer who is blind. She tried to use the website of one of our partner businesses to find the opening hours and gave up. Her screen reader told her, in her words, “there is a lot of text and nothing to tell me where anything is”. I looked at the page. It looks perfectly nice. Then I looked at the code, and it is divs, all the way down.

I am not a developer, so tell me if I have this right: the page has no headings, no menu and no main area as far as the software is concerned, and the pictures have no descriptions. Please fix the page so that it works for her, and for everyone else who does not browse with their eyes: people with screen readers, people who use only a keyboard, and the search engines that also read the page like a blind visitor.

The page should look the same afterwards. This is about meaning, not decoration.

The brief

What you need to know first.

  • HTML describes meaning, CSS describes looks. A div has no meaning: it is a box. Browsers, screen readers and search engines understand elements that carry meaning. When you use the right element you get behaviour for free (keyboard access, an outline, the right announcement) and you write less code.
  • Landmarks are the large parts of a page that assistive technology lets a user jump between: header (the top of the page, with the name and the menu), nav (a group of links for moving around), main (the content that is the point of the page, once per page) and footer (the bottom). A screen-reader user can say “go to main” and skip the menu.
  • Headings make an outline: one h1 for the page title, h2 for each section, h3 for parts of a section. Do not skip levels (h1 then h3), and do not choose a heading level for its size: use CSS for size.
  • Sections. A section groups related content under a heading. Give it an id so that the menu can link to it: <section id="visit"><h2>Visit us</h2>…, and <a href="#visit">.
  • The language. <html lang="en"> tells a screen reader which voice and pronunciation to use. Without it, English text may be read with the wrong accent.
  • Alt text. Every img needs an alt: a short description of what the picture shows or what it is for (“The front of the shop, with its blue door”). A decorative picture gets alt="". A filename is not a description.
  • The CSS of the starter targets class names such as .top and .title. When you change an element, change its selector too (header, h1, h2, footer) or the look will change.
  • Test it yourself. Press Tab to see what a keyboard user reaches, and read the page with your eyes closed, as an outline: header, menu, main, three sections. Press Check my work: the lab tests the real page that you see.

The lab gives you a page for a business and three sections, generated for you alone.

Preparing your page…

🔒 The debrief unlocks when you close the case. Finish the lab above.

Write the accessibility note

Write the note for the compliance officer: what was wrong with the page for a person who uses a screen reader, which elements you used instead of divs (landmarks and headings) and what each one gives to the user, how the menu now reaches the sections, what you did about the pictures and the language, and what you would add beyond this (automated checks, a skip link, testing with real people).

0 words

🧪 Want to practise this on your own computer? See how to set up your lab →

📝

Knowledge Check

1 of 3

Why do headings (h1, h2) matter to a person who uses a screen reader?

Report a problem

About: /lessons/case-the-div-soup