Skip to content

An open-source, self-hosted system for apps built with web technologies.

Refine authentication form controls

zohayrslileh581863e68684
diff --git a/source/client/view/structure/authentication/credentials-form.tsx b/source/client/view/structure/authentication/credentials-form.tsx
index 2cd1326..284cbab 100644
--- a/source/client/view/structure/authentication/credentials-form.tsx
+++ b/source/client/view/structure/authentication/credentials-form.tsx
@@ -57,7 +57,9 @@ export default function CredentialsForm({ title, description, submitLabel, passw
<div className="grid gap-4">
<Input
- label="Username"
+ aria-label="Username"
+ placeholder="Username"
+ size="large"
name="username"
type="text"
autoComplete="username"
@@ -69,7 +71,9 @@ export default function CredentialsForm({ title, description, submitLabel, passw
/>
<Input
- label="Password"
+ aria-label="Password"
+ placeholder="Password"
+ size="large"
name="password"
type="password"
autoComplete={passwordAutocomplete}
@@ -92,6 +96,10 @@ export default function CredentialsForm({ title, description, submitLabel, passw
pending={pending}
+ size="large"
+
+ color="primary:base"
+
style={{ width: "100%" }}
>{pending ? `${submitLabel}…` : submitLabel}</Button>
diff --git a/tests/panel.test.tsx b/tests/panel.test.tsx
index 1c2e19f..b5f62b7 100644
--- a/tests/panel.test.tsx
+++ b/tests/panel.test.tsx
@@ -57,6 +57,10 @@ test("panel contract", async () => {
assert.equal(authentication.match(/<form\b/g)?.length, 1)
assert.match(authentication, /name="username"/)
assert.match(authentication, /name="password"/)
+ assert.match(authentication, /placeholder="Username"/)
+ assert.match(authentication, /placeholder="Password"/)
+ assert.equal(authentication.match(/height:42px/g)?.length, 3)
+ assert.doesNotMatch(authentication, /<label\b/)
assert.match(authentication, /type="submit"/)
assert.match(authentication, /<h2[^>]*>Example System<\/h2>/)
assert.match(authentication, /System version 1.2.3/)