fix screenreader bug for disabled submission button
closes LA-942 flag = none Test Plan: - Enabled Assignment Allowed attempts feature - create an assignment with limited attempts - as a student, submit the assignment - attempt to submit again and the submission button should be disabled - ScreenReader should now read the button as "dimmed" and should not be able to be clicked via screenreader shortcut Change-Id: I05e2b3816de5bf63aa7aa1b915e8076e5efc4438 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/235237 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com> QA-Review: Daniel Sasaki <dsasaki@instructure.com> Product-Review: Clint Furse <cfurse@instructure.com>
This commit is contained in:
parent
addd35f280
commit
3da701d3f5
|
@ -69,13 +69,12 @@ module AssignmentsHelper
|
|||
if assignment.expects_submission? && can_do(assignment, user, :submit)
|
||||
submit_text = user_submission.try(:has_submission?) ? I18n.t("Re-submit Assignment") : I18n.t("Submit Assignment")
|
||||
late = user_submission.try(:late?) ? "late" : ""
|
||||
link_to(
|
||||
submit_text,
|
||||
'#',
|
||||
:role => "button",
|
||||
:class => "Button Button--primary submit_assignment_link #{late}",
|
||||
:disabled => user_submission && user_submission.attempts_left == 0,
|
||||
)
|
||||
options = {
|
||||
type: 'button',
|
||||
class: "Button Button--primary submit_assignment_link #{late}",
|
||||
disabled: user_submission && user_submission.attempts_left == 0
|
||||
}
|
||||
content_tag('button', submit_text, options)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue