From 396c137e2ddf68cd3ee9589984d6069877873612 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+github@gmail.com>
Date: Wed, 22 Jun 2022 10:39:22 +0200
Subject: [PATCH] Revert "set aria-disabled as well on helper attributes
 [data-(de)activates], fixes #1200"

This reverts commit 8c91f5891f339725e99ef7dd0f903b78619d50a6.
---
 .../bootstrap/studip_helper_attributes.js     | 21 +++++++------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/resources/assets/javascripts/bootstrap/studip_helper_attributes.js b/resources/assets/javascripts/bootstrap/studip_helper_attributes.js
index fcfa767a2ef..7af9f9a8e18 100644
--- a/resources/assets/javascripts/bootstrap/studip_helper_attributes.js
+++ b/resources/assets/javascripts/bootstrap/studip_helper_attributes.js
@@ -98,13 +98,11 @@ $(document).on('change', '[data-activates],[data-deactivates]', function() {
 
         var state = $(this).prop('checked') || $(this).prop('indeterminate') || false;
         $(selector).each(function() {
-            const condition = $(this).data(`${type}Condition`);
-            const toggle = state && (!condition || $(condition).length > 0);
-            const disabled = type === 'activates' ? !toggle : toggle;
-            $(this).attr({
-                disabled: disabled,
-                'aria-disabled': disabled ? 'true' : 'false'
-            }).trigger('update.proxy');
+            var condition = $(this).data(`${type}Condition`),
+                toggle = state && (!condition || $(condition).length > 0);
+            $(this)
+                .attr('disabled', type === 'activates' ? !toggle : toggle)
+                .trigger('update.proxy');
         });
     });
 });
@@ -117,12 +115,9 @@ STUDIP.ready((event) => {
 // element. Define element to disable if select has a value different from
 // an empty string by a css selector in attribute "data-activates".
 $(document).on('change update.proxy', 'select[data-activates]', function() {
-    const activates = $(this).data('activates');
-    const disabled = $(this).is(':disabled') || $(this).val().length === 0;
-    $(activates).attr({
-        disabled: disabled,
-        'aria-disabled': disabled ? 'true' : 'false'
-    });
+    var activates = $(this).data('activates'),
+        disabled = $(this).is(':disabled') || $(this).val().length === 0;
+    $(activates).attr('disabled', disabled);
 });
 
 STUDIP.ready((event) => {
-- 
GitLab