Skip to content

Commit f579b58

Browse files
authored
feat: Add aria-label for the country code dropdown (#519)
1 parent 3c472a1 commit f579b58

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-tel-input",
3-
"version": "9.5.0",
3+
"version": "9.5.1",
44
"description": "International Telephone Input with Vue",
55
"author": "Steven Dao <iamstevendao@gmail.com>",
66
"license": "MIT",
@@ -57,4 +57,4 @@
5757
"input",
5858
"international phone"
5959
]
60-
}
60+
}

src/components/vue-tel-input.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div ref="refRoot"
33
:class="['vue-tel-input', styleClasses, { disabled }]">
44
<div v-click-outside="clickedOutside"
5-
aria-label="Country Code Selector"
5+
:aria-label="dropdownOptions.ariaLabel"
66
aria-haspopup="listbox"
77
:aria-expanded="data.open"
88
role="button"

src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export type PhoneMeta = {
2626
};
2727

2828
export interface DropdownOptions {
29+
ariaLabel?: string
2930
disabled?: boolean
3031
showDialCodeInList?: boolean
3132
showDialCodeInSelection?: boolean

src/utils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ export const allProps = [
8080
description: 'Options for dropdown, see below',
8181
inDemo: false,
8282
},
83+
{
84+
name: 'dropdownOptions.ariaLabel',
85+
default: 'Country Code Selector',
86+
type: String,
87+
description: 'Aria label for the country code selector dropdown',
88+
inDemo: false,
89+
},
8390
{
8491
name: 'dropdownOptions.disabled',
8592
default: false,

0 commit comments

Comments
 (0)