Skip to content

Commit

Permalink
Enable anchor-has-content rule (apache#10908)
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje authored and auxten committed Nov 20, 2020
1 parent c6e8b61 commit 974fc81
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions superset-frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ module.exports = {
'import/no-named-as-default-member': 0,
'import/prefer-default-export': 0,
indent: 0,
'jsx-a11y/anchor-has-content': 0,
'jsx-a11y/anchor-is-valid': 0, // disabled temporarily
'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion
Expand Down Expand Up @@ -205,7 +204,6 @@ module.exports = {
'import/no-named-as-default': 0,
'import/prefer-default-export': 0,
indent: 0,
'jsx-a11y/anchor-has-content': 0,
'jsx-a11y/anchor-is-valid': 0, // disabled temporarily
'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ import ControlSetRow from 'src/explore/components/ControlRow';

describe('ControlSetRow', () => {
it('renders a single row with one element', () => {
// eslint-disable-next-line jsx-a11y/anchor-has-content
const wrapper = shallow(<ControlSetRow controls={[<a />]} />);
expect(wrapper.find('.row')).toExist();
expect(wrapper.find('.row').find('a')).toExist();
});
it('renders a single row with two elements', () => {
// eslint-disable-next-line jsx-a11y/anchor-has-content
const wrapper = shallow(<ControlSetRow controls={[<a />, <a />]} />);
expect(wrapper.find('.row')).toExist();
expect(wrapper.find('.row').find('a')).toHaveLength(2);
Expand Down
6 changes: 5 additions & 1 deletion superset-frontend/src/SqlLab/components/TableElement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ class TableElement extends React.PureComponent {
/>
{table.selectStar && (
<CopyToClipboard
copyNode={<a className="fa fa-clipboard pull-left m-l-2" />}
copyNode={
<a aria-label="Copy">
<i aria-hidden className="fa fa-clipboard pull-left m-l-2" />
</a>
}
text={table.selectStar}
shouldShowText={false}
tooltipText={t('Copy SELECT statement to the clipboard')}
Expand Down

0 comments on commit 974fc81

Please sign in to comment.