1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Semantic roles for IR nodes.
//!
//! Semantic roles provide optional structural meaning beyond the content
//! variant. They inform accessibility metadata and can influence
//! fragmentation heuristics (e.g., keeping a heading with its first paragraph).
/// An optional semantic role attached to an IR node.
///
/// These roles are hints — they do not change layout behavior but may
/// influence fragmentation decisions and PDF structure metadata.
///
/// `Ord` is implemented to support use as `BTreeMap` keys in the theme
/// system, which maps roles to resolved styles.