Skip to content

Instantly share code, notes, and snippets.

@bloodyowl
Last active August 29, 2015 14:17
Show Gist options
  • Save bloodyowl/60dd4ee53837e1b26db7 to your computer and use it in GitHub Desktop.
Save bloodyowl/60dd4ee53837e1b26db7 to your computer and use it in GitHub Desktop.
class AccessibleComponent extends Component {
render() {
return (
<div>
<div aria-label={this.props.label}>foo</div>
</div>
)
}
}
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