Fix eslint6 jsx-a11y/no-static-element-interactions
[MAILPOET-1140]
This commit is contained in:
@@ -31,7 +31,6 @@
|
|||||||
"react/jsx-boolean-value": 0,
|
"react/jsx-boolean-value": 0,
|
||||||
"react/jsx-no-bind": 0,
|
"react/jsx-no-bind": 0,
|
||||||
"react/no-array-index-key": 0,
|
"react/no-array-index-key": 0,
|
||||||
"jsx-a11y/no-static-element-interactions": 0,
|
|
||||||
"jsx-a11y/alt-text": 0,
|
"jsx-a11y/alt-text": 0,
|
||||||
"func-names": 0,
|
"func-names": 0,
|
||||||
"object-shorthand": 0,
|
"object-shorthand": 0,
|
||||||
|
@@ -74,7 +74,11 @@ const ListingColumn = React.createClass({
|
|||||||
|
|
||||||
if (this.props.column.sortable === true) {
|
if (this.props.column.sortable === true) {
|
||||||
label = (
|
label = (
|
||||||
<a onClick={this.handleSort}>
|
<a
|
||||||
|
onClick={this.handleSort}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
<span>{ this.props.column.label }</span>
|
<span>{ this.props.column.label }</span>
|
||||||
<span className="sorting-indicator" />
|
<span className="sorting-indicator" />
|
||||||
</a>
|
</a>
|
||||||
@@ -84,6 +88,7 @@ const ListingColumn = React.createClass({
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<th
|
<th
|
||||||
|
role="columnheader"
|
||||||
className={classes}
|
className={classes}
|
||||||
id={this.props.column.name}
|
id={this.props.column.name}
|
||||||
scope="col"
|
scope="col"
|
||||||
|
@@ -90,6 +90,8 @@ const ListingItem = React.createClass({
|
|||||||
<span
|
<span
|
||||||
onClick={this.props.onRefreshItems}
|
onClick={this.props.onRefreshItems}
|
||||||
key={`action-${index}`} className={action.name}
|
key={`action-${index}`} className={action.name}
|
||||||
|
role="button"
|
||||||
|
tabIndex={index}
|
||||||
>
|
>
|
||||||
{(!isFirst) ? ' | ' : ''}
|
{(!isFirst) ? ' | ' : ''}
|
||||||
{ action.link(this.props.item) }
|
{ action.link(this.props.item) }
|
||||||
|
@@ -127,12 +127,16 @@ class TemplateBox extends React.Component {
|
|||||||
<a
|
<a
|
||||||
className="button button-secondary"
|
className="button button-secondary"
|
||||||
onClick={this.onPreview}
|
onClick={this.onPreview}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
>{MailPoet.I18n.t('preview')}</a>
|
>{MailPoet.I18n.t('preview')}</a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
className="button button-primary"
|
className="button button-primary"
|
||||||
data-automation-id={`select_template_${index}`}
|
data-automation-id={`select_template_${index}`}
|
||||||
onClick={this.onSelect}
|
onClick={this.onSelect}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
> {MailPoet.I18n.t('select')} </a>
|
> {MailPoet.I18n.t('select')} </a>
|
||||||
</div>
|
</div>
|
||||||
{ readonly === '1' ? false : deleteLink }
|
{ readonly === '1' ? false : deleteLink }
|
||||||
|
@@ -81,7 +81,13 @@ define(
|
|||||||
description: MailPoet.I18n.t('regularNewsletterTypeDescription'),
|
description: MailPoet.I18n.t('regularNewsletterTypeDescription'),
|
||||||
action: function () {
|
action: function () {
|
||||||
return (
|
return (
|
||||||
<a className="button button-primary" data-automation-id="create_standard" onClick={this.createNewsletter.bind(null, 'standard')}>
|
<a
|
||||||
|
className="button button-primary"
|
||||||
|
data-automation-id="create_standard"
|
||||||
|
onClick={this.createNewsletter.bind(null, 'standard')}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
{MailPoet.I18n.t('create')}
|
{MailPoet.I18n.t('create')}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
@@ -107,7 +113,13 @@ define(
|
|||||||
description: MailPoet.I18n.t('postNotificationNewsletterTypeDescription'),
|
description: MailPoet.I18n.t('postNotificationNewsletterTypeDescription'),
|
||||||
action: function () {
|
action: function () {
|
||||||
return (
|
return (
|
||||||
<a className="button button-primary" data-automation-id="create_notification" onClick={this.setupNewsletter.bind(null, 'notification')}>
|
<a
|
||||||
|
className="button button-primary"
|
||||||
|
data-automation-id="create_notification"
|
||||||
|
onClick={this.setupNewsletter.bind(null, 'notification')}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
{MailPoet.I18n.t('setUp')}
|
{MailPoet.I18n.t('setUp')}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user