Skip to content

Commit

Permalink
Merge pull request #3 from jnachtigall/aria-owns-not-empty
Browse files Browse the repository at this point in the history
Fix JedWatson#1667: Do not output invalid empty 'aria-owns' attr
  • Loading branch information
jnachtigall authored Feb 28, 2018
2 parents 8da7329 + 1be2865 commit 728e2a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ class Select extends React.Component {
'aria-haspopup': '' + isOpen,
'aria-label': this.props['aria-label'],
'aria-labelledby': this.props['aria-labelledby'],
'aria-owns': ariaOwns,
...(ariaOwns ? { 'aria-owns': ariaOwns } : {}),
className: className,
onBlur: this.handleInputBlur,
onChange: this.handleInputChange,
Expand All @@ -903,7 +903,7 @@ class Select extends React.Component {
<div
{...divProps}
aria-expanded={isOpen}
aria-owns={ariaOwns}
{...(ariaOwns ? { 'aria-owns': ariaOwns } : {})}
aria-activedescendant={isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value'}
aria-disabled={'' + this.props.disabled}
aria-label={this.props['aria-label']}
Expand Down

0 comments on commit 728e2a5

Please sign in to comment.