Skip to content

Commit 3d57b9d

Browse files
Armaan GuptaArmaan Gupta
authored andcommitted
removed the explicit addition of aria labels from the FormOptionFieldBase.js as we have grouped the radiobutton in fieldset and added the legend
1 parent a1d8dc1 commit 3d57b9d

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

ui.frontend/src/view/FormOptionFieldBase.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,23 +124,14 @@ class FormOptionFieldBase extends FormFieldBase {
124124
let valueToSet = index < newEnumNames.length ? newEnumNames[index] : input.value;
125125
let purifiedValue = window.DOMPurify ? window.DOMPurify.sanitize(valueToSet) : valueToSet;
126126
span.innerHTML = purifiedValue;
127-
let richScreenReaderText = `${this._model.label.value}: ${purifiedValue}`;
128-
let plainScreenReaderText = window.DOMPurify ? window.DOMPurify.sanitize(richScreenReaderText, { ALLOWED_TAGS: [] }) : richScreenReaderText;
129-
input.setAttribute("aria-label", plainScreenReaderText);
130127
});
131128
} else {
132129
[...this.getOptions()].forEach((option, index) => {
133130
let span = option.querySelector('span');
134-
let input = option.querySelector('input');
135131
let purifiedValue = window.DOMPurify ? window.DOMPurify.sanitize(newEnumNames[index]) : newEnumNames[index];
136132
if(span) {
137133
span.innerHTML = purifiedValue;
138134
}
139-
if(input) {
140-
let richScreenReaderText = `${this._model.label.value}: ${purifiedValue}`;
141-
let plainScreenReaderText = window.DOMPurify ? window.DOMPurify.sanitize(richScreenReaderText, { ALLOWED_TAGS: [] }) : richScreenReaderText;
142-
input.setAttribute("aria-label", plainScreenReaderText);
143-
}
144135
});
145136
}
146137
}

0 commit comments

Comments
 (0)