Skip to content

Commit

Permalink
Fix aria owns value (JedWatson#1556)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubenthal authored and Billy Vong committed May 25, 2017
1 parent 7db9b14 commit ed9f879
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -868,12 +868,17 @@ const Select = createClass({

if (this.props.disabled || !this.props.searchable) {
const { inputClassName, ...divProps } = this.props.inputProps;

const ariaOwns = classNames({
[this._instancePrefix + '-list']: isOpen,
});

return (
<div
{...divProps}
role="combobox"
aria-expanded={isOpen}
aria-owns={isOpen ? this._instancePrefix + '-list' : this._instancePrefix + '-value'}
aria-owns={ariaOwns}
aria-activedescendant={isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value'}
className={className}
tabIndex={this.props.tabIndex || 0}
Expand Down

0 comments on commit ed9f879

Please sign in to comment.