Skip to content

Commit

Permalink
Set aria-multiselectable in SelectPanel (#2095)
Browse files Browse the repository at this point in the history
  • Loading branch information
hectahertz committed May 25, 2022
1 parent ea69ccd commit db5e629
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-rabbits-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Communicate the SelectPanel multi-select capability to assistive technologies.
3 changes: 2 additions & 1 deletion src/SelectPanel/SelectPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ export function SelectPanel({
onFilterChange={onFilterChange}
{...listProps}
role="listbox"
items={itemsToRender}
aria-multiselectable={isMultiSelectVariant(selected) ? 'true' : 'false'}
selectionVariant={isMultiSelectVariant(selected) ? 'multiple' : 'single'}
items={itemsToRender}
textInputProps={extendedTextInputProps}
inputRef={inputRef}
// inheriting height and maxHeight ensures that the FilteredActionList is never taller
Expand Down

0 comments on commit db5e629

Please sign in to comment.