* Add jext-axe package and introduce a11y testing
Automated a11y testing is NOT comprehensive. We cannot expect this to
even scratch the surface of potential a11y issues.
However, we can expect to find a percentage of issues that are currently
flying under the radar. Adopting some automation around a11y testing
also allows us to use CI to find a11y regressions -- which should be
really handy.
I've never really used Jest before, and Preact seems to make it a little
more complicated, but as far as I can tell, this is a decent way to add
at least some minor automated a11y testing.
* Add doc about automated a11y tests
* Fix some eslint complaints
* Fix some basic a11y issues in onboarding
- Missing a main element
- TODO to enable zooming
- Rename a duplicate ID attribute
I may need some context on the zooming thing, why did we decided to
disable that in the first place? It is a pretty bad a11y issue, we will
need to fix whatever that is a workaround for instead of making it
difficult for some people to use our onboarding.
* Update screenshots
* Hide blocked users' content appropriately
* Use RESTful create route
* Update functionality to block the user
* Fix specs for new route
* Use const instead of var
* Add noopener and noreferrer
* Remove caching for blocked user ids
* Add new rule for lack of noopener noreferrer
* Update snapshot
* Refactored to use a common <OrganizationPicker /> component.
* Small refactor to organization <option />s.
* Renamed files from OrgSettings* to OrganizationPicker*
* Brought orgsettings inline to article form.
* Brought orgsettings inline to listings form.
* Rename onBlur to onToggle for org picker instances. Ooops.
* Updated <OrganizationPicker /> test.
* Prevent need for eager loading
* Add initial implementation of user block
* Remove debugger oops
* Add index and foreign keys for user_block table
* Use private method instead of exists
* Move channel handling logic to service object
* Update styling a bit
* Use profileDropdown file for future proofing
* Remove commented out code
* Render json: { result } for all endpoints
* Add statuses for sad paths
* Add better sad path handling in the JS
* Remove accidentally committed spec file
* Don't wait for DOM to load block button
* Use equality for accuracy in slug query
* Add status code for unauthorized requests
* Add missing comma sigh
* fix eslint issues in article-form's jsx files
* Use e.key instead of deprecated e.keyCode
* Put back whitespace but in html format
* use re-usable SetupImageButton comp, use window.confirm, put back console.log temporarily
* import deep
* fix CoverImage className prop issue
* update jest snap files
* remove no-restricted-globals from eslint-disable-next-line
Changes:
- Refactored articleForm.jsx by moving loadForm() before document.ready.then()
- Removed 'function' in .then() and modified to .then(() => {
- Removed unused function 'isUserSignedIn' in Onboarding.jsx
See: #2470
* Fix some eslint and a11y issues
* Add a11y fixed to snapshot
* Fix missing whitespace that cause test fail
* Fix code duplicate
* Config eslint to allows the label as a sibling
* Use 'error' instead of 2 in eslintrc
* Correct propTypes in SingleListing
* Add missing id prop for select
* Add space between two functions
* onKeyPress only register Enter
* Allow space key also to activate action
* Use a common function for three event handlers
* Add tag rules to article v2 editor
* Add bottom phrase to tag dropdown
* Remove console logs
* Remove empty space in css
* Remove commented code and clean up css
* Add type='button' for a11y
* fixes bug in tag search feature
now allows user to type in full name of tag and it does not disappear
makes other changes to pass eslint failing tests
moves methods around according to eslint tests
makes use of prevState callback method due to eslint tests
* updates handleKeyDown method
removes complex logical expression comparison from !== to !=
changes made due to failing task in pull request
* removes commented out code that I added to test code
updates logic to fix searchResults
removes .filter()
* adds comments to fixed code for clarification