Skip to content

Commit

Permalink
fix(Dropdown): accessibility problem (screen readers)(Semantic-Org#1834)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sole-Valero committed Jul 5, 2017
1 parent c194992 commit 11581c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/modules/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,13 @@ export default class Dropdown extends Component {
} else if (hasValue) {
_text = _.get(this.getItemByValue(value), 'text')
}

return <div className={classes}>{_text}</div>
let finalRenderedText = null
if (classes === 'text') {
finalRenderedText = <div className={classes} role='alert' aria-live='polite'>{_text}</div>
} else {
finalRenderedText = <div className={classes}>{_text}</div>
}
return finalRenderedText
}

renderSearchInput = () => {
Expand Down

0 comments on commit 11581c6

Please sign in to comment.