semanticsAndTags
disposition: bound, direction: spec-to-code, basis: implementation
An anatomy rule of the React binding. The element types named below resolve jointly here — which type a node becomes, or what tag and semantics an element takes, is decided by this rule rather than per type.
Keys. text, container, instance
Operands
Every fact the rule reads. Nothing outside this set participates.
| Operand | From |
|---|---|
element.type | spec document |
element.role | spec anatomy (ADR-067) — what the element IS, at most one |
element.actions | spec anatomy (ADR-087) — what activating it DOES, any number |
conventions.specs.states | declared conventions, through the shared concept table — which prop carries a concept |
context.phrasing | the emitting tree — whether an ancestor role constrains this element to phrasing content |
Tag cases
Ordered — first match wins.
| # | When | Emits | Why |
|---|---|---|---|
| 1 | element.role present | the role’s tag — a button, an a, an input — void tags self-closing | A role names a control the platform has a native element for |
| 2 | (element.type = text or context.phrasing = true) | span | Text is phrasing content, and inside a phrasing ancestor a div would be invalid HTML |
| 3 | element.type present | div | The structural default |
ARIA cases
Ordered — first match wins.
| # | When | Emits | Why |
|---|---|---|---|
| 1 | concept = claimed by this element's role | nothing from the generic path — the role emits the platform-native mechanism: a real disabled, a real checked | Role over states for the mechanism; the states entry still names the driving prop, and the stylesheet still writes the concept’s selector |
| 2 | concept.prop = shared with a concept the role claimed | nothing | One prop cannot announce two ways at once — a button carrying both aria-pressed and aria-selected disagrees with itself, and the second is not even valid on that role |
| 3 | concept present | the concept's aria attribute, written when the driving prop is set | The generic path, from the shared concept table |
Handler cases
Ordered — first match wins.
| # | When | Emits | Why |
|---|---|---|---|
| 1 | (element.role's own wiring logic present or element.actions present) | one composed closure per event: the role's logic, then the role's contract prop, then each action body in annotation order | A consumer listening on the prop hears the event before an action can unmount the component |
| 2 | element.role's contract prop, alone present | the plain pass-through — onClick={p.onClick} | Composing costs nothing when nothing composes |
Instance routing
Ordered — first match wins.
| # | When | Emits | Why |
|---|---|---|---|
| 1 | element.type = instance and element.role present | no control of this component's own — the role's contract props route to the instanced component's matching parts (ADR-067 rule 5) | A role on an instance is a routing signal; the composed component keeps its own control and renders it itself |
Otherwise
the default tag, no ARIA, no handlers — An element with no role, no state entry and no action keeps the pre-roles behavior
The precedence module is shared with the Web Components emitter, so the two platforms resolve collisions identically. Cross-concern by nature: it reads anatomy roles, props classifications and actions to emit one element.