Skip to content

Commit 88ed011

Browse files
author
Simon L. Lange
committed
Ringsted-645: Missing aria-label on submit buttons without text
1 parent 2a446ec commit 88ed011

File tree

2 files changed

+14
-0
lines changed
  • web/themes/custom/fds_redwhite_theme

2 files changed

+14
-0
lines changed

web/themes/custom/fds_redwhite_theme/dist/javascripts/app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3249,12 +3249,19 @@ module.exports = function (button, expanded) {
32493249
// Search.
32503250
(function() {
32513251
var searchInputs = document.querySelectorAll('.search-input__input');
3252+
var searchSubmits = document.querySelectorAll('.search-input__button');
32523253

32533254
for (var i = 0; i < searchInputs.length; i++) {
32543255
var input = searchInputs[i];
32553256

32563257
input.setAttribute('aria-label', 'Indtast søgeord');
32573258
}
3259+
3260+
for (var j = 0; j < searchSubmits.length; i++) {
3261+
var submit = searchSubmits[j];
3262+
3263+
submit.setAttribute('aria-label', 'Søg');
3264+
}
32583265
})();
32593266

32603267
// Accordion - go to item in hash.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
// Search.
22
(function() {
33
var searchInputs = document.querySelectorAll('.search-input__input');
4+
var searchSubmits = document.querySelectorAll('.search-input__button');
45

56
for (var i = 0; i < searchInputs.length; i++) {
67
var input = searchInputs[i];
78

89
input.setAttribute('aria-label', 'Indtast søgeord');
910
}
11+
12+
for (var j = 0; j < searchSubmits.length; i++) {
13+
var submit = searchSubmits[j];
14+
15+
submit.setAttribute('aria-label', 'Søg');
16+
}
1017
})();

0 commit comments

Comments
 (0)