mdn / mdn/data

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

Open
#320 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

idle
Dominant language
JavaScript
Stars
787
Forks
216
Avg merge
1d 5h
Merged PRs (30d)
6

Description

A JSON file that maps `` 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named in the issue. Start by reviewing the existing input and attribute data in the mdn/data repository, then define the scope and structure needed for the proposed correlations and supporting links or notes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.