Skip to content

Convert JsxDOM.ml to JsxDOM.res and add missing aria attributes #5708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cknitt opened this issue Sep 30, 2022 · 9 comments
Closed

Convert JsxDOM.ml to JsxDOM.res and add missing aria attributes #5708

cknitt opened this issue Sep 30, 2022 · 9 comments

Comments

@cknitt
Copy link
Member

cknitt commented Sep 30, 2022

E.g.

  @as("aria-haspopup")
  ariaHaspopup: [#"false" | #"true" | #menu | #listbox | #tree | #grid | #dialog],

But the .ml -> .res transition is not so easy because of #5706 (comment).

@cknitt
Copy link
Member Author

cknitt commented Oct 2, 2022

Note that #"true" will become the string 'true' in JS, not the boolean value true.

But as aria-haspopup is defined as

'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined;

according to the TypeScript typedef, the strings 'false' and 'true' instead of the boolean values should work fine, too.

The other aria attributes have similar definitions.

@mununki
Copy link
Member

mununki commented Oct 3, 2022

Note that #"true" will become the string 'true' in JS, not the boolean value true.

But as aria-haspopup is defined as

'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined;

according to the TypeScript typedef, the strings 'false' and 'true' instead of the boolean values should work fine, too.

The other aria attributes have similar definitions.

AFAIK, "true" and "false" are fine for the attribute value. Can you share where the aria-haspopup defines as boolean?

@cknitt
Copy link
Member Author

cknitt commented Oct 3, 2022

@cknitt
Copy link
Member Author

cknitt commented Oct 3, 2022

@mununki
Copy link
Member

mununki commented Oct 3, 2022

@mununki
Copy link
Member

mununki commented Oct 3, 2022

@cristianoc Thanks to #5714 , can we try to rewrite the jsxDOM.ml to res? I know that the new syntax of extension record would be introduced and make rewriting job much easier. Just to check if res is allowed now.

@cristianoc
Copy link
Collaborator

Yes .res files should be good to go now.

@mununki
Copy link
Member

mununki commented Oct 4, 2022

#5723 @cknitt

@cknitt
Copy link
Member Author

cknitt commented Oct 7, 2022

Done in #5723, closing! 🎉

@cknitt cknitt closed this as completed Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants