-
Notifications
You must be signed in to change notification settings - Fork 1
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 #3 from Applelo/dev
Add documentation, programmatic control with v-model, fix bugs
- Loading branch information
Showing
47 changed files
with
1,481 additions
and
733 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,76 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2.2.4 | ||
with: | ||
version: 7 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: pnpm | ||
|
||
- name: Install | ||
run: pnpm install | ||
|
||
- name: Install Nuxt | ||
run: pnpm run -r dev:prepare | ||
|
||
- name: Build | ||
run: pnpm run -r build | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
lint-test: | ||
runs-on: ubuntu-latest | ||
name: 'Lint: node-16, ubuntu-latest' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: pnpm/action-setup@v2.2.4 | ||
with: | ||
version: 7 | ||
|
||
- name: Set node version to 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: pnpm | ||
|
||
- name: Install | ||
run: pnpm install | ||
|
||
- name: Install Nuxt | ||
run: pnpm run -r dev:prepare | ||
|
||
- name: Build | ||
run: pnpm run -r build | ||
|
||
- name: Lint | ||
run: pnpm lint |
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,31 @@ | ||
name: Deploy Doc | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pnpm/action-setup@v2.2.4 | ||
with: | ||
version: 7 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: pnpm | ||
- run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm run -r docs:build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: packages/documentation/docs/.vitepress/dist |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
node_modules/ | ||
dist/ | ||
LICENSE | ||
pnpm-lock.yaml | ||
pnpm-lock.yaml | ||
.nuxt |
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
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
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,45 @@ | ||
# Accessibility | ||
|
||
The component was build with accessibility in mind. It uses the right HTML element (`ul`, `li`, `nav`, `button`) to be SEO friendly and so, accessibility friendly. | ||
|
||
The structure respects the ARIA Menu pattern and ARIA recommendations. Current menu is only focusable thanks of the use of `tabindex="-1"` attribute on non active menu elements. Also, `role` attributes `menu`, `menuitem` and `none` are use. | ||
|
||
> Feel free to make a PR or an issue if something is wrong about accessibility. It's really important to make the web accessible to everyone. | ||
## Recommendations | ||
|
||
It's primordial to label the **ZoomAvant** drilldown. To do that, add an `aria-label` attribute to the root element like this: | ||
|
||
```vue-html | ||
<ZAvant aria-label="Mobile menu"> | ||
</ZAvant> | ||
``` | ||
|
||
If you have a title which describe the menu, you can use the `aria-labelledby` attribute. | ||
|
||
```vue-html | ||
<div> | ||
<p id="mobile-menu-label">Mobile menu</p> | ||
<ZAvant aria-labelledby="mobile-menu-label"> | ||
</ZAvant> | ||
</div> | ||
``` | ||
|
||
## Keyboard controls | ||
|
||
You can control **ZoomAvant** with your keyboard. | ||
|
||
- Arrow Up / Tab + Shift: Go to the item element | ||
- Arrow Down / Tab: Go to the item element | ||
- Enter / Space : | ||
- Access to the next menu if you are on the Next button | ||
- Access to the previous menu if you are on the Back button | ||
- Escape: Return to the previous menu | ||
- A letter: Focus on the first item with first letter | ||
- Home: | ||
- If focus is on a button, and it is not the first button, moves focus to the first button. | ||
- If focus is on a link, and it is not the first link, moves focus to the first link. | ||
- End: | ||
- If focus is on a button, and it is not the last button, moves focus to the last button. | ||
- If focus is on a link, and it is not the last link, moves focus to the last link. | ||
- Any key that corresponds to a printable character: Move focus to the next item in the current menu whose label begins with that printable character. |
Oops, something went wrong.