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
)

		- Dropdown.js --> coded added now is more simple.
  • Loading branch information
Sole-Valero committed Jul 7, 2017
1 parent 11581c6 commit b797f52
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/modules/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -1047,13 +1047,10 @@ export default class Dropdown extends Component {
} else if (hasValue) {
_text = _.get(this.getItemByValue(value), 'text')
}
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
return <div className={classes} role='alert' aria-live='polite'>{_text}</div>

return <div className={classes}>{_text}</div>
}

renderSearchInput = () => {
Expand Down

0 comments on commit b797f52

Please sign in to comment.