LearnNewsExamplesConnect
Frontmatter
assigneesntbii
createdAtNov 14, 2026, 1:22 AM
updatedAtNov 14, 2026, 4:47 PM
githubUrlhttps://github.com/neomjs/neo/issues/20916
authorneo-gemini-julia
commentsCount2
parentIssue20671
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined1
signals[]
blockedBy[]
blocking[]
closedAtNov 14, 2026, 4:47 PM

Render Neo.app.content.Container main article before sidenav in DOM order

Closed v14.0.0/archive-v14-0-0-chunk-2 enhancementhelp wantedgood first issueaiarchitectureaccessibilityportal
neo-gemini-julia
neo-gemini-julia commented on Nov 14, 2026, 1:22 AM

Context

Live Googlebot/2.1 inspection of neomjs.com content routes on 2026-11-14 shows that Neo.app.content.Container renders the full sidenav tree (<aside>) before the primary page content in DOM order, pushing the article <h1> to byte 59,912–76,924 (36%–47% of the HTML document) with zero <main> landmark tags.

unowned-rationale: Ready for a contributor; maintainers provide planning and review.

The Problem

Because src/app/content/Container.mjs (origin/dev @ a07f581f13) declares 'sidenav-container' (weight: 10, tag: 'aside'), splitter (weight: 20), and pageContainer (weight: 30, default div tag in src/app/content/PageContainer.mjs), every /learn/* and /news/* route renders hundreds of sidebar navigation items before the page's own <h1> and prose:

  • https://neomjs.com/learn/benefits/ArchitectureOverview (127,601 B, Googlebot/2.1 fetch 2026-11-14): 0 <main> tags; <h1> at byte 59,912 after 130 <a href> links, 142 <li> nodes, and 445 identical sidebar words.
  • https://neomjs.com/news/releases/13.4.0 (214,511 B, Googlebot/2.1 fetch 2026-11-14): 0 <main> tags; <h1> at byte 76,924 after 186 <a href> links and 178 <li> nodes.

While Googlebot's 15 MB parser still reaches <article>, placing 130–186 boilerplate links and 445 identical words ahead of <article> with no <main> landmark dilutes contextual link equity, degrades passage/snippet salience (43 core routes sit in GSC Crawled - currently not indexed), and forces screen-reader / keyboard traversal through the entire tree before reaching the page heading unless visual order is decoupled from DOM order.

The Architectural Reality

Design authority: none found (searched: src/app/content/Container.mjs, src/app/content/PageContainer.mjs, resources/scss/src/app/content/Container.scss, and ask_knowledge_base on "Neo.app.content.Container sidenav weight DOM order"). src/app/content/Container.mjs:31-75 uses layout: {ntype: 'hbox', align: 'stretch'} and relied on item weight (10, 20, 30, 40) solely to achieve left-to-right visual order [sidenav | splitter | pageContainer | page-sections] and splitter.resizeTarget: 'previous'.

The Fix

  1. Add semantic <main> landmark (src/app/content/PageContainer.mjs):
    • Configure tag: 'main' on Neo.app.content.PageContainer so every Neo.app.content.Container consumer (Portal.view.learn.MainContainer, Portal.view.news.MainContainer, etc.) emits <main class="neo-app-content-page-container ..."><article ...>...</article><nav ...>...</nav></main>.
  2. Render pageContainer first in DOM order while keeping visual left-to-right layout (src/app/content/Container.mjs + resources/scss/src/app/content/Container.scss):
    • Update item weight in Neo.app.content.Container so pageContainer (<main>) mounts first in VDOM/DOM (weight: 10), followed by page-sections-container (weight: 20), splitter (weight: 30), and 'sidenav-container' (<aside>, weight: 40).
    • Set explicit CSS Flexbox order rules in resources/scss/src/app/content/Container.scss (sidenav-container { order: 1; }, main-content-splitter { order: 2; }, neo-app-content-page-container { order: 3; }, page-sections-container { order: 4; }) so visual desktop and x-small mobile drawer presentation remain pixel-identical.
    • Verify Neo.component.Splitter resize direction (resizeTarget / drag delta sign when 'sidenav-container' follows splitter in DOM order vs visual order, or target 'sidenav-container' explicitly) so dragging the splitter widens/narrows 'sidenav-container' identically to origin/dev.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
Neo.app.content.PageContainer#tag src/app/content/PageContainer.mjs Defaults to 'main' (<main> landmark) Subclass tag override JSDoc on PageContainer Playwright unit spec
Neo.app.content.Container#items src/app/content/Container.mjs:27-75 Emits pageContainer before 'sidenav-container' in DOM; CSS order preserves [sidenav | splitter | pageContainer | sections] visual order and splitter drag Existing item references ('sidenav-container', 'tree', 'content', 'page-sections-container') unchanged JSDoc on Container Playwright unit + component spec

Decision Record impact: none.

Acceptance Criteria

  • Neo.app.content.PageContainer renders with <main> (tag: 'main'), giving /learn/* and /news/* routes 1 <main> landmark wrapping <article>.
  • In Neo.app.content.Container's rendered VDOM/DOM, pageContainer (<main>) precedes 'sidenav-container' (<aside>), placing the article <h1> ahead of the sidenav tree in HTML byte order.
  • Visual left-to-right order ([sidenav-container | splitter | pageContainer | page-sections-container]), x-small responsive sidenav toggle overlay behavior, and main-content-splitter drag-resizing width behavior match origin/dev (getBoundingClientRect verified in Playwright).
  • Targeted Playwright specs pass (npx playwright test --config buildScripts/playwright/playwright.config.unit.mjs on new/updated test/playwright/unit/app/content/Container.spec.mjs).

Out of Scope

  • Trimming the number of expanded <a href> links injected by neomjs/middleware-v2 SsrService (tracked in neomjs/middleware-v2).
  • Changing Portal visual styling, widths, or typography.

Avoided Traps

  • Breaking Neo.component.Splitter drag math: Splitter (src/component/Splitter.mjs) resolves previousSibling / nextSibling in the items array; reordering items without updating resizeTarget ('next' vs 'previous' or explicit sibling resolution) will invert or break splitter resizing unless tested with real bounding rects.
  • Running bare npx playwright test: Always pass Neo's explicit unit/component config (buildScripts/playwright/...).

Related

Parent: #20671 · Related: #20498, neomjs/middleware-v2#47

Live latest-open + closed sweep: checked latest 25 open issues in neomjs/neo (#20790–#20913) + closed search (sitemap seo lastmod sidenav, app/content/Container) at 2026-11-14T00:18Z; no equivalent or prior exclusion found. Backlog: 46 open, orange band (filed as leaf under #20671; carries good first issue + help wanted per daily contributor mandate). A2A in-flight claim sweep: latest 30 messages across all read-states checked at 2026-11-14T00:18Z; no competing claim on src/app/content/*. MC sweep: query_raw_memories on "Discovered currently not indexed sitemap-core lastmod sidenav byte offset 0 non-brand clicks neomjs.com", 5 results, no prior decision found. Own-assignment sweep: 1 open in neomjs/neo (#20671), none overlapping at leaf level. Structure map: N/A (src/app/content/* + resources/scss/src/app/content/* only).

Origin Session ID: b9b9352c-8f99-497f-abc6-d323f2353fdc Retrieval Hint: "Neo.app.content.Container sidenav-container pageContainer main landmark DOM order byte 59912"

ntbii
ntbii Nov 14, 2026, 7:28 AM

Hi! I'd like to work on this issue. I plan to move the main article before the sidebar in DOM order, then add Playwright coverage for the DOM order, responsive sidebar, and splitter behavior.

  • 2026-11-14T06:28:52Z @github-actions assigned to @ntbii

@github-actions - 2026-11-14T06:28:53Z

Thanks for claiming this, @ntbii, and welcome! Assigned to you — you can start now.

Your claim reserves this issue for 3 days (any comment here resets the clock; we still merge the first approve-worthy PR if another lands first or a claim goes quiet).

An automatic reply. How claims work [QUARANTINED_URL: github.com]

ntbii cross-referenced by PR #20942 on Nov 14, 2026, 3:17 PM
ntbii referenced in commit aa6eaba - "fix(content): render main article before sidebar (#20916)" on Nov 14, 2026, 3:49 PM
tobiu referenced in commit b52fd88 - "fix(content): render main article before sidebar (#20916) (#20942) on Nov 14, 2026, 4:47 PM
tobiu closed this issue on Nov 14, 2026, 4:47 PM