Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enhance a11y #762

Merged
merged 4 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const file = ref(null);
<section>
<o-field class="file">
<o-upload v-slot="{ onclick }" v-model="file">
<o-button tag="a" variant="primary" @click="onclick">
<o-button tag="button" variant="primary" @click="onclick">
<o-icon icon="upload" />
<span>Click to upload</span>
</o-button>
Expand Down
14 changes: 7 additions & 7 deletions packages/docs-next/components/Autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ title: Autocomplete

### Slots

| Name | Description | Bindings |
| ------- | ------------------------------ | ---------- |
| header | Define an additional header | |
| group | Override the option grpup | <br/> |
| default | Override the select option | <br/><br/> |
| empty | Define content for empty state | |
| footer | Define an additional footer | |
| Name | Description | Bindings |
| ------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| header | Define an additional header | |
| group | Override the option grpup | **group** `object` - options group<br/>**index** `number` - option index |
| default | Override the select option | **option** `object` - option object<br/>**value** `unknown` - option value<br/>**index** `number` - option index |
| empty | Define content for empty state | |
| footer | Define an additional footer | |

</div>

Expand Down
7 changes: 4 additions & 3 deletions packages/docs-next/components/Carousel.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ title: Carousel

### Props

| Prop name | Description | Type | Values | Default |
| --------- | ------------------- | ------- | ------ | ----------------------------------------------------------- |
| clickable | Make item clickable | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |
| Prop name | Description | Type | Values | Default |
| --------- | ----------------------------------------------------------------------- | ------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| ariaRole | Role attribute to be passed to the div wrapper for better accessibility | string | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>carousel: {<br>&nbsp;&nbsp;ariaRole: "option"<br>}</code> |
| clickable | Make item clickable | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |

### Slots

Expand Down
22 changes: 11 additions & 11 deletions packages/docs-next/components/Dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ title: Dropdown
| inline | Dropdown content (items) are shown inline, trigger is removed | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |
| label | Trigger label, unnecessary when trgger slot is used | string | - | |
| maxHeight | Max height of dropdown content | string\|number | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>dropdown: {<br>&nbsp;&nbsp;maxHeight: 200<br>}</code> |
| menuId | HTML element ID of dropdown menu element. | string | - | <code style='white-space: nowrap; padding: 0;'>null</code> |
| menuTabindex | Tabindex of dropdown menu element. | number | - | <code style='white-space: nowrap; padding: 0;'>null</code> |
| menuId | HTML element ID of the dropdown menu element | string | - | <code style='white-space: nowrap; padding: 0;'>null</code> |
| menuTabindex | Tabindex of the dropdown menu element | number | - | <code style='white-space: nowrap; padding: 0;'>null</code> |
| menuTag | Dropdown menu tag name | DynamicComponent | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>dropdown: {<br>&nbsp;&nbsp;menuTag: "div"<br>}</code> |
| mobileBreakpoint | Mobile breakpoint as max-width value | string | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>dropdown: {<br>&nbsp;&nbsp;mobileBreakpoint: undefined<br>}</code> |
| mobileModal | Dropdown content (items) are shown into a modal on mobile | boolean | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>dropdown: {<br>&nbsp;&nbsp;mobileModal: true<br>}</code> |
Expand Down Expand Up @@ -95,15 +95,15 @@ title: Dropdown

### Props

| Prop name | Description | Type | Values | Default |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ariaRole | Role attribute to be passed to the list item for better accessibility.<br/>Use menuitem only in situations where your dropdown is related to a navigation menu. | string | `listitem`, `menuitem` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>dropdown: {<br>&nbsp;&nbsp;itemAriaRole: "listitem"<br>}</code> |
| clickable | Item is clickable and emit an event | boolean | - | <code style='white-space: nowrap; padding: 0;'>true</code> |
| disabled | Item is disabled | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |
| label | Item label, unnecessary when default slot is used | string | - | |
| tabindex | Set the tabindex attribute on the dropdown item div (-1 to prevent selection via tab key) | number\|string | - | <code style='white-space: nowrap; padding: 0;'>0</code> |
| tag | Dropdown item tag name | string \| Component | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>dropdown: {<br>&nbsp;&nbsp;itemTag: "div"<br>}</code> |
| value | The value that will be returned on events and v-model | T | - | Default function (see source code) |
| Prop name | Description | Type | Values | Default |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ariaRole | Role attribute to be passed to the list item for better accessibility.<br/>Use menuitem only in situations where your dropdown is related to a navigation menu. | string | `listitem`, `menuitem`, `button` | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>dropdown: {<br>&nbsp;&nbsp;itemAriaRole: "listitem"<br>}</code> |
| clickable | Item is clickable and emit an event | boolean | - | <code style='white-space: nowrap; padding: 0;'>true</code> |
| disabled | Item is disabled | boolean | - | <code style='white-space: nowrap; padding: 0;'>false</code> |
| label | Item label, unnecessary when default slot is used | string | - | |
| tabindex | Set the tabindex attribute on the dropdown item div (-1 to prevent selection via tab key) | number\|string | - | <code style='white-space: nowrap; padding: 0;'>0</code> |
| tag | Dropdown item tag name | string \| Component | - | <div><small>From <b>config</b>:</small></div><code style='white-space: nowrap; padding: 0;'>dropdown: {<br>&nbsp;&nbsp;itemTag: "div"<br>}</code> |
| value | The value that will be returned on events and v-model | T | - | Default function (see source code) |

### Events

Expand Down
Loading
Loading