add aria-labels
This commit is contained in:
parent
f4d49f49a5
commit
ca9afab246
6 changed files with 13 additions and 33 deletions
|
@ -5,26 +5,24 @@ function LoginForm(props) {
|
||||||
return (
|
return (
|
||||||
<form className="login-form" onSubmit={handleSubmit(props.loginUser.bind(this))}>
|
<form className="login-form" onSubmit={handleSubmit(props.loginUser.bind(this))}>
|
||||||
<p className="login-form__field">
|
<p className="login-form__field">
|
||||||
<label className="login-form__email-label" htmlFor="email">Email:</label>
|
|
||||||
<input
|
<input
|
||||||
className="login-form__email-input"
|
className="login-form__email-input"
|
||||||
id="email"
|
aria-label="email"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
{...email}
|
{...email}
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p className="login-form__field">
|
<p className="login-form__field">
|
||||||
<label className="signup-form__password-label" htmlFor="password">Password:</label>
|
|
||||||
<input
|
<input
|
||||||
className="signup-form__password-input"
|
className="signup-form__password-input"
|
||||||
id="password"
|
aria-label="password"
|
||||||
type="password"
|
type="password"
|
||||||
placeholder="Password"
|
placeholder="Password"
|
||||||
{...password}
|
{...password}
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<input type="submit" value="Login" />
|
<input type="submit" value="Login" aria-label="login" />
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,51 +5,42 @@ function SignupForm(props) {
|
||||||
return (
|
return (
|
||||||
<form className="signup-form" onSubmit={handleSubmit(props.signUpUser.bind(this))}>
|
<form className="signup-form" onSubmit={handleSubmit(props.signUpUser.bind(this))}>
|
||||||
<p className="signup-form__field">
|
<p className="signup-form__field">
|
||||||
<label className="signup-form__username-label" htmlFor="username">Username:</label>
|
|
||||||
<input
|
<input
|
||||||
className="signup-form__username-input"
|
className="signup-form__username-input"
|
||||||
id="username"
|
aria-label="username"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Username"
|
placeholder="Username"
|
||||||
{...username}
|
{...username}
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p className="signup-form__field">
|
<p className="signup-form__field">
|
||||||
<label className="signup-form__email-label" htmlFor="email">Email:</label>
|
|
||||||
<input
|
<input
|
||||||
className="signup-form__email-input"
|
className="signup-form__email-input"
|
||||||
id="email"
|
aria-label="email"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Email"
|
placeholder="Email"
|
||||||
{...email}
|
{...email}
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p className="signup-form__field">
|
<p className="signup-form__field">
|
||||||
<label className="signup-form__password-label" htmlFor="password">Password:</label>
|
|
||||||
<input
|
<input
|
||||||
className="signup-form__password-input"
|
className="signup-form__password-input"
|
||||||
id="password"
|
aria-label="password"
|
||||||
type="password"
|
type="password"
|
||||||
placeholder="Password"
|
placeholder="Password"
|
||||||
{...password}
|
{...password}
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p className="signup-form__field">
|
<p className="signup-form__field">
|
||||||
<label
|
|
||||||
className="signup-form__confirm-password-label"
|
|
||||||
htmlFor="confirm-password"
|
|
||||||
>
|
|
||||||
Confirm Password:
|
|
||||||
</label>
|
|
||||||
<input
|
<input
|
||||||
className="signup-form__confirm-password-input"
|
className="signup-form__confirm-password-input"
|
||||||
id="confirm-password"
|
|
||||||
type="password"
|
type="password"
|
||||||
placeholder="Confirm Password"
|
placeholder="Confirm Password"
|
||||||
|
aria-label="confirm password"
|
||||||
{...confirmPassword}
|
{...confirmPassword}
|
||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<input type="submit" value="Sign Up" />
|
<input type="submit" value="Sign Up" aria-label="sign up" />
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,14 +54,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview-console__collapse {
|
.preview-console__collapse {
|
||||||
|
@extend %icon;
|
||||||
.preview-console--collapsed & {
|
.preview-console--collapsed & {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.preview-console__expand {
|
.preview-console__expand {
|
||||||
|
@extend %icon;
|
||||||
display: none;
|
display: none;
|
||||||
.preview-console--collapsed & {
|
.preview-console--collapsed & {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,7 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form__email-label,
|
.login-form__email-input,
|
||||||
.login-form__password-label {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-form__email-input,
|
|
||||||
.login-form__password-input {
|
.login-form__password-input {
|
||||||
width: #{300 / $base-font-size}rem;
|
width: #{300 / $base-font-size}rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar__add {
|
.sidebar__add {
|
||||||
|
@extend %icon;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: #{26 / $base-font-size}rem;
|
height: #{26 / $base-font-size}rem;
|
||||||
margin-right: #{16 / $base-font-size}rem;
|
margin-right: #{16 / $base-font-size}rem;
|
||||||
|
|
|
@ -6,13 +6,6 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.signup-form__username-label,
|
|
||||||
.signup-form__email-label,
|
|
||||||
.signup-form__password-label,
|
|
||||||
.signup-form__confirm-password-label {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.signup-form__username-input,
|
.signup-form__username-input,
|
||||||
.signup-form__email-input,
|
.signup-form__email-input,
|
||||||
.signup-form__password-input,
|
.signup-form__password-input,
|
||||||
|
|
Loading…
Reference in a new issue