Guides
Tagging a Page
A practical guide to adding semantic tags to a real browser surface.
Need the shortest path?
Use Quick Start when you want the smallest working route → scan → graph → run flow first.
Something feels off?
Inspect scan output, graph state, active route/context, and dispatch in a practical order.
Need the full surface?
Browse all runtime methods, hooks, extension points, and lifecycle APIs.
Semantic tagging should describe business meaning, not visual styling.
Start with one real route and one real context
<section cinder-route="reports" data-cinder-path="/reports">
<div cinder-context="crop-prices">
...
</div>
</section>A route gives the runtime a navigation destination and route-aware reasoning anchor. A context gives related controls and outputs a shared semantic boundary.
Add fields, filters, actions, and outputs inside the right region
<label for="crop-filter">Crop</label>
<select id="crop-filter" cinder-filter="crop"></select>
<button cinder-action="search">Search</button>
<div tabindex="0" cinder-output="price"></div>Full small example
<section cinder-route="reports" data-cinder-path="/reports">
<div cinder-context="crop-prices">
<label for="crop-filter">Crop</label>
<select id="crop-filter" cinder-filter="crop"></select>
<label for="state-filter">State</label>
<select id="state-filter" cinder-filter="state"></select>
<button cinder-action="search">Search</button>
<div tabindex="0" cinder-output="price"></div>
</div>
</section>Practical tagging rules
- use stable lowercase semantic keys
- prefer meaning over implementation names
- keep the first tagged surface small and understandable
- tag important app surfaces, not every node
- give repeated regions distinct route/context boundaries
- use standard DOM semantics where possible so tag-only execution stays strong
Useful metadata hints
You can strengthen tag-only behavior with practical DOM hints like:
data-cinder-pathdata-cinder-route-selectoraria-currentdata-cinder-submit="true"- accessible labels and placeholders
Common mistakes
Do not use unstable names like component-4 or styling names like green-button. Also avoid repeated action/output keys across app regions without clear route/context structure.
After tagging
Once the page is tagged:
- call
await Cinder.scan(document) - inspect
Cinder.lastScan() - inspect
Cinder.graph() - run a first command before adding bindings or fallback
Related pages
Continue reading