Skip to content

Commit 9bb1bac

Browse files
m5x5claude
authored andcommitted
Demote tab-widget body from <main> to <div>
The tab widget previously created <main> elements for both its outer body container and per-tab content body. Combined with the shell's own <main>, that meant every tabbed pane view had two or more <main> landmarks per page. The page-level <main> landmark now lives on the shell's `.app-view` in mashlib (see SolidOS/mashlib PR). Tab widget internals become plain <div>s so we have exactly one <main> per page. No styling change: the widget uses `style.tabsMainElement` and `bodyMainStyle` inline, not a `main` selector. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d8fcc5a commit 9bb1bac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tabs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export function tabWidget (options: TabWidgetOptions) {
187187
const navElement = rootElement.appendChild(dom.createElement('nav'))
188188
navElement.setAttribute('style', style.tabsNavElement)
189189

190-
const mainElement = rootElement.appendChild(dom.createElement('main'))
190+
const mainElement = rootElement.appendChild(dom.createElement('div'))
191191

192192
mainElement.setAttribute('style', style.tabsMainElement) // override tabbedtab.css
193193
const tabContainer = navElement.appendChild(dom.createElement('ul'))
@@ -333,7 +333,7 @@ export function tabWidget (options: TabWidgetOptions) {
333333
function getOrCreateContainerElement (ele: TabElement): ContainerElement {
334334
const bodyMain = ele.bodyTR?.children[0] as ContainerElement
335335
if (bodyMain) return bodyMain
336-
const newBodyMain = ele.bodyTR!.appendChild(dom.createElement('main'))
336+
const newBodyMain = ele.bodyTR!.appendChild(dom.createElement('div'))
337337
newBodyMain.setAttribute('style', bodyMainStyle)
338338
return newBodyMain
339339
}

0 commit comments

Comments
 (0)