Skip to content

Commit

Permalink
add aria and role to checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
FredrikOseberg committed Mar 21, 2018
1 parent 8b092aa commit 7544c90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/app/components/common/form/CheckBox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class CheckBox extends Component {

render() {
const { label } = this.props
const checkMark = this.state.checked ? (
const { checked } = this.state
const checkMark = checked ? (
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'>
<path
fill='#585858'
Expand All @@ -34,7 +35,7 @@ class CheckBox extends Component {
)

const button = (
<button className={ style.checkBox } onClick={ this.handleClick }>
<button className={ style.checkBox } onClick={ this.handleClick } role={ 'checkbox' } aria-checked={ checked }>
{checkMark}
</button>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class CreateWalletSuccessPage extends Component {
render() {
const { showButton } = this.state
const { encryptedWif, address, history } = this.props
console.log(history)

return (
<SuccessPage title={ 'Wallet Created' }>
<InputField value={ address } label={ 'Address' } labelClassNames={ style.createWalletSuccessPageLabel } disabled>
Expand Down

0 comments on commit 7544c90

Please sign in to comment.