Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A11y: A form label must be associated with a control. #62

Open
mathiasrw opened this issue Dec 20, 2020 · 0 comments
Open

A11y: A form label must be associated with a control. #62

mathiasrw opened this issue Dec 20, 2020 · 0 comments
Assignees

Comments

@mathiasrw
Copy link

I am getting this error when including Chota in svelte with Routify:

{
  code: 'a11y-label-has-associated-control',
  message: 'A11y: A form label must be associated with a control.',
  frame: '36: <div class:nomessage={!message} use:events {...$$restProps}>\n' +
    '37:   {#if label}\n' +
    '38:     <label>{label}</label>\n' +
    '        ^\n' +
    '39:   {/if}\n' +
    '40:   <p class:grouped class:gapless><slot/></p>',
  start: { line: 38, column: 2, character: 815 },
  end: { line: 38, column: 24, character: 837 },
  pos: 815,
  filename: '/Users/mrw/git/ntbl/spa/node_modules/svelte-chota/cmp/Field.svelte',
  toString: [Function: toString]
}

I suggest having a look at https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-associated-control.md about what can be done.

@jenil jenil self-assigned this Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants