Skip to content
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
13 changes: 13 additions & 0 deletions docs/api/props.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## ariaLabel

This value will be bound to the [aria-label
HTML attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)
for the search input. Defaults to `Search for option`.

```js
ariaLabel: {
type: String,
default: 'Search for option'
},
```

## appendToBody <Badge text="v3.7.0+" />

Append the dropdown element to the end of the body
Expand Down
11 changes: 10 additions & 1 deletion src/components/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
role="combobox"
:aria-expanded="dropdownOpen.toString()"
:aria-owns="`vs${uid}__listbox`"
aria-label="Search for option"
:aria-label="ariaLabel"
v-click-outside="clickOutside"
@mousedown="toggleDropdown($event)"
>
Expand Down Expand Up @@ -246,6 +246,15 @@ export default {
default: false,
},

/**
* Sets the value of the 'aria-label' for the search `<input>`.
* @type {String}
*/
ariaLabel: {
type: String,
default: 'Search for option',
},

/**
* Enable/disable filtering the options.
* @type {Boolean}
Expand Down