Skip to content

Commit

Permalink
Merge pull request #648 from danskernesdigitalebibliotek/feature/DDFL…
Browse files Browse the repository at this point in the history
…SBP-631-tilgaengelighed-webform-form-element-til-tekst-input-overholder-ikke-krav-til-kontrast

Enhance accessibility of input and textarea fields [DDFLSBP-631]
  • Loading branch information
clausbruun authored Jun 5, 2024
2 parents 2d4330e + bdd8ad0 commit 5dd22df
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
13 changes: 11 additions & 2 deletions src/stories/Library/Forms/input/Input.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,24 @@ export default {
argTypes: {
label: {
defaultValue: "Navn",
control: { type: "text" },
},
type: {
defaultValue: "text",
control: { type: "select", options: ["text", "password"] },
},
id: {
defaultValue: "id",
control: { type: "text" },
},
description: {
defaultValue: "Dit fulde navn",
control: { type: "text" },
},
validation: {
defaultValue: "Fejlbesked lorem ipsum dolor",
control: { type: "text" },
},
description: { defaultValue: "Dit fulde navn" },
validation: { defaultValue: "Fejlbesked lorem ipsum dolor" },
},
parameters: {
design: {
Expand Down
6 changes: 3 additions & 3 deletions src/stories/Library/Forms/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const Input = (props: InputProps) => {
const invalid = validation ? "true" : "false";
return (
<div
className={clsx("dpl-input", classNames, [
{ "dpl-input--invalid": !!validation },
])}
className={clsx("dpl-input", classNames, {
"dpl-input--invalid": !!validation,
})}
>
<Label id={id}>{label}</Label>
<input
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Library/Forms/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
input {
background-color: transparent;
border: none;
border-bottom: 1px solid $color__global-tertiary-1;
border-bottom: 1px solid $color__global-tertiary-2;
height: 40px;

&:focus {
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Library/Forms/textarea/textarea.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

textarea {
@include typography($typo__body-placeholder);
border: solid 1px $color__global-tertiary-1;
border: solid 1px $color__global-tertiary-2;
width: 100%;
padding: $s-md;
resize: none;
Expand Down

0 comments on commit 5dd22df

Please sign in to comment.