HTMLAttributes specificity
- Dominant language
- TypeScript
- Stars
- 321
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Forgo currently exports one list of `HTMLAttributes` which applies to all elements in `HTMLElementTagNameMap` (with exception of `HTMLMarqueeElement`, which is unused). Not all attributes listed in `HTMLAttributes` apply to all elements, making it possible for invalid properties to exist on certain elements.
For example, [`acceptCharset`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/acceptCharset) is only valid on `form`.
Is there a possibility for these properties to be more specific?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the exported HTMLAttributes type and its use with HTMLElementTagNameMap. Compare the form-only acceptCharset example with the current shared attributes, then define completion as element typings that reject attributes invalid for that element.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100