-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(documentation): accessibility (#3835)
- Loading branch information
Showing
7 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
--- | ||
|
||
Updated the Accessibility documentation section with Form Labels guidelines. |
9 changes: 9 additions & 0 deletions
9
...cumentation/src/stories/foundation/accessibility/forms/forms-invisible-labels.sample.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<form> | ||
<input type="text" aria-label="Username" placeholder="Enter your username"> | ||
|
||
<input type="email" aria-label="Email" placeholder="Enter your email"> | ||
|
||
<input type="password" aria-label="Password" placeholder="Enter your password"> | ||
|
||
<button type="submit">Submit</button> | ||
</form> |
12 changes: 12 additions & 0 deletions
12
...cumentation/src/stories/foundation/accessibility/forms/forms-reference-labels.sample.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<form> | ||
<div role="group" aria-labelledby="complex-label"> | ||
<p id="complex-label">Select your favorite fruits:</p> | ||
<input type="checkbox" id="apple" aria-labelledby="complex-label apple-label" /> | ||
<label id="apple-label" for="apple">Apple</label> | ||
<input type="checkbox" id="banana" aria-labelledby="complex-label banana-label" /> | ||
<label id="banana-label" for="banana">Banana</label> | ||
<input type="checkbox" id="orange" aria-labelledby="complex-label orange-label" /> | ||
<label id="orange-label" for="orange">Orange</label> | ||
</div> | ||
<button type="submit">Submit</button> | ||
</form> |
12 changes: 12 additions & 0 deletions
12
...documentation/src/stories/foundation/accessibility/forms/forms-visible-labels.sample.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<form> | ||
<label for="username">Username</label> | ||
<input type="text" id="username" name="username" placeholder="Enter your username"> | ||
|
||
<label for="email">Email</label> | ||
<input type="email" id="email" name="email" placeholder="Enter your email"> | ||
|
||
<label for="password">Password</label> | ||
<input type="password" id="password" name="password" placeholder="Enter your password"> | ||
|
||
<button type="submit">Submit</button> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.