20. Multiple H1s on listing pages; no H1 on horoscope articles — Medium (PV)
Added 11 Nov 2026. Every listing page has about 11 <h1> elements (one per story card plus the collection name). Ordinary articles have one H1; horoscope articles have none.
Cause:
app/isomorphic/components/molecules/listing-story-card/index.js:94defaultsheaderLevelto 1;collection-templates/listing-page-template/index.jsrenders 10 cards without overriding it;molecules/collection-nameadds another H1.story-card1(andmobile-story-card1) also default to 1;slider-with-multiple-big-cardsandvideo-sliderpassheaderLevel={1}.app/isomorphic/components/story-templates/horoscope/index.js:391renders the headline in<div styleName="title">.
🛠️ Fix: card headlines default to H2/H3; one H1 per page (the collection or section name); horoscope headline in an <h1> (keep the class for styling). Each of the 12 signs as <h2 id="<sign>"> in the horoscope template.
DH: the same card defaults exist (listing-story-card line 192, story-card1, story-card7, story-card9 default to 1; story-card18/21/23, slider-with-multiple-big-cards, video-slider, budget and election widgets pass headerLevel={1}). Live result is the opposite problem on section pages: of 228 DH listing URLs, 59 have no H1 (including /india, /india/karnataka, /world, /latest-news, /top-bengaluru-news, /horoscope) and 27 have 11 (tag and author pages: /tags/bengaluru 11, /author/dh-web-desk 10). Fix: one H1 per listing page (section or collection name), cards as H2/H3.
Validated 19 Nov 2026: code and live (Chrome DevTools, headless).
Code (PV tpml upstream/master 0b3f7227, 16 Nov 2026; DH tpml-dh upstream/main ab4a2e58, 18 Nov 2026; read with git grep / git show):
- Headline tag:
atoms/headline/index.js:12renders"h" + headerLevel, soheaderLevel: 1is an<h1>(component default is 3). - PV:
listing-story-card/index.js:94headerLevel: 1(was cited as :96);listing-page-template/index.js:27,33renders 10ListingStoryCards withoutheaderLevel;molecules/collection-name/index.js:11<h1>{name}</h1>;story-card1/index.js:61andmobile-story-card1.js:64default 1;slider-with-multiple-big-cards/index.js:32andvideo-slider/desktop-video-slider.js:37passheaderLevel={1}; horoscope headline<div styleName="title">athoroscope/index.js:391(was :394). The PV #1 fix branch (upstream/ssr-fixab40d7ad) does not change any of this. - DH: all cited defaults confirmed (
listing-story-card:192,story-card1:54,mobile-story-card1:55,story-card7:36,story-card9:52), and theheaderLevel={1}overrides instory-card18/21/23,slider-with-multiple-big-cards:41,video-slider, budget and election widgets. Horoscope headline<div styleName="title">at :604, sign names<div styleName="horoscope-name">at :380. - Cause of "no H1" on DH section pages (new):
pages/section-page/index.jsreturnsnulluntilisInitializedis set, and it is set only inside auseEffect(which does not run on the server). So the server HTML of a section page contains neither the section title (TitleWithBorder, an<h1>) nor the story cards. After JavaScript the page shows one H1 and the stories.
Live (evidence/listing_h1_devtools_2026-11-19.json; rendered DOM after JavaScript vs the same URL's server HTML):
| Page | H1 after JavaScript | H1 in server HTML | Story <h2>s: rendered / server |
Story links in server HTML |
|---|---|---|---|---|
DH /india (section) |
1 ("India") | 0 | 24 / 0 | 12 |
DH /tags/bengaluru (tag) |
11 | 11 | 0 / 0 | 22 |
PV /horoscope (hub) |
11 (hub name + 10 stories) | 11 | 0 / 0 | 22 |
PV /news/karnataka-news (section) |
11 ("ರಾಜ್ಯ" + 10 stories) | 11 | 0 / 0 | 22 |
Reading: PV listings and DH tag pages: confirmed, 11 H1s in both server HTML and rendered page. DH section pages: readers see one correct H1, but Google's first copy has no H1 and no story list (24 story headings appear only after JavaScript). That second part is an internal-linking problem (#32, DH) as much as a heading one. Fix for DH section pages: render the title and the first page of stories on the server (initialise from the server-loaded stories instead of waiting for useEffect), then apply the H2/H3 card change.