Last active
August 29, 2015 14:17
-
-
Save bloodyowl/60dd4ee53837e1b26db7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AccessibleComponent extends Component { | |
render() { | |
return ( | |
<div> | |
<div aria-label={this.props.label}>foo</div> | |
</div> | |
) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AccessibleComponent extends Component { | |
render() { | |
return ( | |
<div> | |
<div aria-labelledby={() => this._label}>foo</div> | |
<div ref={(c) => this._label = c}>bar</div> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment