@texaryn/web-components 0.1.0 → 0.3.0
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.
- package/CHANGELOG.md +44 -0
- package/dist/action-names.d.ts +17 -0
- package/dist/action-names.d.ts.map +1 -0
- package/dist/action-names.js +28 -0
- package/dist/action-names.js.map +1 -0
- package/dist/containers.d.ts.map +1 -1
- package/dist/containers.js +11 -0
- package/dist/containers.js.map +1 -1
- package/dist/fields.d.ts +3 -0
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +52 -3
- package/dist/fields.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @texaryn/web-components
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 04270e8: Give every array action control an accessible name that says which row it acts on.
|
|
8
|
+
|
|
9
|
+
Five buttons all announced as "Remove" leave a screen reader user guessing. Each now carries the current 1-based position and whatever schema titles exist, so "Remove Contact 2 from Contacts", degrading to "Remove item 2" when nothing is titled. Reorder controls read "Move up Contact 2 in Contacts", and the per-array control reads "Add item to Contacts". The visible words stay "Remove", "Up" and "Add", with the longer string in `aria-label`, which contains the visible text so speech input still works.
|
|
10
|
+
|
|
11
|
+
The row's own value is deliberately not used: it is mutable, often blank, frequently duplicated, and sometimes sensitive. The position is recomputed on every render rather than captured when a row is created, because a row survives a move while its position does not.
|
|
12
|
+
|
|
13
|
+
The add control is named from the item template rather than from the first row, so an empty array still says "Add Tag" where naming it matters most. That needed the template's annotations, which the projection did not carry: `NodeProjection.itemAnnotations` is new and optional, so an adapter that cannot supply it stays valid, and `ArrayMeta.itemTitle` carries the result to renderers.
|
|
14
|
+
|
|
15
|
+
React exposes the decision as `useArrayActions` so its three widget sets cannot drift, and the name builders are exported for custom widgets. Reorder-control parity is unchanged: the three React sets still expose no reorder button.
|
|
16
|
+
- c9b930f: Show a required field's requirement to a sighted user, without announcing it twice.
|
|
17
|
+
|
|
18
|
+
Required was conveyed only through `aria-required`, so a sighted user had nothing to tell a required field from an optional one. Every required label now carries a visible `(required)`.
|
|
19
|
+
|
|
20
|
+
Three channels carry that one fact and are deliberately kept separate. The visible label reads "Full Name (required)". The accessible name stays exactly "Full Name", because the indicator is `aria-hidden` and `aria-required` already reports the state; putting it in the name as well makes some screen readers say it twice. WCAG's Label in Name allows exactly this omission when the state is surfaced programmatically.
|
|
21
|
+
|
|
22
|
+
The indicator is the word rather than an asterisk, so nothing has to be explained elsewhere on the form. `field.label` and `fieldLabel()` still return the raw schema title: the decoration lives in the label rendering, so a visual convention does not become the canonical field title a custom widget sees. React exposes `FieldLabelContent` so its three widget sets cannot drift, and each binding exports `REQUIRED_INDICATOR` so a custom widget can match the wording.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [04270e8]
|
|
27
|
+
- @texaryn/core@0.7.0
|
|
28
|
+
|
|
29
|
+
## 0.2.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
- 3e53ca9: Keep each field's error container mounted as a live region instead of inserting it with the message already inside.
|
|
34
|
+
|
|
35
|
+
A region that appears together with its content is not reliably announced, which is what every binding did: React and Vue rendered nothing until an error existed, and Web Components kept the node but hid it, which takes it out of the accessibility tree just the same. The container now exists from mount, stays empty while the field is valid, and only its contents change.
|
|
36
|
+
|
|
37
|
+
It is `aria-live="polite" aria-atomic="true"` rather than `role="alert"`. This is a public semantic change: `ErrorProps` promised `role: 'alert'` and now carries the live-region attributes instead. Alert is assertive, and validation runs on change, blur and submit, so keeping it would have interrupted typing and spoken once per failing field on submit. `aria-describedby` stays conditional, pointing at the region only while it has something to say. `ErrorSummary` loses its `role="alert"` and keeps rendering conditionally, because the fields now announce their own errors and an aggregate region would repeat the same validation event.
|
|
38
|
+
- e7c00ce: Render a schema's `readOnly` as read-only rather than disabled, and enforce it in the runtime.
|
|
39
|
+
|
|
40
|
+
A disabled control is not focusable and is announced differently; a read-only one stays focusable and selectable, which is what `readOnly` means. Compiled nodes now carry a resolved `readOnly` that a read-only object or array passes to everything beneath it, because editing a descendant changes the ancestor's value. The runtime refuses `SetValue`, `InsertItem`, `RemoveItem` and `MoveItem` on a read-only node, so a custom widget set cannot write past the restriction; `Reset` stays allowed as the owning authority replacing state. Renderers use the native `readonly` attribute where HTML has one and `aria-readonly` plus refusing the change where it does not, which is select and checkbox. `disabled` remains part of the node API, but the compiler no longer derives it from `readOnly`, so compiled nodes currently resolve it to false.
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [e7c00ce]
|
|
45
|
+
- @texaryn/core@0.6.0
|
|
46
|
+
|
|
3
47
|
## 0.1.0
|
|
4
48
|
|
|
5
49
|
### Minor Changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessible names for the controls an array renders.
|
|
3
|
+
*
|
|
4
|
+
* A deliberate reimplementation rather than an import: this package depends on
|
|
5
|
+
* no other binding. Nothing here is renderer specific, and it is now the third
|
|
6
|
+
* copy, so a framework-neutral home is overdue; that move belongs in its own
|
|
7
|
+
* change rather than riding along with an accessibility fix.
|
|
8
|
+
*
|
|
9
|
+
* The name carries the current 1-based position, because that is what a person
|
|
10
|
+
* means by "the second contact"; the stable item id is implementation identity.
|
|
11
|
+
* The row's own value is deliberately unused: mutable, often blank, frequently
|
|
12
|
+
* duplicated, sometimes sensitive.
|
|
13
|
+
*/
|
|
14
|
+
export declare function removeActionName(position: number, itemTitle: string | undefined, arrayTitle: string | undefined): string;
|
|
15
|
+
export declare function moveUpActionName(position: number, itemTitle: string | undefined, arrayTitle: string | undefined): string;
|
|
16
|
+
export declare function addActionName(itemTitle: string | undefined, arrayTitle: string | undefined): string;
|
|
17
|
+
//# sourceMappingURL=action-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-names.d.ts","sourceRoot":"","sources":["../src/action-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,MAAM,CAER;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,MAAM,CAER;AAED,wBAAgB,aAAa,CAC3B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,MAAM,CAGR"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessible names for the controls an array renders.
|
|
3
|
+
*
|
|
4
|
+
* A deliberate reimplementation rather than an import: this package depends on
|
|
5
|
+
* no other binding. Nothing here is renderer specific, and it is now the third
|
|
6
|
+
* copy, so a framework-neutral home is overdue; that move belongs in its own
|
|
7
|
+
* change rather than riding along with an accessibility fix.
|
|
8
|
+
*
|
|
9
|
+
* The name carries the current 1-based position, because that is what a person
|
|
10
|
+
* means by "the second contact"; the stable item id is implementation identity.
|
|
11
|
+
* The row's own value is deliberately unused: mutable, often blank, frequently
|
|
12
|
+
* duplicated, sometimes sensitive.
|
|
13
|
+
*/
|
|
14
|
+
export function removeActionName(position, itemTitle, arrayTitle) {
|
|
15
|
+
return withContainer(`Remove ${itemTitle ?? 'item'} ${position}`, 'from', arrayTitle);
|
|
16
|
+
}
|
|
17
|
+
export function moveUpActionName(position, itemTitle, arrayTitle) {
|
|
18
|
+
return withContainer(`Move up ${itemTitle ?? 'item'} ${position}`, 'in', arrayTitle);
|
|
19
|
+
}
|
|
20
|
+
export function addActionName(itemTitle, arrayTitle) {
|
|
21
|
+
if (arrayTitle !== undefined)
|
|
22
|
+
return `Add item to ${arrayTitle}`;
|
|
23
|
+
return itemTitle === undefined ? 'Add item' : `Add ${itemTitle}`;
|
|
24
|
+
}
|
|
25
|
+
function withContainer(name, preposition, arrayTitle) {
|
|
26
|
+
return arrayTitle === undefined ? name : `${name} ${preposition} ${arrayTitle}`;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=action-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-names.js","sourceRoot":"","sources":["../src/action-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAAgB,EAChB,SAA6B,EAC7B,UAA8B;IAE9B,OAAO,aAAa,CAAC,UAAU,SAAS,IAAI,MAAM,IAAI,QAAQ,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,CAAA;AACvF,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,QAAgB,EAChB,SAA6B,EAC7B,UAA8B;IAE9B,OAAO,aAAa,CAAC,WAAW,SAAS,IAAI,MAAM,IAAI,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,CAAA;AACtF,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,SAA6B,EAC7B,UAA8B;IAE9B,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,eAAe,UAAU,EAAE,CAAA;IAChE,OAAO,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,SAAS,EAAE,CAAA;AAClE,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,WAAmB,EAAE,UAA8B;IACtF,OAAO,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,WAAW,IAAI,UAAU,EAAE,CAAA;AACjF,CAAC"}
|
package/dist/containers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../src/containers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA+B,MAAM,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,KAAK,EAAE,SAAS,EAAe,aAAa,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../src/containers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA+B,MAAM,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,KAAK,EAAE,SAAS,EAAe,aAAa,EAAE,MAAM,aAAa,CAAA;AA6ExE,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,SAAS,CAqE3E;AAUD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,SAAS,CAqG3E"}
|
package/dist/containers.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { addActionName, moveUpActionName, removeActionName } from './action-names.js';
|
|
1
2
|
function currentNodes(ctx) {
|
|
2
3
|
return ctx.runtime.document.getSnapshot().nodes;
|
|
3
4
|
}
|
|
@@ -215,6 +216,13 @@ export function arrayControl(initial, ctx) {
|
|
|
215
216
|
}
|
|
216
217
|
row.remove.hidden = !(meta?.canRemove ?? false);
|
|
217
218
|
row.up.hidden = !(meta?.canReorder ?? false) || index === 0;
|
|
219
|
+
// Named here rather than in createRow: a row survives a move, so the
|
|
220
|
+
// position in its name is only correct if it is rewritten every pass,
|
|
221
|
+
// the same reason the click handlers resolve their index at click time.
|
|
222
|
+
const itemTitle = child?.annotations.title;
|
|
223
|
+
const arrayTitle = node.annotations.title;
|
|
224
|
+
row.remove.setAttribute('aria-label', removeActionName(index + 1, itemTitle, arrayTitle));
|
|
225
|
+
row.up.setAttribute('aria-label', moveUpActionName(index + 1, itemTitle, arrayTitle));
|
|
218
226
|
elements.push(row.element);
|
|
219
227
|
});
|
|
220
228
|
for (const [itemId, row] of rows) {
|
|
@@ -226,6 +234,9 @@ export function arrayControl(initial, ctx) {
|
|
|
226
234
|
}
|
|
227
235
|
reorder(list, elements);
|
|
228
236
|
add.hidden = !(meta?.canAdd ?? false);
|
|
237
|
+
// The item template's title, not the first row's: a row may not exist yet,
|
|
238
|
+
// which is when naming this matters most.
|
|
239
|
+
add.setAttribute('aria-label', addActionName(meta?.itemTitle, node.annotations.title));
|
|
229
240
|
}
|
|
230
241
|
reconcile(node);
|
|
231
242
|
return {
|
package/dist/containers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containers.js","sourceRoot":"","sources":["../src/containers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"containers.js","sourceRoot":"","sources":["../src/containers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAErF,SAAS,YAAY,CAAC,GAAkB;IACtC,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,CAAA;AACjD,CAAC;AAID;;;;;;GAMG;AACH,SAAS,KAAK,CAAC,MAAe,EAAE,EAAe,EAAE,GAAgB;IAC/D,IAAI,EAAE,CAAC,UAAU,KAAK,MAAM,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;QACxE,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;IAC5B,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,GAAG,CAAC,CAAA;IAC9B,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAS,OAAO,CAAC,MAAmB,EAAE,MAAqB;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAA;IACrC,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAA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O,CAAC,CAAA;QAC5B,CAAC,CAAC,CAAA;QACF,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;YACjC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,SAAQ;YAC9B,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,CAAA;YACtB,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA;YACpB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QACrB,CAAC;QACD,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACvB,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,IAAI,KAAK,CAAC,CAAA;QACrC,2EAA2E;QAC3E,0CAA0C;QAC1C,GAAG,CAAC,YAAY,CAAC,YAAY,EAAE,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAA;IACxF,CAAC;IAED,SAAS,CAAC,IAAI,CAAC,CAAA;IAEf,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM,CAAC,IAAI;YACT,SAAS,CAAC,IAAqB,CAAC,CAAA;QAClC,CAAC;QACD,OAAO;YACL,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE;gBAAE,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,CAAA;YACvD,IAAI,CAAC,KAAK,EAAE,CAAA;QACd,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/dist/fields.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { UINode } from '@texaryn/core';
|
|
2
2
|
import type { DomWidget, RenderContext } from './widget.js';
|
|
3
|
+
/** HTML honours `readonly` on text-like controls only; the rest need ARIA. */
|
|
4
|
+
/** The wording every binding uses, so a custom widget can match it. */
|
|
5
|
+
export declare const REQUIRED_INDICATOR = "(required)";
|
|
3
6
|
export declare const textInput: (node: UINode, ctx: RenderContext) => DomWidget;
|
|
4
7
|
export declare const numberInput: (node: UINode, ctx: RenderContext) => DomWidget;
|
|
5
8
|
export declare const checkbox: (node: UINode, ctx: RenderContext) => DomWidget;
|
package/dist/fields.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AA+
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,MAAM,EAAE,MAAM,eAAe,CAAA;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAmB3D,8EAA8E;AAC9E,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,eAAe,CAAA;AA+K9C,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,KAAK,aAAa,KAAG,SAA6C,CAAA;AAC1G,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,EAAE,KAAK,aAAa,KAAG,SAA6C,CAAA;AAC5G,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,EAAE,KAAK,aAAa,KAAG,SAA8C,CAAA;AAC1G,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,EAAE,KAAK,aAAa,KAAG,SAA2C,CAAA;AACrG,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,EAAE,KAAK,aAAa,KAAG,SAA+C,CAAA"}
|
package/dist/fields.js
CHANGED
|
@@ -13,6 +13,32 @@ function coerce(kind, node, raw) {
|
|
|
13
13
|
function display(value) {
|
|
14
14
|
return value == null ? '' : String(value);
|
|
15
15
|
}
|
|
16
|
+
/** HTML honours `readonly` on text-like controls only; the rest need ARIA. */
|
|
17
|
+
/** The wording every binding uses, so a custom widget can match it. */
|
|
18
|
+
export const REQUIRED_INDICATOR = '(required)';
|
|
19
|
+
/**
|
|
20
|
+
* Three separate channels carry one fact and must not be collapsed. The
|
|
21
|
+
* sighted user reads "(required)"; the accessible name stays the label alone,
|
|
22
|
+
* because aria-required already reports the state and naming it too makes some
|
|
23
|
+
* screen readers say it twice; and the indicator says the word rather than an
|
|
24
|
+
* asterisk, so nobody has to be told elsewhere what a marker means.
|
|
25
|
+
*
|
|
26
|
+
* Rebuilt on every render because a conditional schema can make a field
|
|
27
|
+
* required or optional at any recompile.
|
|
28
|
+
*/
|
|
29
|
+
function writeLabel(label, text, required) {
|
|
30
|
+
const children = [document.createTextNode(text)];
|
|
31
|
+
if (required) {
|
|
32
|
+
const marker = document.createElement('span');
|
|
33
|
+
marker.setAttribute('aria-hidden', 'true');
|
|
34
|
+
marker.textContent = ` ${REQUIRED_INDICATOR}`;
|
|
35
|
+
children.push(marker);
|
|
36
|
+
}
|
|
37
|
+
label.replaceChildren(...children);
|
|
38
|
+
}
|
|
39
|
+
function hasNativeReadOnly(kind) {
|
|
40
|
+
return kind === 'string' || kind === 'number' || kind === 'textarea';
|
|
41
|
+
}
|
|
16
42
|
function createControl(kind) {
|
|
17
43
|
if (kind === 'enum')
|
|
18
44
|
return document.createElement('select');
|
|
@@ -35,12 +61,24 @@ function fieldWidget(kind, initial, ctx) {
|
|
|
35
61
|
const control = createControl(kind);
|
|
36
62
|
const description = document.createElement('div');
|
|
37
63
|
const errors = document.createElement('div');
|
|
38
|
-
|
|
64
|
+
// Set once and never toggled. Hiding the region while empty took it out of
|
|
65
|
+
// the accessibility tree, so unhiding it with content already in place was
|
|
66
|
+
// the same defect as inserting it populated. Polite rather than alert
|
|
67
|
+
// because validation runs on change, blur and submit.
|
|
68
|
+
errors.setAttribute('aria-live', 'polite');
|
|
69
|
+
errors.setAttribute('aria-atomic', 'true');
|
|
39
70
|
root.append(label, control, description, errors);
|
|
40
71
|
const state = new FieldState(ctx.runtime, node, () => render());
|
|
41
72
|
const commit = () => {
|
|
42
73
|
// Read the node at event time, never captured: a stale id after a move
|
|
43
74
|
// would write into the row that took this one's place.
|
|
75
|
+
if (node.readOnly) {
|
|
76
|
+
// The runtime refuses the write anyway. Re-rendering puts the control
|
|
77
|
+
// back, which native readonly does for a text field but not for a
|
|
78
|
+
// select or a checkbox the user just toggled.
|
|
79
|
+
render();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
44
82
|
const value = control instanceof HTMLInputElement && kind === 'boolean'
|
|
45
83
|
? control.checked
|
|
46
84
|
: coerce(kind, node, control.value);
|
|
@@ -74,7 +112,7 @@ function fieldWidget(kind, initial, ctx) {
|
|
|
74
112
|
}));
|
|
75
113
|
}
|
|
76
114
|
function render() {
|
|
77
|
-
label
|
|
115
|
+
writeLabel(label, node.annotations.title ?? node.dataPointer ?? node.id, node.constraints.required === true);
|
|
78
116
|
renderOptions();
|
|
79
117
|
const value = state.value;
|
|
80
118
|
if (control instanceof HTMLInputElement && kind === 'boolean') {
|
|
@@ -88,6 +126,18 @@ function fieldWidget(kind, initial, ctx) {
|
|
|
88
126
|
control.value = text;
|
|
89
127
|
}
|
|
90
128
|
control.disabled = state.disabled;
|
|
129
|
+
// A control HTML has no readonly for can only say so through ARIA, and is
|
|
130
|
+
// put back by commit above.
|
|
131
|
+
if (hasNativeReadOnly(kind)) {
|
|
132
|
+
;
|
|
133
|
+
control.readOnly = node.readOnly;
|
|
134
|
+
}
|
|
135
|
+
else if (node.readOnly) {
|
|
136
|
+
control.setAttribute('aria-readonly', 'true');
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
control.removeAttribute('aria-readonly');
|
|
140
|
+
}
|
|
91
141
|
if (node.placeholder && !(control instanceof HTMLSelectElement))
|
|
92
142
|
control.placeholder = node.placeholder;
|
|
93
143
|
if (node.constraints.required)
|
|
@@ -103,7 +153,6 @@ function fieldWidget(kind, initial, ctx) {
|
|
|
103
153
|
line.textContent = error.message ?? error.keyword;
|
|
104
154
|
return line;
|
|
105
155
|
}));
|
|
106
|
-
errors.hidden = visibleErrors.length === 0;
|
|
107
156
|
const describedBy = [];
|
|
108
157
|
if (helpText)
|
|
109
158
|
describedBy.push(description.id);
|
package/dist/fields.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../src/fields.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAMjC,sGAAsG;AACtG,SAAS,MAAM,CAAC,IAAU,EAAE,IAAe,EAAE,GAAW;IACtD,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClE,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAA;QAC3E,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAA;IACpC,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC3C,CAAC;AAED,SAAS,aAAa,CAAC,IAAU;IAC/B,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;IAC5D,IAAI,IAAI,KAAK,UAAU;QAAE,OAAO,QAA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@texaryn/web-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A <texaryn-form> custom element over the Texaryn runtime, with native default widgets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"CHANGELOG.md"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@texaryn/core": "^0.
|
|
46
|
+
"@texaryn/core": "^0.7.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"jsdom": "^25.0.0",
|
|
50
|
-
"@texaryn/schema-json": "0.
|
|
50
|
+
"@texaryn/schema-json": "0.3.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "tsc --build"
|