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

Using a11y with preact and preact-cli #156

Open
PatchOnKnee opened this issue Nov 15, 2018 · 2 comments
Open

Using a11y with preact and preact-cli #156

PatchOnKnee opened this issue Nov 15, 2018 · 2 comments
Assignees

Comments

@PatchOnKnee
Copy link

Hi currently trying to integrate a11y into a preact app, with preact-cli also installed. preact-cli provides aliases for the React and ReactDOM components and allows the use of normal react components with preact.

The issue arises after implementing a11y. No errors are thrown as React and ReactDOM are imported as per normal, and a11y as per the usage section of the github page. After running the live reload server with "npm run start", no warnings or errors are throw even with the inclusion of a fault element as per the a11y docs.

I've provided the app.js code in this paste bin, which can simply be placed into the default app.js after creating a preact project using the command "preact create default test-project".

@erin-doyle
Copy link
Collaborator

I certainly have not tried using this library in a preact project before and I'm not sure if others have been able to successfully. So yes it's possible it's not currently compatible. I'll look into it and see what we need to do to provide compatibility.

@erin-doyle
Copy link
Collaborator

I did some work on looking in to this and no react-a11y is not compatible with Preact out of the box. I did not test it but I'm guessing it might work if you use preact-compat. I have started working on updating react-a11y to be fully compatible with Preact but in the meantime trying preact-compat might be helpful.

@erin-doyle erin-doyle self-assigned this Jan 22, 2019
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