summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-03-05 10:05:11 -0500
committerGitHub <noreply@github.com>2023-03-05 23:05:11 +0800
commite3b1ebbbfed7fac634eedf62a28d9dfdb990d22d (patch)
tree2a55506cb866a3121eb21809312a55104607f8a4 /web_src
parent17ae7e335effda0f88b1df83b6918ff9b131f914 (diff)
downloadgitea-e3b1ebbbfed7fac634eedf62a28d9dfdb990d22d.tar.gz
gitea-e3b1ebbbfed7fac634eedf62a28d9dfdb990d22d.zip
Scoped labels: set aria-disabled on muted Exclusive option for a11y (#23306) (#23311)
Backport #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: Brecht Van Lommel <brecht@blender.org> 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 313d406821..18676d25e6 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');
}
}