fix: label for attribute should be only for form elements #463
Annotations
3 errors and 3 warnings
packages/core/src/a11y/useLabel.spec.ts > label element > should render label with `for` attribute:
packages/core/src/a11y/useLabel.spec.ts#L22
AssertionError: expected null to be 'input' // Object.is equality
- Expected:
"input"
+ Received:
null
❯ packages/core/src/a11y/useLabel.spec.ts:22:42
|
packages/core/src/useComboBox/useComboBox.spec.ts > should not have a11y errors > with options:
packages/core/src/useComboBox/useComboBox.spec.ts#L131
Error: expect(received).toHaveNoViolations(expected)
Expected the HTML found at $('#cbx-v-0') to have no violations:
<input id="cbx-v-0" type="text" role="combobox" aria-haspopup="listbox" aria-controls="lb-v-1" aria-expanded="false" aria-invalid="false" value="">
Received:
"Form elements must have labels (label)"
Fix any of the following:
Form element does not have an implicit (wrapped) <label>
Form element does not have an explicit <label>
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
Element has no placeholder attribute
Element's default semantics were not overridden with role="none" or role="presentation"
You can find more information on this issue here:
https://dequeuniversity.com/rules/axe/4.10/label?application=axeAPI
❯ packages/core/src/useComboBox/useComboBox.spec.ts:131:54
|
tests
Process completed with exit code 1.
|
lint:
packages/core/src/useCalendar/useCalendar.ts#L108
Unexpected any. Specify a different type
|
lint:
packages/core/src/useCalendar/useCalendar.ts#L113
Unexpected any. Specify a different type
|
lint:
packages/core/src/useComboBox/useComboBox.ts#L181
Unexpected any. Specify a different type
|