Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

react-a11y-image-button-has-alt throws on HTMLInputElement #437

Closed
codepunkt opened this issue Jun 15, 2018 · 0 comments
Closed

react-a11y-image-button-has-alt throws on HTMLInputElement #437

codepunkt opened this issue Jun 15, 2018 · 0 comments
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Status: Accepting PRs Type: Bug
Milestone

Comments

@codepunkt
Copy link

codepunkt commented Jun 15, 2018

This is a simple react component that consists of an input element only.

import * as React from 'react'

interface IInputProps {
  type: 'text' | 'password'
}

class Input extends React.Component<IInputProps> {
  public render() {
    return <input type={this.props.type} />
  }
}

export default Input

react-a11y-image-button-has-alt throws throws this error:

The 'react-a11y-image-button-has-alt' rule threw an error in
'/mnt/app/src/components/Input/Input.tsx':

TypeError: Cannot read property 'toLowerCase' of undefined
    at ReactA11yImageButtonHasAltWalker.validateOpeningElement
    (/mnt/app/node_modules/tslint-microsoft-contrib/reactA11yImageButtonHasAltRule.js:66:77)

tslint-microsoft-contrib version is 5.0.3

@JoshuaKGoldberg JoshuaKGoldberg added Type: Bug Status: Accepting PRs Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. labels Jul 4, 2018
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0-beta0 milestone Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Status: Accepting PRs Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants