ref(toolbar): add accessibility labels for torture tests (#2685)

* ref(toolbar): add accessibility labels for torture tests

* squash: update propTypes
This commit is contained in:
virtuacoplenny
2018-04-03 12:32:00 -07:00
committed by bbaldino
parent f8717a7135
commit 7c08116dc2
11 changed files with 40 additions and 2 deletions

View File

@@ -14,6 +14,12 @@ class OverflowMenuItem extends Component {
* @static
*/
static propTypes = {
/**
* A succinct description of what the item does. Used by accessibility
* tools and torture tests.
*/
accessibilityLabel: PropTypes.string,
/**
* The icon class to use for displaying an icon before the link text.
*/
@@ -39,6 +45,7 @@ class OverflowMenuItem extends Component {
render() {
return (
<li
aria-label = { this.props.accessibilityLabel }
className = 'overflow-menu-item'
onClick = { this.props.onClick }>
<span className = 'overflow-menu-item-icon'>