Open robertknight opened 6 months ago
One way that we could deal with this is by making the "confirm article ID" button on the right side of the input function like a form submit button, by focusing the first field with an error after validation/submission fails.
In the JSTOR and VitalSource content pickers, when the user enters an article ID or book ID and presses enter or clicks the button, we fetch metadata for that article and display a title and thumbnail.
If there is an error, we mark the input field as invalid using
aria-invalid
and link the error usingaria-describedby
. If the user causes the control to be described again by navigating away from it and back, or pressing the button to describe the focused control, they will hear the error. However at the point when article detail fetch finishes, either successfully or with an error, nothing is immediately announced, as there is noaria-live
region.With a standard HTML form what would happen next is that the user tries to submit the form, and then the browser would focus the input with an error and report the validation issue. Since we disable the submit button however, that won't happen.