Help Modal - Accessibility Fixes - #902
Conversation
Also adding the email description to the login page and applying the same aria attribute to the correspondin input on that page. From LMS-602: > There is additional explanatory text, marked up in a span element after > the email input. The input elements should be explicitly associated with > this additional text using the aria-describedby attribute. This will > require an ID to be assigned to the span element.
> To make this change explicit to assistive technology, focus should be > moved programmatically to this div after it has been made visible. To > allow the div to be focused via scripting (without adding it to the > regular focus order that keyboard users cycle through), a tabindex=”-1” > should be added. > In addition, the invalid fields should be given a an > aria-invalid="true" attribute.
Added a 'aria-hidden="true"' attribute to the modal initially, then toggle the value of that attribute to "false" when the modal is shown. Also remove the attribute when the modal is closed, whether it's through a click on the close button or on the overlay.
The close button for the modal dialog was marked up as a paragraph, containing a graphical text character, inside two div elements, with an associated click event. This made the button unusable for keyboard users. Replaced <divs> with a link element (<a role="button"), adapted the CSS accordingly, and updated the existing <a> modal close buttons.
Modal dialogs should manage keyboard focus, ensuring that users can't tab out of the modal dialog and back into the page itself (effectively moving “behind” the dimmed modal). On the last focusable element of the dialog, return focus back to the first focusable element. Also move the close button to the start of the dialog's section, making it the first focusable URL, to ensure focus matches the visual representation of the dialog.
Users should be able to close the modal with the "escape" key.
|
On Mon, Sep 9, 2013, at 8:26, Brian Talbot wrote:
This was about the forgot password form I think ( The only other
Sounds good, I've left that one alone.
Done. I also assume that you want to use the "title" attribute instead of the I also wasn't sure if you wanted me to replace the class name with
Done. I'm also removing the attribute when the modal is closed, whether it's through a click on the close button or on the overlay. And also done LMS-581. I only applied it to the help dialog, as I think this bug was specifically about this one.
Btw I didn't find tests for the help modal, so I didn't add/update tests with the changes I've made -- do you know if there are tests for this feature somewhere? Also, do you know why is the code for the help modal inline in the HTML, rather than part of the static assets? |
|
awesome stuff! |
|
This is great, thanks |
|
@antoviaque, thanks for all of this great work. I took a spin through and things seem to be in good order. To answer a few of your questions:
I don't think we have any tests written for the help modal, but that is less of my expertise honestly. @jzoldak, are there any tests written/testing dependencies on the help modal at all?
Good question, honestly it may have come down to speed and time constraints when initially implementing it. Abstracting the JS into its own method may be good things to do in the near future. Thanks for the heads up. This looks good from my perspective. 👍 Thanks again! |
|
@talbs @jkarni @adampalay Thanks for the kind words, I'm glad this can be helpful. And thanks to you in the first place, for the great work on edX. It's a pleasure to work with the project's code! |
|
@talbs We have acceptance-level tests for the help modal. I ran the LMS acceptance tests on this branch, and everything looks good. |
|
@wedaly, thx for checking and that's great news. This is ready to bring to "mergetown" from my perspective. |
Help Modal - Accessibility Fixes
…urn-only-username Return only username on OpenID provider requests.
* Merge pull request openedx#937 from nttks/gacco/cypress.biz-2nd (openedx#943) * Merge pull request openedx#937 from nttks/gacco/cypress.biz-2nd gacco/cypress.biz 2nd (cherry picked from commit 4bc3bc2) Conflicts: biz/djangoapps/ga_achievement/management/commands/tests/test_update_biz_score_status.py lms/djangoapps/ccx/tests/test_field_override_performance.py lms/djangoapps/instructor/tests/test_api.py lms/envs/test.py setup.py * Merge pull request openedx#941 from kawaguchi-ks/develop/cypress/biz-fix-timezone-problem Fix timezone problem on boundary test. (cherry picked from commit 20e1b0c) * Fix transaction, autocommit(commit_on_success) -> atomic. * Define class Meta. * Change AUTHENTICATION_BACKENDS for disable RateLimitBackend within lo… (openedx#902) * Change AUTHENTICATION_BACKENDS for disable RateLimitBackend within login authentication(openedx#540) (openedx#883) (cherry picked from commit 1e8b68a) Conflicts: cms/djangoapps/course_creators/tests/test_admin.py * Fix test, "RedirectCycleError: Redirect loop detected".
Master to Staging
Commits: Add marketing opt-in checkbox to registration form
We missed a copy edit from the previous PR made for this ticket. Also changing the id to something more relevant to the message.
…hn_mfe fix: don't enable Authn MFE by default
Fixes for LMS-602, LMS-584, LMS-582, LMS-581. This is a set of accessibility fixes, mainly for the help modal.
Cf discussion below for details.
@talbs @jtauber @adampalay