Skip to content

Commit

Permalink
Merge pull request #1026 from comxd/master
Browse files Browse the repository at this point in the history
Fix typo on aria-labelledby attribute
  • Loading branch information
mtriff authored Apr 12, 2022
2 parents 20d3f5c + 72da548 commit 06d16cd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ const example = new Choices(element, {
**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
Expand Down
2 changes: 1 addition & 1 deletion public/types/src/scripts/interfaces/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export interface Options {
*/
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;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/interfaces/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export interface Options {
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;

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('templates', () => {
tabindex="0"
aria-haspopup="true"
aria-expanded="false"
aria-labeledby="${labelId}"
aria-labelledby="${labelId}"
dir="${direction}"
>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const templates = {
div.setAttribute('aria-haspopup', 'true');
div.setAttribute('aria-expanded', 'false');
if (labelId) {
div.setAttribute('aria-labeledby', labelId);
div.setAttribute('aria-labelledby', labelId);
}

return div;
Expand Down

0 comments on commit 06d16cd

Please sign in to comment.