pub struct CodeGroupOptions {
pub mode: TabsMode,
pub wrapper_class: String,
pub panel_class: String,
pub label_class: String,
pub radio_class: String,
pub id_prefix: String,
pub group_label: Option<String>,
}Expand description
CSS class names and the id prefix the rendered markup uses.
Fields§
§mode: TabsModeCss (default) or Aria, the same two-valued option Tabs carries.
THE SAME TYPE, not a copy of it: extensions §13.1 states one mode
option with one vocabulary binding both constructs, and “two constructs
of the same shape do not get different accessibility ceilings because
one of them was written second”. Two identical enums would be two places
for that vocabulary to drift.
Css is the default and an implementation MUST NOT ship Aria as one.
That is §2.5 rather than compatibility: Aria reveals with hidden, so
a page that registers it and ships no script loses every panel but the
first, while Css with no stylesheet at all shows every panel. In Rust
an unknown value is rejected by the type, which is what §13.1 asks of a
host that spells the mode as a string.
wrapper_class: StringClass on the wrapper. Default code-group.
panel_class: StringClass on each code panel. Default code-group-panel.
label_class: StringClass on each tab label. Default code-group-label.
radio_class: StringClass on each radio input. Default code-group-radio.
id_prefix: StringPrefix for generated ids and radio-group names. Default codegroup.
group_label: Option<String>Accessible name for the code group AS A WHOLE, overriding the render’s
labels map for this instance; empty writes no name.
Each tab was already named by its own <label>; the GROUP was anonymous
(markup-carve/carve#1468). None reads codeGroup from the map.