Skip to content

jest-axe not catching inaccessible forms #25

@jrnxf

Description

@jrnxf

Hey Kent!

Been going through your course and am really loving it. I was writing a test today to check the accessibility of a form I new wasn't accessible to begin with, but was surprised that it passed the test. I checked in this repo as well to find the same thing. If you check the a11y.js file, the following test will pass:

test('accessible forms pass axe', async () => { const {container} = render(<InaccessibleForm />) expect(await axe(container)).toHaveNoViolations() })

Any idea why? I looked into the issue for a minute online but can't seem to find anyone else experiencing this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions