Eslint-plugin-jsx-a11y: jsx-a11y/control-has-associated-label not recognizing aria-hidden

Created on 27 Sep 2019  路  1Comment  路  Source: jsx-eslint/eslint-plugin-jsx-a11y

Hey!

When I add aria-hidden="true" to the element I would expect this rule to ignore this particular control element. It seems not be the case.

Example

// rule config

'jsx-a11y/label-has-associated-control': [
  'error',
  {
    assert: 'either',
  }
],

<input type="hidden" aria-hidden="true" />

This fails.

Thanks!

bug help wanted

Most helpful comment

I would expect any type=hidden input to be exempted from this rule, aria-hidden or not.

>All comments

I would expect any type=hidden input to be exempted from this rule, aria-hidden or not.

Was this page helpful?
0 / 5 - 0 ratings