material-components / material-components/material-web
[mwc-textfield] - missing autofocus attribute support
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 11.3k
- Forks
- 1.1k
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 13
Description
Is your feature request related to a problem? Please describe.
autofocus property isn't provided in textfield. making it impossible for consumers to natively focus on textfield's input on load of page
Describe the solution you'd like
Forward autofocus property to actual shadowed input
Describe alternatives you've considered
look up the shadowed input programmatically and call its focus method
Additional context
autofocus attribute is quite a common attribute and should be prioritise for a11y reasons
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the mwc-textfield component and its shadowed input implementation. Check how existing input attributes are forwarded, then verify that the autofocus attribute reaches the actual input and focuses it on page load; no specific file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100