Styling attributes surfaced to assistive technology on a synthetic
Role::TextRun node (WCAG 1.3.1 Info and Relationships / EN 301 549
11.5.2.9 “text attributes”). All fields default to “unset”; a rich-text
widget populates them per formatting run so a screen reader can convey
bold / italic / underline / strikethrough spans. AccessKit has no
dedicated bold property, so bold folds into
set_font_weight(700) when no explicit font_weight
is given.
Discriminator kind for synthetic-NodeId hashing. Different
kinds sharing the same (widget_id, element_id) tuple produce
distinct NodeIds so paragraph and run nodes for the same
source element don’t collide.
Whether a given NodeId is a synthetic child node (emitted by a
widget via push_paragraph_child / push_text_run_child) rather
than a widget-derived NodeId.
Legacy infallible converter kept for existing call sites that
never encounter synthetic NodeIds. New code should prefer
node_id_to_widget_id_maybe. Panics in debug for synthetic
ids to catch misrouted calls early.
Convert an AccessKit NodeId back to a WidgetId. Returns None
for synthetic NodeIds (widget-emitted child nodes like TextRuns);
callers that need to route an ActionRequest targeting a
synthetic NodeId must consult WidgetTree::synthetic_parent_map
to find the owning widget.
Stable hash of (parent widget, element id, kind) producing a
synthetic NodeId that survives edits for as long as the
underlying element id is stable. Used by AccessNodeBuilder’s
sub-tree API to allocate NodeIds for paragraph / text-run
children without colliding with widget-derived NodeIds.