aboutsummaryrefslogtreecommitdiff
path: root/web_src
diff options
context:
space:
mode:
authorBrecht Van Lommel2023-03-05 14:25:25 +0100
committerGitHub2023-03-05 21:25:25 +0800
commite8935606f5f1fff3c59222ebca6d4615ab06fb0b (patch)
treefe7413471d9a15bee48e8464d7f938ceb7b3a29d /web_src
parent5d621fe9a7f27b5168db22dc38423b71037bcae0 (diff)
Scoped labels: set aria-disabled on muted Exclusive option for a11y (#23306)
It is convenient to be able to toggle off this option after removing / from the name. This ensures the muted state is communicated to blind users even when the input is not fully disabled. Part of #22974 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/features/comp/LabelEdit.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/web_src/js/features/comp/LabelEdit.js b/web_src/js/features/comp/LabelEdit.js
index 313d40682..18676d25e 100644
--- a/web_src/js/features/comp/LabelEdit.js
+++ b/web_src/js/features/comp/LabelEdit.js
@@ -13,6 +13,7 @@ function updateExclusiveLabelEdit(form) {
if (isExclusiveScopeName(nameInput.val())) {
exclusiveField.removeClass('muted');
+ exclusiveField.removeAttr('aria-disabled');
if (exclusiveCheckbox.prop('checked') && exclusiveCheckbox.data('exclusive-warn')) {
exclusiveWarning.removeClass('gt-hidden');
} else {
@@ -20,6 +21,7 @@ function updateExclusiveLabelEdit(form) {
}
} else {
exclusiveField.addClass('muted');
+ exclusiveField.attr('aria-disabled', 'true');
exclusiveWarning.addClass('gt-hidden');
}
}