-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve a11y of address search form (#128)
* applied aria-required to search input * set aria-invalid on form input when empty * set aria-describedby on form input to error msg when error occurs * focus input on search error: - this will announce the error as aria-describedby on the input to A.T. * rm .hbs partial & inline markup with parent * clear any previous error prior to showing no input error * keep input value on form submit... in case of a validation error so the user can see what they had entered * rm deleted .hbs partial from jest setup * fixed test: address search input should not be cleared on submit * clean-up searchValidationErrors: - add a common method for setting aria-describedby - add a common method for setting aria-invalid & .invalid css class * updated tests for searchValidationErrors - test for aria attributes to be correctly set and unset * updated tests for addressSearchForm: - test that input has focus when handling an error * rm unused method from SearchValidationErrors * updated SearchValidationErrors html: - no need to use a list since only error msg is ever shown at a time - the <ul> element is never hidden so may confuse sr users * removed asteriks from search validation error text as it likely is annoying when announced to assistive tech
- Loading branch information
Showing
10 changed files
with
131 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters