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: a11y combobox attributes (fixes #147) #198

Merged
merged 10 commits into from
Dec 4, 2024
3 changes: 3 additions & 0 deletions templates/matchingDropDown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ export default function MatchingDropDown(props) {
!_isEnabled && 'is-disabled',
hasActiveOption && 'is-selected'
])}
role="combobox"
aria-haspopup="listbox"
aria-expanded={isOpen}
aria-controls="${_id}-matching-item-${_itemIndex}__list"
oliverfoster marked this conversation as resolved.
Show resolved Hide resolved
onMouseDown={onStartInteraction}
onTouchStart={onStartInteraction}
onClick={onButtonClick}
Expand Down Expand Up @@ -205,6 +207,7 @@ export default function MatchingDropDown(props) {
left: buttonOffsetLeft,
width: buttonWidth
}}
id="${_id}-matching-item-${_itemIndex}__list"
oliverfoster marked this conversation as resolved.
Show resolved Hide resolved
role="listbox"
tabIndex="-1"
onBlur={onListBlur}
Expand Down
Loading