Browser experiments & working notes
01 / Labels
An outside label.
An inside control.
Activate an internal control from a label outside its component.
for="host"#controlPreparing the controls…
Browser details
- Current path
- Checking browser support…
- Native API surface
- Checking…
- Active adapters
- Waiting for setup…
Automatic checks for the native property. Force fallback loads the selected adapters. Browser alone leaves them out.
Labels
An outside label, an inside control
A label reaches the checkbox selected by the component.
Try: Click either label, then its checkbox.
Wrap the component in its label
Behavior & limits
The first outside label uses for; the second contains its component. Each component also owns a visually hidden native fallback label, so its checkbox stays named when outward element-reference naming is unavailable. Where supported, the adapter merges the outside label with that local name.
It does not create native label.control or input.labels links. DOM readouts do not verify accessible names or screen-reader behavior.
Code sample
Explicit-label markup. Fallback setup hydrates data-reference-target; styling and readiness flags are omitted.
<label id="lj-checkbox-label" for="lj-checkbox-host">Send me release notes</label>
<rt-gallery-checkbox id="lj-checkbox-host" data-reference-target="control">
<template shadowrootmode="open" shadowrootreferencetarget="control">
<label class="visually-hidden" for="control">Release notes preference</label>
<input id="control" type="checkbox">
</template>
</rt-gallery-checkbox>
Functional JavaScript sizes
Functional page JavaScript
4.398 KB 2.026 KB gzipAlways loaded.
Fallback additional
20.951 KB 7.528 KB gzipCore + selected adapters.
Fallback route total
25.349 KB 9.554 KB gzipAlways-loaded and fallback files; shared files counted once.
Native-surface route total
5.387 KB 2.564 KB gzipIncludes 0.989 KB (0.538 KB gzip) of behavioral probes requested only after the property surface is present.
Minified / gzip. 1 KB = 1,000 bytes. Demo-only syntax highlighting is excluded from the functional totals and reported separately below.
Whole-page delivery context
HTML document
15.154 KB 1 requestGenerated markup, including these measurements.
Initial supporting assets
21.802 KB raw 21.179 KB local transfer · 4 requestsStyles, icon, and the highlighting scheduler; functional JS is separate above.
Initial page with fallback
62.305 KB raw 45.887 KB local transfer · 10 requestsDocument + functional fallback path + initial supporting assets, with unique files counted once.
Deferred highlighting
16.700 KB raw 7.831 KB local transfer · 8 requestsEngine, theme, and this page’s grammar closure, requested after a source disclosure opens or during idle time.
“Local transfer” matches the included development server: gzip JavaScript sidecars, but uncompressed HTML, CSS, and SVG. GitHub Pages, browser caching, HTTP headers, and production compression can change transferred bytes and request scheduling. Module preloads fetch functional modules early without evaluating the app and do not add duplicate transfers.
Inspect the 6 generated JavaScript files
Selected adapters: labels.
Gzip totals sum each compressed file. The fallback and native-probe routes are mutually exclusive. Separate CSS files, HTML, JSON, source maps, HTTP headers, and Microlighter assets are excluded. Component styles embedded in JavaScript are included. Transfer sizes depend on compression and caching. Microlighter MIT license.
| File | Delivery | Minified | Gzip |
|---|---|---|---|
labels/main.js |
Page | 3.257 KB | 1.351 KB |
shared/chunks/app-ERKZUBYG.js |
Page | 0.999 KB | 0.537 KB |
shared/chunks/chunk-CLCOZ6O7.js |
Fallback / native probe shared | 0.849 KB | 0.422 KB |
shared/chunks/chunk-S2QLMWTP.js |
Page | 0.142 KB | 0.138 KB |
shared/chunks/detect-X6QVIAY4.js |
Native-surface probe | 0.140 KB | 0.116 KB |
shared/chunks/reference-target.setup-VHWBBDI4.js |
Fallback additional | 20.102 KB | 7.106 KB |
Implementation notes & limitations
Fallback scope
The adapter uses focus-and-click activation and optional outward ARIA reflection. It does not recreate native label.control or control.labels relationships.
Readouts describe DOM state. Check computed names, keyboard behavior and assistive technology separately.