Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 2.32 KB

CONTRIBUTING.md

File metadata and controls

73 lines (49 loc) · 2.32 KB

Contributing to Autocomplete.js

First of all, thanks for taking a look at contributing here 🎉 If you have any questions while contributing, feel free to open an issue or to send an email to support@algolia.com mentioning the PR or issue you're working on.

Development

To start developing, you can use the following commands:

yarn
yarn dev
open http://localhost:8888/test/playground.html

Linting is done with eslint and Algolia's configuration and can be run with:

yarn lint

Tests

Unit tests are written using Jasmine and ran with Karma. Integration tests are using Mocha and Saucelabs.

To run the unit tests suite run:

yarn test

To run the integration tests suite run:

yarn build
yarn server
ngrok 8888
TEST_HOST=http://YOUR_NGROK_ID.ngrok.com SAUCE_ACCESS_KEY=YOUR_KEY SAUCE_USERNAME=YOUR_USERNAME./node_modules/mocha/bin/mocha --harmony -R spec ./test/integration/test.js

Testing accessibility

Autocomplete.js is accessible to screen readers, and here's how to test how most blind users will experience it:

Steps

  1. Run yarn dev on your development machine
  2. Start the screen reader
  3. Open a browser to http://YOUR_IP:8888/test/playground.html
  4. Tab to the field
  5. Type a search query
  6. Use the arrow keys to navigate through the results

✔ SUCCESS: results are read (not necessarily in sync with the visually selected cursor)
𐄂 FAIL: no text is read or the screen reader keeps reading the typed query

Recommended testing platforms

  • VoiceOver (CMD+F5 in macOS): Safari, Chrome
  • JAWS: IE11, Chrome (Windows 7 VM available at modern.ie)
  • NVDA: IE11, Chrome (Windows 8.1 VM available at modern.ie)

Tips

  • All screen readers work slightly differently - which makes making accessible pages tricky.
  • Don't worry if the usability isn't 100% perfect, but make sure the functionality is there.

Release

Decide if this is a patch, minor or major release, have a look at semver.org.

npm run release [major|minor|patch|x.x.x]