Skip to content

Commit b270931

Browse files
authored
Merge pull request #2281 from Akshat55/combobox-access
fix: correct aria-haspopup value & add aria-controls attribute
2 parents 3694089 + c68b175 commit b270931

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/combobox/combobox.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ import { Observable } from "rxjs";
110110
[attr.aria-expanded]="open"
111111
aria-haspopup="listbox"
112112
[attr.maxlength]="maxLength"
113-
aria-haspopup="true"
113+
[attr.aria-controls]="open ? view?.listId : null"
114114
[attr.aria-autocomplete]="autocomplete"
115115
[placeholder]="placeholder"/>
116116
<svg

src/dropdown/abstract-dropdown-view.class.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export class AbstractDropdownView {
4747
* @deprecated since v4
4848
*/
4949
public size: "sm" | "md" | "xl" = "md";
50+
public listId?: string;
5051
/**
5152
* Returns the `ListItem` that is subsequent to the selected item in the `DropdownList`.
5253
*/

src/dropdown/list/dropdown-list.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import { ScrollCustomEvent } from "./scroll-custom-event.interface";
5151
template: `
5252
<ul
5353
#list
54+
[id]="listId"
5455
role="listbox"
5556
class="bx--list-box__menu bx--multi-select"
5657
(scroll)="emitScroll($event)"

0 commit comments

Comments
 (0)