import {
  hiddenFromAT
, listensTo
, devices
} from '../util'

export default ctx => function (tagName, props, children) {
  const hidden   = hiddenFromAT(props)
  const disabled = props.ariaDisabled === true
  const readOnly = props.ariaReadonly === true
  const onChange = listensTo(props, 'onChange')

  if ( !(hidden || disabled || readOnly)&& onChange ) {
    ctx.report({
      msg: '`onBlur` should be preferred over `onChange`, unless absolutely necessary '
         + 'and it has no negative consequences for keyboard only or screen-reader users.'
    , url: 'http://webaim.org/techniques/javascript/eventhandlers#onchange'
    , affects: [
        devices.keyboardOnly
      , devices.screenReaders
      ]
    })
  }
}

@@ -39,16 +39,26 @@
 devices%0A
+, trueish%0A
 %7D from '
@@ -185,22 +185,32 @@
 abled = 
+trueish(
 props
-.
+, '
 ariaDisa
@@ -213,25 +213,18 @@
 Disabled
- === true
+')
 %0A  const
@@ -239,14 +239,24 @@
 y = 
+trueish(
 props
-.
+, '
 aria
@@ -267,17 +267,10 @@
 only
- === true
+')
 %0A  c

use trueish