Open timwright12 opened 1 year ago
Branch with my testing work on it: chore/add-jsx-a11y-linting
This has the linter installed and setup with errors/warnings showing in the terminal
@alexandec was this resolved on your linting updates earlier?
@Sparowhawk nope, this ticket is specific to a11y linting which we don't currently have installed
We would like to get some level of automated accessibility checks into the code. For this ticket we want to install eslint-plugin-react-native-a11y into the repo. This plugin is a fork of the very popular eslint-plugin-jsx-a11y, which has been used in React development for a long time.
To install
cd VAMobile && yarn add eslint-plugin-react-native-a11y --dev
extends
object withplugin:react-native-a11y/basic
'react-native-a11y/has-accessibility-hint': 1,
to change this to a "warning"yarn lint
As of 2/15,
yarn lint
turns up 82 issues. Most of these issues are related toreact-native-a11y/has-accessibility-hint
. There appear to be places in the app where the omission ofaccessibilityHint
is intentional (this is why we reduce this rule to a warning). There should also be at least 3 "errors".As part of this ticket the engineer should evaluate each instance of a warning and error and make the determination if the instance needs to be fixed or excluded (if it was intended) by turning off the linting rule for that line/block of code.
Acceptance Criteria