Skip to content

Commit

Permalink
Adding label-has-associated-control to jsx-a11y lint rules and associ…
Browse files Browse the repository at this point in the history
…ated UI fixes (elastic#27039)
  • Loading branch information
bhavyarm authored Dec 12, 2018
1 parent af681c2 commit af9d3ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ module.exports = {
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/anchor-has-content': 'off',
'jsx-a11y/tabindex-no-positive': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/aria-role': 'off',
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ module.exports = {
'jsx-a11y/role-supports-aria-props': 'error',
'jsx-a11y/scope': 'error',
'jsx-a11y/tabindex-no-positive': 'error',
'jsx-a11y/label-has-associated-control': 'error',
'react/jsx-equals-spacing': ['error', 'never'],
'react/jsx-indent': ['error', 2],
'react/no-will-update-set-state': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export function NumberParameter({ id, label, value, setParameter }) {
<div className="kuiSideBarFormRow">
<label
className="kuiSideBarFormRow__label"
htmlFor={id}
>
{label}
</label>
Expand All @@ -38,6 +39,7 @@ export function NumberParameter({ id, label, value, setParameter }) {
type="number"
value={value}
onChange={handleChange}
id={id}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const SimpleTemplate = props => {
{!color || color.length === 0 ? (
<Fragment>
<EuiFlexItem grow={false}>
<label>Color&nbsp;</label>
<span>Color&nbsp;</span>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiLink onClick={() => handlePlain('color', '#000000')}>
Expand All @@ -44,11 +44,11 @@ export const SimpleTemplate = props => {
) : (
<Fragment>
<EuiFlexItem grow={false}>
<label>Color&nbsp;</label>
<label htmlFor="series-style">Color&nbsp;</label>
</EuiFlexItem>
<EuiFlexItem style={{ fontSize: 0 }}>
<ColorPickerMini
id={'series-style'}
id="series-style"
value={color}
onChange={val => handlePlain('color', val)}
colors={workpad.colors}
Expand Down

0 comments on commit af9d3ba

Please sign in to comment.