import a11y from '../util'

const hasCallback = function (props, name) {
  return typeof props[name] === 'function'
}


const mouseOverMsg =
  'onMouseOver must be accompanied by onFocus for accessibility.'

const mouseOutMsg =
  'onMouseOut must be accompanied by onBlur for accessibility.'

export default ctx => ({

  _any_(tagName, props) {
    if (  hasCallback(props, 'onMouseOver')
      && !hasCallback(props, 'onFocus') ) {
      ctx.report({
        msg: mouseOverMsg
      , affects: [
          a11y.devices.keyboardOnly
        ]
      })
    } else if ( hasCallback(props, 'onMouseOut')
            && !hasCallback(props, 'onBlur') ) {
      ctx.report({
        msg: mouseOutMsg
      , affects: [
          a11y.devices.keyboardOnly
        ]
      })
    }
  }

})

@@ -286,16 +286,97 @@
 lity.'%0A%0A
+const url = 'http://webaim.org/techniques/javascript/eventhandlers#onmouseover'%0A%0A
 export d
@@ -548,24 +548,36 @@
 ouseOverMsg%0A
+      , url%0A
       , affe
@@ -747,32 +747,32 @@
    ctx.report(%7B%0A
-
         msg: mou
@@ -776,24 +776,36 @@
 mouseOutMsg%0A
+      , url%0A
       , affe

add url to mouse-events rule