Add error recovery and focus trap to thread loading in forum sidebar - #1707
Conversation
When a user attempts to load more threads in the forum navigation sidebar, reset the state of the world so the user can retry, and alert the user appropriately.
For accessibility purposes, it is bad to allow a user to initiate loading of additional threads in the navigation sidebar and then shift focus away from the sidebar, only to have focus snap back when the additional threads are loaded. Now, we trap focus on the loading element as recommended by our accessibility consultant. JIRA: FOR-238
|
👍 |
There was a problem hiding this comment.
One note about this approach is that when testing on ChromeVox, a user who is routed to this FocusTrap in the case of a 500 is taken to the button which reads OK, but must then manually navigate out to the alert message and header to understand the cause for the error. Could we .find the entire modal or header item instead?
There was a problem hiding this comment.
That's odd; the non-specific alert dialog reads the whole error message, but this one does not. I'll try to figure out why.
There was a problem hiding this comment.
Also, you cannot focus on a non-interactive element, so the answer to the question you posed is no.
There was a problem hiding this comment.
JAWS doesn't read either alert. According to http://www.w3.org/TR/wai-aria/roles#alertdialog, "authors SHOULD set focus to an active element within the alert dialog, such as a form edit field or an OK button." Also, "Authors SHOULD use aria-describedby on an alertdialog to point to the alert message element in the dialog," which we are doing. I don't know why the alert is not being read. This represents a step in the right direction, so I think we should go ahead with this change and consult with an expert for advice on improving the experience.
|
👍 |
Add error recovery and focus trap to thread loading in forum sidebar
@jimabramson @marcotuts