pub fn disabled_rule(selector: &str, depth: Depth) -> StringExpand description
Present, visible, and not answering.
Matches the ARIA attribute as well as the pseudo-class, because :disabled
only matches form elements and half the things this crate emits are not
one: a div carrying .chip or .tab can never be :disabled. Keying on
the accessible state is the pattern [field_rules] already establishes for
aria-invalid, on the reasoning that one fact read by both the styling and
the accessibility tree cannot drift from itself.
The rest depth is re-asserted rather than assumed, because this rule has to
beat the hover and pressed rules above it. It does that on source order at
equal specificity, not by out-specifying them: every rule this function’s
caller emits is (0,2,0), and adding a :not(:disabled) anywhere would raise
one of them and have to be unpicked when this output moves inside its own
cascade layer.
Re-asserted on both axes, through [rest_declarations], which is the
half this got wrong until 0.68.0. depth_declarations alone is empty for
Depth::Flat, so the three flat controls this crate emits – both facet
arms and a suggestion entry – won the contest with nothing to say and kept
the hover surface underneath a control that had stopped answering.