fix(client): update eslint and fix issues

The eslint config now includes rules that have been added to Gatsby.
This uncovered some problems with missing labels that have been fixed.
This commit is contained in:
Oliver Eyton-Williams
2020-09-23 14:04:00 +02:00
committed by Mrugesh Mohapatra
parent 5528823151
commit 0a4316b0ae
3 changed files with 2 additions and 2 deletions

View File

@ -19,6 +19,7 @@
"jsx-a11y/aria-proptypes": "error", "jsx-a11y/aria-proptypes": "error",
"jsx-a11y/aria-role": "error", "jsx-a11y/aria-role": "error",
"jsx-a11y/aria-unsupported-elements": "error", "jsx-a11y/aria-unsupported-elements": "error",
"jsx-a11y/control-has-associated-label": "error",
"jsx-a11y/click-events-have-key-events": "error", "jsx-a11y/click-events-have-key-events": "error",
"jsx-a11y/heading-has-content": "error", "jsx-a11y/heading-has-content": "error",
"jsx-a11y/html-has-lang": "error", "jsx-a11y/html-has-lang": "error",

View File

@ -103,7 +103,6 @@ class TimelineInner extends Component {
{format(completedDate, 'MMMM D, YYYY')} {format(completedDate, 'MMMM D, YYYY')}
</time> </time>
</td> </td>
<td />
</tr> </tr>
); );
} }
@ -170,7 +169,6 @@ class TimelineInner extends Component {
<tr> <tr>
<th>Challenge</th> <th>Challenge</th>
<th className='text-center'>Completed</th> <th className='text-center'>Completed</th>
<th />
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -233,6 +233,7 @@ export class Project extends Component {
// index should be fine as a key: // index should be fine as a key:
<label className='video-quiz-option-label' key={index}> <label className='video-quiz-option-label' key={index}>
<input <input
aria-label='Answer'
checked={this.state.selectedOption === index} checked={this.state.selectedOption === index}
className='video-quiz-input-hidden' className='video-quiz-input-hidden'
name='quiz' name='quiz'