{"id":4348,"date":"2026-11-28T16:12:08","date_gmt":"2026-11-28T16:12:08","guid":{"rendered":"https:\/\/danielreitberg.com\/?p=4348"},"modified":"2026-11-28T16:12:08","modified_gmt":"2026-11-28T16:12:08","slug":"dr-ai-447d792db986cd8d2c0e","status":"publish","type":"post","link":"https:\/\/danielreitberg.com\/index.php\/2026\/11\/28\/dr-ai-447d792db986cd8d2c0e\/","title":{"rendered":"Keep a Two-Level Table Header Connected to Its Values"},"content":{"rendered":"<p>An editorial table has a heading for each year and subheadings for counts and percentages. A cell reading 38 is meaningless unless the reader knows both the year and the measure. Keep the visual groups and the programmatically available header relationships in agreement.<\/p>\n<p>Reference: <a href=\"https:\/\/www.w3.org\/WAI\/tutorials\/tables\/multi-level\/\">W3C WAI multi-level tables tutorial<\/a>. The tutorial describes associating complex header structures with data cells.<\/p>\n<h2>Link headers to values<\/h2>\n<p>Start with real table markup and a useful caption. Identify each data cell\u2019s row and column context. Where a complex header layout does not yield clear associations through a simple structure, use the relationships described in the WAI tutorial, such as explicit headers references to unique header IDs. Verify which group and subheading apply to each cell; visual alignment alone does not establish the connection. Consider using separate simpler tables if a multi-level arrangement makes the information unnecessarily hard to follow.<\/p>\n<h2>Test alignment<\/h2>\n<p>Use a fictional table showing two years with Count and Share under each. From one representative body cell, verify that the available context identifies the category, the year and the measure. Move to another cell in the same row and check that the year and measure change appropriately. Try the narrow layout and a supported screen reader\u2019s table navigation. Make one deliberately incorrect association to see whether the review catches a cell naming the wrong year even though its graphic alignment is unchanged.<\/p>\n<p>Retest after a new year or column is added. Shared heading labels can lead to mistakes if the table generator copies an identifier or leaves an old relationship in place.<\/p>\n<p>Check where the units are explained. A percentage and a count should remain distinguishable if the reader jumps straight to a row.<\/p>\n<p>Keep a fixture with several repeated subheadings. That makes a stale ID easier to spot than in a mockup where each word happens to be unique.<\/p>\n<p><!-- drai-run:447d792db986cd8d2c0e --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A value can refer to both a period and a measure.<\/p>\n","protected":false},"author":6,"featured_media":4349,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-4348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/posts\/4348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/comments?post=4348"}],"version-history":[{"count":1,"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/posts\/4348\/revisions"}],"predecessor-version":[{"id":4350,"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/posts\/4348\/revisions\/4350"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/media\/4349"}],"wp:attachment":[{"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/media?parent=4348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/categories?post=4348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/danielreitberg.com\/index.php\/wp-json\/wp\/v2\/tags?post=4348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}