-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from niconiahi/niconiahi/main-24-add-documentat…
…ion-for-button docs(button): add first version readme
- Loading branch information
Showing
3 changed files
with
44 additions
and
7 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,12 @@ | ||
## Philosophy | ||
|
||
Accesibility shouldn't be a choice, it should be a given. This library tries to be a mirror of the [WAI-ARIA patterns](https://www.w3.org/WAI/ARIA/apg/patterns/). This library effectively export these accesible atoms to be extended with application specific needs but disregarding the accesibility aspect | ||
|
||
## Characteristics | ||
|
||
- It completely complies to WAI-ARIA specifications | ||
- It's framework agnostic | ||
|
||
## Modules | ||
|
||
- [button](packages/button/README.md) |
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
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 |
---|---|---|
@@ -1 +1,31 @@ | ||
# @ariabones/button | ||
## toggle | ||
|
||
### installation | ||
|
||
``` | ||
npm install @ariabones/button | ||
yarn add @ariabones/button | ||
pnpm install @ariabones/button | ||
``` | ||
|
||
### usage | ||
|
||
```html | ||
<button is="ariabones-button" data-type="toggle" data-pressed="true"> | ||
Toggle button | ||
</button> | ||
``` | ||
|
||
### api | ||
|
||
| property | type | default | description | | ||
| ------------ | ----------------- | ------- | --------------------------------------------------- | | ||
| data-pressed | "true" or "false" | "false" | used to set up the initial value of aria-pressed | | ||
| aria-pressed | "true" or "false" | "false" | indicates if the button is currently pressed or not | | ||
|
||
### keyboard interaction | ||
|
||
| key | description | | ||
| ----- | ------------------ | | ||
| Space | toggles the button | | ||
| Enter | toggles the button | |