Skip to content

Commit

Permalink
SearchableSelect LabelledBy Attribute (#583)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaporter-work authored Sep 27, 2024
1 parent 804a562 commit 991e60d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viamrobotics/prime-core",
"version": "0.0.155",
"version": "0.0.156",
"repository": {
"type": "git",
"url": "https://github.com/viamrobotics/prime.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/lib/context-menu/context-menu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export let id: string;
/** Accessible label of the menu. */
export let label: string | undefined = undefined;
/** ID of the element ID that labels the menu. */
/** ID of the element that labels the menu. */
export let labelledBy: string | undefined = undefined;
/** Additional CSS classes to pass to the menu. */
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/lib/select/searchable-select.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export let otherOptionPrefix = '';
/** Error message ID, if any. */
export let errorID = '';
/** ID of the element that labels the SearchableSelect. */
export let labelledBy: string | undefined = undefined;
/**
* Notify the parent of a value change, after Enter key or blur.
*
Expand Down Expand Up @@ -328,6 +331,7 @@ const handleKeydown = createHandleKey({
aria-multiselectable={multiple}
aria-activedescendant={activeID}
aria-errormessage={errorID}
aria-labelledby={labelledBy}
on:focus={handleFocus}
on:blur={handleBlur}
on:keydown={handleKeydown}
Expand Down

0 comments on commit 991e60d

Please sign in to comment.