ESLint: Re-enable rule control-has-associated-label (#10866)
* Re-enable rule control-has-associated-label * Change aria-label message in DatasourceControl Co-authored-by: Evan Rusackas <evan@preset.io> Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
parent
2d8f4e3aaf
commit
767044bfe5
|
|
@ -83,7 +83,6 @@ module.exports = {
|
||||||
'jsx-a11y/anchor-has-content': 0,
|
'jsx-a11y/anchor-has-content': 0,
|
||||||
'jsx-a11y/anchor-is-valid': 0, // disabled temporarily
|
'jsx-a11y/anchor-is-valid': 0, // disabled temporarily
|
||||||
'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
|
'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
|
||||||
'jsx-a11y/control-has-associated-label': 0, // disabled temporarily
|
|
||||||
'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion
|
'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion
|
||||||
'lines-between-class-members': 0, // disabled temporarily
|
'lines-between-class-members': 0, // disabled temporarily
|
||||||
'new-cap': 0,
|
'new-cap': 0,
|
||||||
|
|
@ -198,7 +197,6 @@ module.exports = {
|
||||||
'jsx-a11y/anchor-has-content': 0,
|
'jsx-a11y/anchor-has-content': 0,
|
||||||
'jsx-a11y/anchor-is-valid': 0, // disabled temporarily
|
'jsx-a11y/anchor-is-valid': 0, // disabled temporarily
|
||||||
'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
|
'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
|
||||||
'jsx-a11y/control-has-associated-label': 0, // disabled temporarily
|
|
||||||
'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion
|
'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion
|
||||||
'lines-between-class-members': 0, // disabled temporarily
|
'lines-between-class-members': 0, // disabled temporarily
|
||||||
'new-cap': 0,
|
'new-cap': 0,
|
||||||
|
|
|
||||||
|
|
@ -159,12 +159,14 @@ export default class CRUDCollection extends React.PureComponent<
|
||||||
return (
|
return (
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{expandFieldset && <th className="tiny-cell" />}
|
{expandFieldset && <th aria-label="Expand" className="tiny-cell" />}
|
||||||
{cols.map(col => (
|
{cols.map(col => (
|
||||||
<th key={col}>{this.getLabel(col)}</th>
|
<th key={col}>{this.getLabel(col)}</th>
|
||||||
))}
|
))}
|
||||||
{extraButtons}
|
{extraButtons}
|
||||||
{allowDeletes && !allowAddItem && <th className="tiny-cell" />}
|
{allowDeletes && !allowAddItem && (
|
||||||
|
<th aria-label="Delete" className="tiny-cell" />
|
||||||
|
)}
|
||||||
{allowAddItem && (
|
{allowAddItem && (
|
||||||
<th>
|
<th>
|
||||||
<Button buttonStyle="primary" onClick={this.onAddItem}>
|
<Button buttonStyle="primary" onClick={this.onAddItem}>
|
||||||
|
|
@ -206,6 +208,7 @@ export default class CRUDCollection extends React.PureComponent<
|
||||||
<td key="__expand" className="expand">
|
<td key="__expand" className="expand">
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Toggle expand"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className={`fa fa-caret-${
|
className={`fa fa-caret-${
|
||||||
isExpanded ? 'down' : 'right'
|
isExpanded ? 'down' : 'right'
|
||||||
|
|
@ -228,6 +231,7 @@ export default class CRUDCollection extends React.PureComponent<
|
||||||
<td key="__actions">
|
<td key="__actions">
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Delete item"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className="fa fa-trash text-primary pointer"
|
className="fa fa-trash text-primary pointer"
|
||||||
onClick={this.deleteItem.bind(this, record.id)}
|
onClick={this.deleteItem.bind(this, record.id)}
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,7 @@ class TableElement extends React.PureComponent {
|
||||||
)}
|
)}
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Toggle table"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
onClick={e => {
|
onClick={e => {
|
||||||
this.toggleTable(e);
|
this.toggleTable(e);
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ export default function Checkbox({ checked, onChange, style }: CheckboxProps) {
|
||||||
<span style={style}>
|
<span style={style}>
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Checkbox"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className={`fa fa-check ${
|
className={`fa fa-check ${
|
||||||
checked ? 'text-primary' : 'text-transparent'
|
checked ? 'text-primary' : 'text-transparent'
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ class RefreshLabel extends React.PureComponent {
|
||||||
return (
|
return (
|
||||||
<TooltipWrapper tooltip={this.props.tooltipContent} label="cache-desc">
|
<TooltipWrapper tooltip={this.props.tooltipContent} label="cache-desc">
|
||||||
<i
|
<i
|
||||||
|
aria-label="Icon"
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className="RefreshLabel fa fa-refresh pointer"
|
className="RefreshLabel fa fa-refresh pointer"
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ export default function FilterIndicatorTooltip({
|
||||||
|
|
||||||
{clickIconHandler && (
|
{clickIconHandler && (
|
||||||
<i
|
<i
|
||||||
|
aria-label="Icon"
|
||||||
className="fa fa-pencil filter-edit"
|
className="fa fa-pencil filter-edit"
|
||||||
onClick={clickIconHandler}
|
onClick={clickIconHandler}
|
||||||
role="button"
|
role="button"
|
||||||
|
|
|
||||||
|
|
@ -192,6 +192,7 @@ export default class AdhocFilterEditPopover extends React.Component {
|
||||||
</Button>
|
</Button>
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Resize"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
onMouseDown={this.onDragDown}
|
onMouseDown={this.onDragDown}
|
||||||
className="fa fa-expand edit-popover-resize text-muted"
|
className="fa fa-expand edit-popover-resize text-muted"
|
||||||
|
|
|
||||||
|
|
@ -327,6 +327,7 @@ export default class AdhocMetricEditPopover extends React.Component {
|
||||||
</Button>
|
</Button>
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Resize"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
onMouseDown={this.onDragDown}
|
onMouseDown={this.onDragDown}
|
||||||
className="fa fa-expand edit-popover-resize text-muted"
|
className="fa fa-expand edit-popover-resize text-muted"
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ export default class ControlPanelSection extends React.Component {
|
||||||
</span>
|
</span>
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Toggle expand"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className={`float-right fa-lg text-primary expander fa fa-angle-${
|
className={`float-right fa-lg text-primary expander fa fa-angle-${
|
||||||
this.state.expanded ? 'up' : 'down'
|
this.state.expanded ? 'up' : 'down'
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,7 @@ class ControlPanelsContainer extends React.Component {
|
||||||
{this.props.alert}
|
{this.props.alert}
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Remove alert"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className="fa fa-close pull-right"
|
className="fa fa-close pull-right"
|
||||||
onClick={this.removeAlert}
|
onClick={this.removeAlert}
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,7 @@ class SaveModal extends React.Component {
|
||||||
{this.state.alert ? this.state.alert : this.props.alert}
|
{this.state.alert ? this.state.alert : this.props.alert}
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Remove alert"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className="fa fa-close pull-right"
|
className="fa fa-close pull-right"
|
||||||
onClick={this.removeAlert.bind(this)}
|
onClick={this.removeAlert.bind(this)}
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,7 @@ class DatasourceControl extends React.PureComponent {
|
||||||
<a href="#">
|
<a href="#">
|
||||||
<i
|
<i
|
||||||
role="button"
|
role="button"
|
||||||
|
aria-label="Toggle datasource visibility"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className={`fa fa-${
|
className={`fa fa-${
|
||||||
this.state.showDatasource ? 'minus' : 'plus'
|
this.state.showDatasource ? 'minus' : 'plus'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue