-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SOL-1806] Moved aria-live attributes to popup wrapper #85
Conversation
Thanks for the pull request, @e-kolpakov! It looks like you're a member of a company that does contract work for edX. If you're doing this work as part of a paid contract with edX, you should talk to edX about who will review this pull request. If this work is not part of a paid contract with edX, then you should ensure that there is an OSPR issue to track this work in JIRA, so that we don't lose track of your pull request. To automatically create an OSPR issue for this pull request, just visit this link: https://openedx-webhooks.herokuapp.com/github/process_pr?number=85&repo=edx-solutions%2Fxblock-drag-and-drop-v2 |
@e-kolpakov - FYI the sandbox isn't loading for me |
@e-kolpakov FYI, when you list the "reviewers" in the PR description, it pings all of them - so probably better to fill that section out once our internal review is completed, and it's ready for review? |
Yes, I would appreciate following @bradenmacdonald's suggestion. It would make it clearer when it is ready for TNL review. |
@e-kolpakov I've tested this with VoiceOver in Safari on OS X. I noticed a similar (the same?) problem where incorrect popups are not read out, but that only happens while the board is empty - after you place at least one item in a correct zone, the incorrect popups start working as expected. I found that the problem was the "Reset problem" button. When you drop the first item onto the board, it shows for a fraction of a second until the item is reverted back to the bank and the button hidden. The button seem to distract VoiceOver which starts reading out "Reset problem" instead of the new contents of the popup.
After I made this change incorrect popups started working fine, but now after placing the first correct item, VoiceOver would start reading out "Reset problem" instead of the contents of the correct popup. The reset button does have After this change, all popups work correctly for me, except in the case where you drag the same item to two wrong locations successively (the first time you drop it into the wrong location, VoiceOver reads out "The item does not belong here", but after you drag it again and drop it on another (wrong) region, the feedback message doesn't change, so VoiceOver doesn't read it out). This would be hard to fix and since this problem was already present prior to this PR, I think we can ignore it for now. |
@mtyaka Implemented the suggested fixes; however, my SR still does not read "error" feedback. Instead it reads zone description twice. Probably a bug in Ubuntu screen reader + Firefox |
h('p.popup-content', {innerHTML: ctx.popup_html}), | ||
] | ||
), | ||
popupTemplate(ctx), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@e-kolpakov Nice, this looks much cleaner now.
👍
|
h( | ||
'button.reset-button.unbutton.link-button', | ||
{ style: { display: reset_button_display }, attributes: { tabindex: 0 }, 'aria-live': 'off'}, | ||
{ style: { display: reset_button_display }, attributes: { tabindex: 0, 'aria-live': 'off' } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. I tested whether moving arial-live="polite"
back to the section.feedback
container makes any difference with this change, but it looks like it doesn't. VoiceOver still reads out "Reset problem" the first time it appears, even though aria-live="off"
is set correctly, so moving the button out of aria-live="polite"
aria as you did here still makes sense.
The code changes seem straight forward, but I am having trouble recreating this on the Sandbox. Can you set up the Drag and drop problem you used for testing? |
@staubina I've updated the course with the default instance of DnDv2. Note there's a stock "Drag and Drop" CAPA problem - it is not the one we're working with here. |
I've read through the code and will defer to a11y review on this one. |
I again tried to parse through this with a screen reader, but having not used it often, I am going to also defer to accessibility on this PR. |
@cptvitamin Friendly reminder to review this PR. |
@sstack22 FYI - waits for your and a11y review. This PR is about a11y as well, so I believe we should not merge it withot a11y review. Might be a good idea to include reviewing this PR and #73 to upcoming UX/RTL/a11y task. UPD: I've added this PR to acessibility review task - do you think we can merge it now and address a11y review notes later, when they arrive? |
@e-kolpakov Per @cptvitamin, this can merge without his review for now; I'm waiting to find out if @sstack22 wants to review. Please rebase and get a green build in preparation for merge. |
…ing the code to different file
71796ad
to
1cb7b9d
Compare
…ing the code to different file
…ing the code to different file
…ing the code to different file
Description: This PR modifies ARIA attributes so that only feedback is read to screen-reader user when an item is dropped into a zone, instead of full "working field"
JIRA: SOL-1806
Testing instructions:
0. Enable Screen Reader + make sure your browser support it (e.g. default Ubuntu screen reader does not work with Chrome, but works with Firefox).
0.a. Get used to it speaking out loud everything + learn to notice important parts of it.
Sandboxes:
LMS: http://dndv2-sandbox3.opencraft.hosting/
Studio: http://studio-dndv2-sandbox3.opencraft.hosting/
Sandboxes use 07ce4db version
Reviewers
Author concerns:
Default Ubuntu screen reader seems to ignore error feedback popups (despite them being absolutely identical to normal popups). This behavior exists in current master, so I'm not sure if it is a real issue; and if so, should it be fixed in scope of this PR.