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->renderTex--> now always returns the text rendered with aria labels: role='alert' aria-live='polite'
  • Loading branch information
Sole-Valero committed Jul 12, 2017
1 parent f92b365 commit 06e44be
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/modules/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -1047,10 +1047,8 @@ export default class Dropdown extends Component {
} else if (hasValue) {
_text = _.get(this.getItemByValue(value), 'text')
}
if (classes === 'text') {
return <div className={classes} role='alert' aria-live='polite'>{_text}</div>
}
return <div className={classes}>{_text}</div>

return <div className={classes} role='alert' aria-live='polite'>{_text}</div>
}

renderSearchInput = () => {
Expand Down

0 comments on commit 06e44be

Please sign in to comment.