Skip to content
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

Investigate: A JSON file correlating input types to their supported attributes with any useful added data #320

Open
a2sheppy opened this issue Oct 31, 2018 · 2 comments
Labels
idle Issues and pull requests with no activity for three months.

Comments

@a2sheppy
Copy link
Contributor

a2sheppy commented Oct 31, 2018

A JSON file that maps <input> element types to the attributes they support, as well as providing links to a page on MDN with information about each attribute and either a link to or a text field providing notes specific to given input types would give us a lot of great capabilities:

  1. We could generate and manage an index of all attributes on the main page, followed by a list of all the types each attribute works with, then sections with a summary of what each attribute does, etc.

  2. Each input type page could use a macro that lists out all the supported attributes for that input type, followed by sections for each supported attribute and their documentation through transclusion, as well as any notes or caveats specific to that input type. We gain a lot of flexibility about presentation this way.

  3. Each attribute's individual documentation page can begin with a chart or table showing which input types support it, with links to those documents.

  4. Best of all, this data could be very useful for 3rd party users of the mdn/data repository. Imagine editors that are able to accurately list out the supported attributes for the specific input type being used, or give you the warnings or notes for that combination of type and attribute, etc.

This is not something that I will look into as part of my current cleanup of the attribute documentation, but it's something that I think would make another leap forward in the usefulness and quality of (not to mention ease of future maintenance of) the input documentation.

@octref
Copy link
Contributor

octref commented Dec 1, 2018

😉 WICG/webcomponents#776

@octref
Copy link
Contributor

octref commented Dec 1, 2018

Also here's how VS Code's HTML is doing it. I'm sure many of the tag / attr definitions are outdated. Would be great if I can import the most up-to-date ones from MDN!

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

No branches or pull requests

2 participants