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(combobox): announces all selected items to AT users #7323

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
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
24 changes: 10 additions & 14 deletions packages/calcite-components/src/components/combobox/combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,8 @@ export class Combobox
aria-activedescendant={this.activeDescendant}
aria-autocomplete="list"
aria-controls={`${listboxUidPrefix}${guid}`}
aria-expanded={toAriaBoolean(open)}
aria-haspopup="listbox"
aria-label={getLabelText(this)}
class={{
input: true,
Expand All @@ -1207,6 +1209,7 @@ export class Combobox
onFocus={this.comboboxFocusHandler}
onInput={this.inputHandler}
placeholder={placeholder}
role="combobox"
type="text"
// eslint-disable-next-line react/jsx-sort-props
ref={(el) => (this.textInput = el as HTMLInputElement)}
Expand Down Expand Up @@ -1294,18 +1297,18 @@ export class Combobox
}

render(): VNode {
const { guid, label, open } = this;
const { guid, open } = this;
const single = this.selectionMode === "single";
const isClearable = !this.clearDisabled && this.value?.length > 0;

return (
<Host onClick={this.comboboxFocusHandler}>
<div
aria-autocomplete="list"
aria-controls={`${listboxUidPrefix}${guid}`}
aria-expanded={toAriaBoolean(open)}
aria-haspopup="listbox"
aria-label={getLabelText(this)}
// aria-autocomplete="list"
// aria-controls={`${listboxUidPrefix}${guid}`}
//aria-expanded={toAriaBoolean(open)}
// aria-haspopup="listbox"
// aria-label={getLabelText(this)}
aria-live="polite"
aria-owns={`${listboxUidPrefix}${guid}`}
class={{
Expand All @@ -1315,20 +1318,13 @@ export class Combobox
}}
onClick={this.clickHandler}
onKeyDown={this.keyDownHandler}
role="combobox"
// role="listbox"
// eslint-disable-next-line react/jsx-sort-props
ref={this.setReferenceEl}
>
<div class="grid-input">
{this.renderIconStart()}
{!single && this.renderChips()}
<label
class="screen-readers-only"
htmlFor={`${inputUidPrefix}${guid}`}
id={`${labelUidPrefix}${guid}`}
>
{label}
</label>
{this.renderInput()}
</div>
{isClearable ? (
Expand Down