vercel-labs / vercel-labs/native
Add secure/password mode for canvas text fields
Nobody has claimed this yet.
- Dominant language
- Zig
- Stars
- 7.7k
- Forks
- 314
- Avg merge
- 5h
- Merged PRs (30d)
- 13
Description
Problem
Canvas <text-field> has no password/secure-input mode. Apps that accept API keys or tokens must either render plaintext or keep a second masked buffer whose value intentionally diverges from the editor model.
That workaround can break normal caret/selection/IME reconciliation and cannot provide native protected-text accessibility semantics.
Requested API
A markup/API flag such as:
<text-field secure=true text={secret} on-input=secret_edit />
Expected behavior:
- render a mask instead of the value;
- expose protected/password semantics through accessibility bridges;
- redact the value from automation snapshots, journals, diagnostics, and clipboard copy/cut;
- keep paste and normal
TextInputEventediting functional; - never serialize the plaintext as display-list text.
Current application workaround
Applications currently need to maintain a separate masked buffer whose value diverges from the editor model. This is limited, can break caret/selection/IME reconciliation, and cannot provide protected accessibility semantics.
Native SDK 0.6.3 on Windows 11.
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 canvas implementation and its TextInputEvent, accessibility, automation, journal, diagnostics, clipboard, and display-list paths. Define the secure=true behavior against the requested API and verify that masking, protected accessibility semantics, functional editing, redaction, and plaintext exclusion all work together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- zig
- Domain
- accessibility, desktop, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100