SemText

Reference · SemText · Document & structure

<sem-audiences>

SemText element

You list each group here, then mark sections with an audience attribute. The reader picks their group and the page hides the rest. Nothing is deleted — machines still read the whole document.

Names the reader groups a document knows about, so each reader sees the parts meant for them. You list each group here, then mark sections with an audience attribute. The reader picks their group and the page hides the rest. Nothing is deleted — machines still read the whole document. (required, document-unique): the profile token that `audience` specs and the hash parameter refer to. It is an ordinary element id, so it shares the document's id space. (optional): human label; the id renders when absent. (optional, comma list): profiles this one satisfies as well. `operator implies reader` means an operator sees reader content. Closure is transitive; a cycle is an authoring error, warned once and broken.

Example

sem-audiences.html
source
1 <sem-audiences>
2 <sem-profile id="reader" label="Reader"></sem-profile>
3 <sem-profile id="operator" label="Operator" implies="reader"></sem-profile>
4 </sem-audiences>
render

Live render boots with JavaScript — the authored source is alongside.

variant: audience qualifier on content

Both halves in one document. The active profile is the `sem-audience` hash parameter (`#…&sem-audience=operator`), else the author's default. Fallback running: with no profile the operator note and the shared paragraph carry the native `hidden` and the negated note shows; as operator the note and paragraph show (operator implies reader) and the negated note hides. JS-off everything is visible — and that is also the state this site's Render pane shows today: its pane wiring deliberately excludes the audience handler until the bundle sync, so nothing here carries `hidden` in the screenshot.

variant: audience qualifier on content
sem-audiences-qualifier.html
source
1 <sem-audiences>
2 <sem-profile id="reader" label="Reader"></sem-profile>
3 <sem-profile id="operator" label="Operator" implies="reader"></sem-profile>
4 </sem-audiences>
5
6 <sem-note audience="operator">Operators: the token endpoint answers behind the MinIO port-forward — start it before the migration step.</sem-note>
7 <sem-note audience="!operator">Everyone except operators: ask an operator to run the migration for you.</sem-note>
8 <p data-audience="reader, operator">Shared planning notes for both working profiles.</p>
render

Live render boots with JavaScript — the authored source is alongside.

variant: authoring error — mixed positive and negated terms

"operator, !reader" mixes `!` with plain terms: warned once, and the positive terms decide — the negated one is ignored. So with the bundle running this note is hidden when no profile is active (a positive term never matches without one) and shown as `operator` — never as `reader`, because the `!reader` plays no part. As rendered here the note shows: this pane has no audience gating, the same all-visible state as JS-off. Unknown tokens fail a spec open instead — see the next variant.

variant: authoring error — mixed positive and negated terms
sem-audiences-mixed-spec.html
source
1 <sem-audiences>
2 <sem-profile id="reader" label="Reader"></sem-profile>
3 <sem-profile id="operator" label="Operator" implies="reader"></sem-profile>
4 </sem-audiences>
5
6 <sem-note audience="operator, !reader">Warned spec: the positive terms decide, the negated one is ignored.</sem-note>
render

Live render boots with JavaScript — the authored source is alongside.

variant: unknown profile token

A token no sem-audiences block declares is an authoring error: warned, and the content shows anyway — fail-open, because a typo must never hide content.

variant: unknown profile token
sem-audiences-unknown-profile.html
source
1 <sem-note audience="reviewer">No reviewer profile is declared: warned, and shown regardless.</sem-note>
render

Live render boots with JavaScript — the authored source is alongside.

Source: spec/schema/sem-audiences.md