hathitrust / firebird-common

Other
0 stars 0 forks source link

DEV-1165: feedback form issues #80

Closed carylwyatt closed 4 months ago

carylwyatt commented 4 months ago

This PR addresses two deque issues regarding the feedback form:

issue #71: 1727249 green check mark validation on form fields lacking alternate text issue #75: 1727235 form validation error messages not being announced by screen reader

After discussion with Ange and Gayathri, we decided to remove the "valid" styles on feedback forms instead of adding text to the check mark icons that indicated a valid form field. Those styles were added to the global stylesheet.

The rest of the changes are updating the feedback form markup and javacript in order for a screen reader to announce error messages when a submitted form is invalid. While testing the feedback forms with VoiceOver, I realized that some of the form fields in the catalog and pt feedback forms were not being announced correctly (mainly that checkboxes weren't properly connected to their labels) and that the "required" and "optional" tags were being announced by the screen reader twice, so I hid that text for screen readers.

I also had to update the storybook tests for the general feedback form in response to the markup changes in the component.

This PR does not address all the critical firebird fixes, but I wanted to keep it small enough for someone to easily review.

to test

This version of firebird is staged on dev-3. To test both the general feedback form and the catalog feedback form, go to dev-3.catalog.hathitrust.org/Search/Home and use the "Get Help" button in the navbar to open either "Ask a Question" (general) or "Report a Bug" (catalog). This isn't staged for pt, but you could test this in a newer version babel-local-dev (with K'Ron's docker updates for front-end testing) if you really want.

netlify[bot] commented 4 months ago

Deploy Preview for hathitrust-firebird-common ready!

Name Link
Latest commit 64d48f8df3249d3e5b801e7419f467d11f88748b
Latest deploy log https://app.netlify.com/sites/hathitrust-firebird-common/deploys/663e751b95f2f800087ffd7c
Deploy Preview https://deploy-preview-80--hathitrust-firebird-common.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.