Adding label-has-associated-control to jsx-a11y lint rules and associated UI fixes (#27039)
This commit is contained in:
parent
af681c273a
commit
af9d3baacb
|
@ -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',
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -29,6 +29,7 @@ export function NumberParameter({ id, label, value, setParameter }) {
|
|||
<div className="kuiSideBarFormRow">
|
||||
<label
|
||||
className="kuiSideBarFormRow__label"
|
||||
htmlFor={id}
|
||||
>
|
||||
{label}
|
||||
</label>
|
||||
|
@ -38,6 +39,7 @@ export function NumberParameter({ id, label, value, setParameter }) {
|
|||
type="number"
|
||||
value={value}
|
||||
onChange={handleChange}
|
||||
id={id}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -33,7 +33,7 @@ export const SimpleTemplate = props => {
|
|||
{!color || color.length === 0 ? (
|
||||
<Fragment>
|
||||
<EuiFlexItem grow={false}>
|
||||
<label>Color </label>
|
||||
<span>Color </span>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiLink onClick={() => handlePlain('color', '#000000')}>
|
||||
|
@ -44,11 +44,11 @@ export const SimpleTemplate = props => {
|
|||
) : (
|
||||
<Fragment>
|
||||
<EuiFlexItem grow={false}>
|
||||
<label>Color </label>
|
||||
<label htmlFor="series-style">Color </label>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem style={{ fontSize: 0 }}>
|
||||
<ColorPickerMini
|
||||
id={'series-style'}
|
||||
id="series-style"
|
||||
value={color}
|
||||
onChange={val => handlePlain('color', val)}
|
||||
colors={workpad.colors}
|
||||
|
|
Loading…
Reference in a new issue