Skip to content

Commit a6b136d

Browse files
committed
aria* type variables instead rewrite to res
1 parent 1d5cac8 commit a6b136d

File tree

5 files changed

+26
-19
lines changed

5 files changed

+26
-19
lines changed

jscomp/main/builtin_cmi_datasets.ml

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

jscomp/others/jsxDOM.ml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ type domRef
2727

2828
(*
2929
This list isn't exhaustive. We'll add more as we go.
30+
'aria* type variables can be removed once we can rewrite *.ml libs to *res.
3031
*)
31-
type domProps = {
32+
type ('ariaCurrent, 'ariaInvalid, 'ariaHaspopup, 'ariaChecked, 'ariaPressed, 'loading) domProps = {
3233
(* V10 compiler will enable to change label declaration to `key?: string` *)
3334
key: string
3435
[@ns.optional];
@@ -39,15 +40,17 @@ type domProps = {
3940
(* accessibility *)
4041
(* https://www.w3.org/TR/wai-aria-1.1/ *)
4142
(* https://accessibilityresources.org/<aria-tag> is a great resource for these *)
42-
ariaCurrent: [`page | `step | `location | `date | `time | `_true | `_false]
43+
(* ariaCurrent: [`page | `step | `location | `date | `time | `_true | `_false] *)
44+
ariaCurrent: 'ariaCurrent
4345
[@ns.optional] [@bs.as "aria-current"];
4446
ariaDetails: string
4547
[@ns.optional] [@bs.as "aria-details"];
4648
ariaDisabled: bool
4749
[@ns.optional] [@bs.as "aria-disabled"];
4850
ariaHidden: bool
4951
[@ns.optional] [@bs.as "aria-hidden"];
50-
ariaInvalid: [`grammar | `spelling | `_true| `_false]
52+
(* ariaInvalid: [`grammar | `spelling | `_true | `_false ] *)
53+
ariaInvalid: 'ariaInvalid
5154
[@ns.optional] [@bs.as "aria-invalid"];
5255
ariaKeyshortcuts: string
5356
[@ns.optional] [@bs.as "aria-keyshortcuts"];
@@ -58,11 +61,13 @@ type domProps = {
5861
(* Widget Attributes *)
5962
ariaAutocomplete: [`inline | `list | `both | `none]
6063
[@ns.optional] [@bs.as "aria-autocomplete"];
61-
ariaChecked: [`_true | `_false | `mixed] (* https://www.w3.org/TR/wai-aria-1.1/#valuetype_tristate *)
64+
(* ariaChecked: [`_true | `_false | `mixed] https://www.w3.org/TR/wai-aria-1.1/#valuetype_tristate *)
65+
ariaChecked: 'ariaChecked
6266
[@ns.optional] [@bs.as "aria-checked"];
6367
ariaExpanded: bool
6468
[@ns.optional] [@bs.as "aria-expanded"];
65-
ariaHaspopup: [`menu | `listbox | `tree | `grid | `dialog | `_true | `_false]
69+
(* ariaHaspopup: [`menu | `listbox | `tree | `grid | `dialog | `_true | `_false] *)
70+
ariaHaspopup: 'ariaHaspopup
6671
[@ns.optional] [@bs.as "aria-haspopup"];
6772
ariaLevel: int
6873
[@ns.optional] [@bs.as "aria-lavel"];
@@ -76,7 +81,8 @@ type domProps = {
7681
[@ns.optional] [@bs.as "aria-orientation"];
7782
ariaPlaceholder: string
7883
[@ns.optional] [@bs.as "aria-placeholder"];
79-
ariaPressed: [`_true | `_false| `mixed] (* https://www.w3.org/TR/wai-aria-1.1/#valuetype_tristate *)
84+
(* ariaPressed: [`_true | `_false| `mixed] https://www.w3.org/TR/wai-aria-1.1/#valuetype_tristate *)
85+
ariaPressed: 'ariaPressed
8086
[@ns.optional] [@bs.as "aria-pressed"];
8187
ariaReadonly: bool
8288
[@ns.optional] [@bs.as "aria-readonly"];
@@ -275,7 +281,8 @@ type domProps = {
275281
[@ns.optional];
276282
list: string
277283
[@ns.optional];
278-
loading: [`_lazy | `eager]
284+
(* loading: [`_lazy | `eager] *)
285+
loading: 'loading
279286
[@ns.optional];
280287
loop: bool
281288
[@ns.optional];

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

lib/4.06.1/unstable/js_playground_compiler.ml

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

lib/4.06.1/whole_compiler.ml

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)