@pie-players/pie-players-shared 0.3.35 → 0.3.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,6 +79,7 @@
79
79
  onSessionChanged,
80
80
  onModelUpdated,
81
81
  baseHeadingLevel = undefined,
82
+ includeSrHeading = true,
82
83
  }: {
83
84
  itemConfig: ConfigEntity;
84
85
  passageConfig?: ConfigEntity | null;
@@ -127,6 +128,17 @@
127
128
  * ?? player?.getAttribute('baseheadinglevel');
128
129
  */
129
130
  baseHeadingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
131
+ /**
132
+ * Whether to inject a visually-hidden (screen-reader-only) heading at the
133
+ * top of the player's rendered content.
134
+ *
135
+ * Set to `false` in contexts where an SR heading would be redundant or
136
+ * counter-indicated (e.g. the player is already labelled by a surrounding
137
+ * landmark, or the host page manages its own heading structure).
138
+ * Defaults to `true` so that assistive-technology users get a navigable
139
+ * heading out of the box.
140
+ */
141
+ includeSrHeading?: boolean;
130
142
  } = $props();
131
143
 
132
144
  // Track if correct responses have been added
@@ -42,6 +42,7 @@
42
42
  onSessionChanged,
43
43
  onModelUpdated,
44
44
  baseHeadingLevel = undefined,
45
+ includeSrHeading = true,
45
46
  }: {
46
47
  mode?: 'author' | 'preview';
47
48
  itemConfig: ConfigEntity;
@@ -71,6 +72,12 @@
71
72
  * Passed through to `PieItemPlayer` unchanged — see that component for full docs.
72
73
  */
73
74
  baseHeadingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
75
+ /**
76
+ * Whether to inject a visually-hidden (screen-reader-only) heading at the
77
+ * top of the player's rendered content.
78
+ * Passed through to `PieItemPlayer` unchanged — see that component for full docs.
79
+ */
80
+ includeSrHeading?: boolean;
74
81
  } = $props();
75
82
 
76
83
  // Track current mode state
@@ -127,6 +134,7 @@
127
134
  {onSessionChanged}
128
135
  {onModelUpdated}
129
136
  {baseHeadingLevel}
137
+ {includeSrHeading}
130
138
  />
131
139
  {/key}
132
140
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-players-shared",
3
- "version": "0.3.35",
3
+ "version": "0.3.37",
4
4
  "type": "module",
5
5
  "description": "Shared runtime + UI utilities for PIE players",
6
6
  "license": "MIT",