Skip to content

Commit 9ba7fe4

Browse files
AkiracryairEO
authored andcommitted
Improved implementation of a11y.inputAriaLabel
1 parent 4f468d5 commit 9ba7fe4

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ backspace | <sub>*</sub> | true
11431143
originalInputValueFormat | <sub>Function</sub> | | If you wish your original input/textarea `value` property format to other than the default (which I recommend keeping) you may use this and make sure it returns a *string*.
11441144
mixMode.*insertAfterTag* | <sub>Node/String</sub> | `\u00A0` | `node` or `string` to add after a tag added |
11451145
a11y.*focusableTags* | <sub>Boolean</sub> | false | allows tags to get focus, and also to be deleted via <kbd>Backspace</kbd>
1146-
a11y.*inputAriaLabel* | <sub>String</sub> | `""` | Provides an accessible name for Tagify’s internal `contenteditable` input. When set, the value is applied as `aria-label`. Useful for WCAG compliance when the component replaces a native text input.
1146+
a11y.*inputAriaLabel* | <sub>String</sub> | `"Tags input field"` | Provides an accessible name for Tagify’s internal `contenteditable` input. When set, the value is applied as `aria-label`. Useful for WCAG compliance when the component replaces a native text input.
11471147
dropdown.*enabled* | <sub>Number</sub> | 2 | Minimum characters input for showing a suggestions list. `false` will not render a suggestions list.
11481148
dropdown.*caseSensitive* | <sub>Boolean</sub> | false | if `true`, match **exact** item when a suggestion is selected (from the dropdown) and also more strict matching for dulpicate items. **Ensure** `fuzzySearch` is `false` for this to work.
11491149
dropdown.*maxItems* | <sub>Number</sub> | 10 | Maximum items to show in the suggestions list

src/parts/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
trim : true, // whether or not the value provided should be trimmed, before being added as a tag
3131
a11y: {
3232
focusableTags: false,
33-
inputAriaLabel: null,
33+
inputAriaLabel: "Tags input field",
3434
},
3535

3636
mixMode: {

src/parts/templates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default {
2727
role="textbox"
2828
autocapitalize="false"
2929
autocorrect="off"
30-
${_s.a11y.inputAriaLabel ? `aria-label="${_s.a11y.inputAriaLabel}"` : ""}
30+
aria-label="${_s.a11y.inputAriaLabel}"
3131
aria-autocomplete="both"
3232
aria-multiline="${_s.mode=='mix'?true:false}"></span>`
3333
},

0 commit comments

Comments
 (0)