Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo on aria-labelledby attribute #1026

Merged
merged 1 commit into from
Apr 12, 2022
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
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