Commands and consent controls
Use data-1c on native buttons and inputs. Keep keyboard behavior and accessible names.
Commands
| Value | Action |
|---|---|
command:openMain | Open notice |
command:openDetails | Open preferences |
command:acceptAll | Accept through the active framework |
command:rejectAll | Reject optional choices through the active framework |
command:save | Commit current selections |
command:close | Close according to active view/configured behavior |
command:reset | Reset through the runtime |
view:notice, view:details, view:close | Navigation shortcuts |
<div class="brand-actions">
<button type="button" data-1c="command:acceptAll">{{ ui.button.acceptAll }}</button>
<button type="button" data-1c="command:rejectAll">{{ ui.button.rejectAll }}</button>
<button type="button" data-1c="view:details">{{ ui.templateLabels.preferencesLink }}</button>
</div>Close is not a universal Save. Cancel/close in preferences discards staged changes; Save commits. Notice close follows configured geo-resolved behavior. Show it only when appearance.showClose permits it. Commands use event delegation; do not add scripts. dataset: is not a general-purpose customer action API: retain supplied service-detail components for disclosure interactions.
GDPR controls
[[each category in categories]]
<label class="brand-choice">
<input type="checkbox" data-1c="consent:gdpr.category" data-1c-id="{{ category.id }}" />
<span>{{ category.name }}</span>
</label>
[/each]Use consent:gdpr.service with a service ID for individual services. The controlled-binding layer loads current values, handles input changes, and reconciles engine state. Let it own checked state and required-choice disabling. Keep essential-service explanations visible.
Other frameworks
| Framework | Binding examples | Identity |
|---|---|---|
| TCF | consent:tcf.purpose, consent:tcf.vendor | Purpose/vendor ID |
| TCF legitimate interest | consent:tcf.purposeLegitimateInterest, consent:tcf.vendorLegitimateInterest | Matching purpose/vendor ID |
| US | consent:us.sale, consent:us.share, consent:us.limitSensitiveUse | Framework-level; no category ID |
US controls represent opt-out/limitation state. TCF consent and legitimate-interest controls require distinct accessible names and disclosures. Start from matching seeded views; preserve stacks, purpose/vendor disclosures, GPC handling, and sensitive-data gates. Replacing framework bindings with GDPR bindings does not reproduce the same behavior.
TCF consent purpose example
[[each purpose in tcf.purposes]]
<div>
[[if purpose.hasConsentVendors]]
<label>
<input type="checkbox" data-1c="consent:tcf.purpose" data-1c-id="{{ purpose.id }}"
aria-label="{{ purpose.name }} {{ ui.tcf.vendorMeta.consentLabel }}" />
<span>{{ purpose.name }}</span>
</label>
[[/if]]
</div>
[/each]Keep the distinct legitimate-interest controls and all vendor/purpose disclosures from the supplied TCF view. This component does not replace a complete TCF preference center.
US opt-out example
<label>
<input type="checkbox" data-1c="consent:us.sale"
aria-label="{{ ui.us.saleOptOutToggleLabel }} {{ ui.us.saleOptOutName }}" />
<span>{{ ui.us.saleOptOutName }}</span>
</label>
[[if us.sensitivePIInUse]]
<label>
<input type="checkbox" data-1c="consent:us.limitSensitiveUse"
aria-label="{{ ui.us.limitSensitiveUseToggleLabel }} {{ ui.us.limitSensitiveUseName }}" />
<span>{{ ui.us.limitSensitiveUseName }}</span>
</label>
[[/if]]Keep the sale/share and GPC disclosures and other choices from the supplied US view. The engine owns opt-out state and GPC enforcement; the sensitive-use control appears only when configured as relevant.
What stays managed
Custom markup does not replace protocol adapters, persistence, expiry, enforcement, or evidence. Test actual choices: visual checkbox state does not prove a decision was saved. See publication checks.