Skip to content

Commit

Permalink
Combobox a11y fix (#1456)
Browse files Browse the repository at this point in the history
  • Loading branch information
xman343 authored Aug 2, 2023
1 parent cd9280d commit 1533cd0
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions examples/ComboBox.multipleSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import { ComboBox } from '@itwin/itwinui-react';
import { ComboBox, Label } from '@itwin/itwinui-react';

export default () => {
const options = React.useMemo(
Expand All @@ -23,14 +23,17 @@ export default () => {
]);

return (
<ComboBox
options={options}
inputProps={{ placeholder: 'Housing type' }}
multiple
value={selectedOptions}
onChange={(selected) => {
setSelectedOptions(selected);
}}
/>
<>
<Label htmlFor='housing-input'> Select housing type </Label>
<ComboBox
options={options}
inputProps={{ id: 'housing-input', placeholder: 'Housing type' }}
multiple
value={selectedOptions}
onChange={(selected) => {
setSelectedOptions(selected);
}}
/>
</>
);
};

0 comments on commit 1533cd0

Please sign in to comment.