mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-10 09:52:18 +02:00
Merge pull request #1026 from comxd/master
Fix typo on aria-labelledby attribute
This commit is contained in:
commit
06d16cd857
|
@ -615,7 +615,7 @@ const example = new Choices(element, {
|
||||||
|
|
||||||
**Input types affected:** `select-one`, `select-multiple`
|
**Input types affected:** `select-one`, `select-multiple`
|
||||||
|
|
||||||
**Usage:** The labelId improves accessibility. If set, it will add aria-labeledby to the choices element.
|
**Usage:** The labelId improves accessibility. If set, it will add aria-labelledby to the choices element.
|
||||||
|
|
||||||
### classNames
|
### classNames
|
||||||
|
|
||||||
|
|
|
@ -412,7 +412,7 @@ export interface Options {
|
||||||
*/
|
*/
|
||||||
fuseOptions: Fuse.IFuseOptions<Choices>;
|
fuseOptions: Fuse.IFuseOptions<Choices>;
|
||||||
/**
|
/**
|
||||||
* ID of the connected label to improve a11y. If set, aria-labeledby will be added.
|
* ID of the connected label to improve a11y. If set, aria-labelledby will be added.
|
||||||
*/
|
*/
|
||||||
labelId: string;
|
labelId: string;
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -454,7 +454,7 @@ export interface Options {
|
||||||
fuseOptions: Fuse.IFuseOptions<Choices>;
|
fuseOptions: Fuse.IFuseOptions<Choices>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID of the connected label to improve a11y. If set, aria-labeledby will be added.
|
* ID of the connected label to improve a11y. If set, aria-labelledby will be added.
|
||||||
*/
|
*/
|
||||||
labelId: string;
|
labelId: string;
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ describe('templates', () => {
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false"
|
aria-expanded="false"
|
||||||
aria-labeledby="${labelId}"
|
aria-labelledby="${labelId}"
|
||||||
dir="${direction}"
|
dir="${direction}"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,7 +45,7 @@ const templates = {
|
||||||
div.setAttribute('aria-haspopup', 'true');
|
div.setAttribute('aria-haspopup', 'true');
|
||||||
div.setAttribute('aria-expanded', 'false');
|
div.setAttribute('aria-expanded', 'false');
|
||||||
if (labelId) {
|
if (labelId) {
|
||||||
div.setAttribute('aria-labeledby', labelId);
|
div.setAttribute('aria-labelledby', labelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return div;
|
return div;
|
||||||
|
|
Loading…
Reference in a new issue