Commit 37f7683b authored by Alejandro Celaya's avatar Alejandro Celaya Committed by Alejandro Celaya

Add accessibility tests to FileInput component

parent 7c7cae68
......@@ -27,7 +27,6 @@ export default function FileInput({
disabled={disabled}
className="invisible absolute w-0 h-0"
aria-hidden
tabIndex={-1}
data-testid="file-input"
onChange={e => {
const files = (e.target as HTMLInputElement)!.files;
......
import { mount } from 'enzyme';
import { checkAccessibility } from '../../../../test-util/accessibility';
import FileInput from '../FileInput';
describe('FileInput', () => {
......@@ -96,4 +97,18 @@ describe('FileInput', () => {
assert.equal(proxyButton.prop('disabled'), disabled);
});
});
it(
'should pass a11y checks',
checkAccessibility([
{
content: () =>
mount(
<div>
<FileInput onFileSelected={fakeOnFileSelected} />
</div>,
),
},
]),
);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment