TOPIC 08/6214 MINNOT STARTED

Reading a page's structure (HTML)

A page has a plan under its paint: a tree of parts with names and labels. Reading that plan shows why a keyboard cannot reach a button and how an automated check finds things.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: a house plan. A plan shows rooms, doors and windows, but paint and furniture come later and are not on the plan. A builder reads the plan to know what is where, and a visitor never sees it.

A web page has a plan too. Daily List is a to-do list app. Under the colours and fonts, the page is a list of parts: a heading, a box for the title, a button, a list of tasks. The plan is written in , and each part is an element. Extra labels on a part are its attributes.

Tom, the tester, uses the tools in his browser to look at the plan. He right-clicks the Save button and chooses Inspect. He expects to see a button, but he sees a plain box with the word Save on it.

That explains a complaint, because Lily uses the keyboard and the Tab key skips the Save button. In this example the plain box has no added keyboard behavior. An enabled native button supplies button semantics and keyboard behavior; a disabled or hidden button may not take focus. A custom control can work too, but its author must supply and test the required semantics and interaction.

The plan picture has a limit. A house plan does not change while you live there. Small programs can change a page plan while the page is open. So the plan you see now may differ from the one it loaded with.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Reading the plan under a page: what each part is, what labels it carries, and whether it is the right kind.

  1. Is it the right kind?
  2. Does it have the right label?
  3. Is its name stable?
Three questions

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
House planHTML
A room or a doorElement
A label on a doorAttribute
Paint and furnitureStyle

WHERE THIS PICTURE STOPS

  • A house plan does not change while you live there. A page plan can be changed by programs while open.
  • A door is a door. A box can look like a button and not be one.
  • Paint is outside the plan. In a page, style files are separate from the markup.

HOOK

Right kind, right label, right name.

REMEMBER IT THIS WAY

A contrast: two neighbours told apart by one test.

Tom sees a box dressed as Save, but the fixture has no keyboard handling. Inspect semantics and test behavior, not appearance alone.

What each part of the trick stands for
In the trickWhat it stands for
Buttonan element that is a button
Plain boxa plain box with the word Save on it

TELL A FRIEND

A house plan shows rooms and doors, and paint comes later. A page plan shows parts and labels, and style comes later.

OFTEN MIXED UP WITH Browser developer tools. The tools lesson shows how to open . This lesson reads what inspect element shows.

PRACTISE AND KEEP

Sources for this topic — 16 sources
  1. Market practice

    Basic HyperText Markup Language (HTML) syntax (Mozilla developer docs, Learn web development) ↗ — Mozilla (developer documentation) · An element has an opening tag, content and a closing tag; attributes hold extra information written as a name, an equals sign and a quoted value (search excerpt, page not opened)

    Per the search excerpt, an element has an opening tag, content and a closing tag. Attributes hold extra information, written as a name, an equals sign and a quoted value. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    HyperText Markup Language (HTML): a good basis for accessibility (Mozilla developer docs, Learn web development) ↗ — Mozilla (developer documentation) · A real button element works with the keyboard and screen readers without extra work, while a plain box made to look like a button needs focus, a role and key handling added by hand (search excerpt, page not opened)

    Per the search excerpt, a real button element works with the keyboard and screen readers without extra work, while a plain box made to look like a button needs focus, a role and key handling added by hand. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Anatomy of the Document Object Model (DOM) (Mozilla developer docs) ↗ — Mozilla (developer documentation) · The browser parses markup into a tree of nodes; each node has one parent except the root (search excerpt, page not opened)

    Per the search excerpt, the browser parses the markup into a tree of nodes, where each node has one parent except the root and an ordered list of children. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    Locator strategies (Selenium documentation) ↗ — Selenium project · Elements can be found by id, name, Cascading Style Sheets selector or XPath; ids should be unique on a page (search excerpt, page not opened)

    Per the search excerpt, the traditional ways to find an element are by id, by name, by Cascading Style Sheets selector and by XPath. Ids should be unique on a page. XPath is a path through the page treated as Extensible Markup Language (XML). · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    Waiting strategies (Selenium documentation) ↗ — Selenium project · An implicit wait is a session-wide setting and an explicit wait polls for one condition; mixing them can cause unpredictable waits (search excerpt, page not opened)

    Per the search excerpt, an implicit wait is a session-wide setting for element lookups, an explicit wait polls for one named condition, and mixing the two can cause unpredictable wait times. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    Understanding common errors (Selenium documentation) ↗ — Selenium project · A stale element reference means the element is no longer attached to the page, usually because it was drawn again; find it again each time it is used (search excerpt, page not opened)

    Per the search excerpt, a stale element reference means the element is no longer attached to the page, usually because the page redrew it; the advice is to find the element again each time it is used. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  7. Market practice

    The iframe element (Mozilla developer docs, HTML reference) ↗ — Mozilla (developer documentation) · An iframe embeds another document inside the current page (search excerpt, page not opened)

    Per the search excerpt, an iframe embeds another document inside the current page as a nested browsing context. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  8. Market practice

    An alt Decision Tree (W3C Web Accessibility Initiative images tutorial) ↗ — World Wide Web Consortium (W3C) · W3C Web Accessibility Initiative tutorial on text alternatives for images (registry entry)

    Per the search excerpt, the tutorial asks what an image is for: decorative images get empty alt text, informative images a short description, and functional images such as image links describe the action or destination. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  9. Market practice

    HTML Living Standard — syntax and id author rules ↗ — WHATWG · 13.1.2 intro and complete13.1.2.1–13.1.2.4: start/end tags, attributes, optional tags; separately complete id author-conformance paragraph/notes at https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute. id uniqueness is per element tree.

    13.1.2 intro and complete13.1.2.1–13.1.2.4: start/end tags, attributes, optional tags; separately complete id author-conformance paragraph/notes at https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute. id uniqueness is per element tree. · Checked 2026-11-07

    Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.

  10. Market practice

    Introduction to the DOM ↗ — Mozilla · Complete DOM introduction and examples read: document/node/element interfaces and live programmatic tree; not painted pixels or a verbatim source copy.

    Complete DOM introduction and examples read: document/node/element interfaces and live programmatic tree; not painted pixels or a verbatim source copy. · Checked 2026-11-07

    Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.

  11. Market practice

    WAI ARIA Authoring Practices — button and link patterns ↗ — World Wide Web Consortium · Complete button pattern and complete linked https://www.w3.org/WAI/ARIA/apg/patterns/link/: button Enter/Space versus link Enter, focus/roles/notes. Authoring guidance, not a normative WCAG conformance certificate.

    Complete button pattern and complete linked https://www.w3.org/WAI/ARIA/apg/patterns/link/: button Enter/Space versus link Enter, focus/roles/notes. Authoring guidance, not a normative WCAG conformance certificate. · Checked 2026-11-07

    Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.

  12. Market practice

    WebDriver2 Working Draft, 2 July 2026 — elements ↗ — World Wide Web Consortium · Complete status/front matter and chapter12 element introduction plus12.1 interactability. Stale if node document not active or node disconnected. Working Draft, not Recommendation; Selenium exceptions were not executed.

    Complete status/front matter and chapter12 element introduction plus12.1 interactability. Stale if node document not active or node disconnected. Working Draft, not Recommendation; Selenium exceptions were not executed. · Checked 2026-11-07

    Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.

  13. Market practice

    Selectors Level4 — relational pseudo-class ↗ — World Wide Web Consortium · Complete section4.5 :has(), examples/notes/restrictions read7November2026; ancestor matches can depend on descendants. Draft section, not all-engine support or whole-spec certification.

    Complete section4.5 :has(), examples/notes/restrictions read7November2026; ancestor matches can depend on descendants. Draft section, not all-engine support or whole-spec certification. · Checked 2026-11-07

    Only the named complete units were actually read. No whole-document, real assistive-technology, all-browser or production application certification. V72 full-domain analysis gate precedes implementation.

  14. Market practice

    Locators (Playwright documentation) ↗ — Microsoft (Playwright) · Complete Locate in Shadow DOM section: default locators pierce open roots; XPath does not, closed roots unsupported. Vendor-specific behavior.

    Says role locators are the preferred choice because they match how users and assistive tools see the page, label locators suit form fields, text locators suit non-interactive elements, and test ids are the most resilient fallback when role or text cannot be used. Says the test id attribute is data-testid by default and can be changed with testIdAttribute. Says a matching locator that resolves to more than one element throws in strict mode for actions, and that first, last and nth are not recommended. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  15. Market practice

    Web Content Accessibility Guidelines2.2, Recommendation12 December 2024 ↗ — World Wide Web Consortium · Pinned WCAG2.2 Recommendation12December2024 complete SC1.1.1 with notes/exceptions: alternatives for informative content; decorative content can be ignored. Not all-WCAG review.

    W3CWCAG2.2 Recommendation12December2024, actualSC1.4.1/2.1.1/2.4.3/2.4.11/2.5.8/3.3.1/3.3.8 previouslyopenedV10,reusedunchangedprimaryreference. Relativebuttonsize notconformancetest; accessiblenames/focus/error/keyboard concretechecks. Newartmusttranscript/alt notcolordependentalone. · Checked 2026-11-06

    Relevant public sections reviewed 6 November 2026 for V11 BA agile/product. See applicability for exact version, scope and access limitations.

  16. Official requirement

    HTML Living Standard — parsing HTML documents (5 November 2026 snapshot) ↗ — WHATWG · HTML Living Standard section 13.2.2: parse errors and normative parsing rules; optional end tags must be checked separately.

    Section13.2.2 parse errors and normative processing rules opened; informative error-code table distinguished. Optional-end-tag syntax must be checked separately. · Checked 2026-11-06

    Opened relevant primary passages on6November2026 via normal web search and document view. Section13.2.2 parse errors and normative processing rules opened; informative error-code table distinguished. Optional-end-tag syntax must be checked separately.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.