Skip to content

Commit d824333

Browse files
authored
Merge pull request #1406 from adobe/devMaster17Sep
Dev master17 sep
2 parents 2f9aff9 + bcffd89 commit d824333

File tree

14 files changed

+34
-13
lines changed

14 files changed

+34
-13
lines changed

it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
name="fileinput5"
8686
readOnly="{Boolean}true"
8787
textIsRich="[true,true]"
88+
maxFileSize="2"
8889
type="file[]"
8990
visible="{Boolean}true"/>
9091
<submit

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/checkboxgroup/v1/checkboxgroup/clientlibs/site/js/checkboxgroupview.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,10 @@
124124
this.widget.forEach(widget => {
125125
if (selectedWidgetValues.includes((widget.value))) {
126126
widget.checked = true
127-
widget.setAttribute(FormView.Constants.HTML_ATTRS.CHECKED, FormView.Constants.HTML_ATTRS.CHECKED)
128-
widget.setAttribute(FormView.Constants.ARIA_CHECKED, true)
127+
widget.setAttribute(FormView.Constants.HTML_ATTRS.CHECKED, FormView.Constants.HTML_ATTRS.CHECKED);
129128
} else {
130129
widget.checked = false
131130
widget.removeAttribute(FormView.Constants.HTML_ATTRS.CHECKED);
132-
widget.setAttribute(FormView.Constants.ARIA_CHECKED, false);
133131
}
134132
}, this)
135133
super.updateEmptyStatus();

ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/radiobutton/v1/radiobutton/clientlibs/site/js/radiobuttonview.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,9 @@
133133
if (modelValue != null && widget.value != null && (modelValue.toString() == widget.value.toString())) {
134134
widget.checked = true;
135135
widget.setAttribute(FormView.Constants.HTML_ATTRS.CHECKED, FormView.Constants.HTML_ATTRS.CHECKED);
136-
widget.setAttribute(FormView.Constants.ARIA_CHECKED, true);
137136
} else {
138137
widget.checked = false;
139138
widget.removeAttribute(FormView.Constants.HTML_ATTRS.CHECKED);
140-
widget.setAttribute(FormView.Constants.ARIA_CHECKED, false);
141139
}
142140
}, this)
143141
super.updateEmptyStatus();

ui.apps/src/main/content/jcr_root/apps/core/fd/components/aemform/v2/aemform/aemform.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@
7070
<sly data-sly-test.formLocaleString="${form.locale || 'en'}"/>
7171
<iframe title="${form.title}"
7272
role="${form.roleAttribute || ''}"
73+
data-sly-set.dataRef="?${['dataRef=', request.requestParameterMap['dataRef'][0].toString] @ join=''}"
7374
class="cmp-aemform__iframecontent"
74-
src="${request.contextPath}${resource.path}.iframe.${formLocaleString}.html?dataRef=${request.requestParameterMap['dataRef'] != null ? request.requestParameterMap['dataRef'][0].toString : '' @ context='attribute'}${!wcmmode.edit ? '&wcmmode={0}':'' @ format=[wcmmode.toString]}"
75+
src="${request.contextPath}${resource.path}.iframe.${formLocaleString}.html${request.requestParameterMap['dataRef'] != null ? dataRef : '' @ context='attribute'}"
76+
width="100%;"
7577
width="100%;"
7678
data-form-page-path="${form.formEditPagePath}"></iframe>
7779
<sly data-sly-test="${form.useIframe != 'false' && form.height == 'auto'}"

ui.frontend/src/LanguageUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class LanguageUtils {
8989
translatedText = this.#langData[lang][key];
9090
if (snippets) {
9191
//resolve message with snippet
92-
translatedText = translatedText.replace(/{(\d+)}/g, function (match, number) {
92+
translatedText = translatedText.replace(/\${(\d+)}/g, function (match, number) {
9393
return typeof snippets[number] != 'undefined'
9494
? snippets[number]
9595
: match;

ui.frontend/src/view/FormCheckBox.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ class FormCheckBox extends FormFieldBase {
3030
if (modelValue === this._model._jsonModel.enum[0]) {
3131
this.widget.checked = true
3232
this.widget.setAttribute(FormView.Constants.HTML_ATTRS.CHECKED, FormView.Constants.HTML_ATTRS.CHECKED)
33-
this.widget.setAttribute(FormView.Constants.ARIA_CHECKED, true);
3433
} else {
3534
this.widget.checked = false
3635
this.widget.removeAttribute(FormView.Constants.HTML_ATTRS.CHECKED);
37-
this.widget.setAttribute(FormView.Constants.ARIA_CHECKED, false);
3836
}
3937
this.widget.value = modelValue;
4038
super.updateEmptyStatus();

ui.frontend/src/view/FormFieldBase.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ class FormFieldBase extends FormField {
232232
let widgetElement = typeof this.getWidget === 'function' ? this.getWidget() : null;
233233
let widgetElements = typeof this.getWidgets === 'function' ? this.getWidgets() : null;
234234
widgetElement = widgetElements || widgetElement;
235-
const model = this.getModel?.();
235+
const model = this.getModel?.();
236236

237-
if (widgetElement && model?.screenReaderText) {
237+
if (widgetElement && model?.screenReaderText && model?.enabled) {
238238
// Use DOMPurify to sanitize and strip HTML tags
239239
const screenReaderText = window.DOMPurify ? window.DOMPurify.sanitize(model.screenReaderText, { ALLOWED_TAGS: [] }) : model.screenReaderText;
240240
widgetElement.setAttribute('aria-label', screenReaderText);
3.01 MB
Loading

ui.tests/test-module/specs/aemEmbedContainer/aemEmbedContainer.runtime.cy.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ describe("Sites with Aem Embed Container", () => {
4848
cy.get('.cmp-adaptiveform-container').should('have.length', 1);
4949
cy.get('.cmp-adaptiveform-container').find('.cmp-adaptiveform-textinput__widget').should('have.length', 11);
5050
})
51+
52+
it('Test iframe src with dataRef', () => {
53+
cy.get('.cmp-aemform__iframecontent').should('have.attr', 'src').should('not.include', "wcmmode");
54+
});
5155
})
5256

5357
context('aem embed container in iframe mode with custom height ', function () {
@@ -124,5 +128,6 @@ describe("Sites with Aem Embed Container", () => {
124128
expect(fragmentTextInputModel.getState().value).to.equal(input)
125129
})
126130
})
131+
127132
})
128133
})

ui.tests/test-module/specs/checkbox/checkbox.runtime.cy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ describe("Form Runtime with CheckBox Input", () => {
125125
cy.get(`#${id}`).find(".cmp-adaptiveform-checkbox__errormessage").should('have.text',"This is a custom required checkbox")
126126
cy.get(`#${id} > div.${bemBlock}__errormessage`).should('have.attr', 'id', `${id}__errormessage`)
127127
cy.get(`#${id} > .${bemBlock}__widget-container > .${bemBlock}__widget`).should('have.attr', 'aria-describedby', `${id}__errormessage`)
128+
cy.get(`#${id} > .${bemBlock}__widget-container > .${bemBlock}__widget`).should('not.have.attr', 'aria-checked')
128129
cy.get(`#${id} > .${bemBlock}__widget-container > .${bemBlock}__widget`).should('have.attr', 'aria-invalid', 'true')
129130
})
130131

0 commit comments

Comments
 (0)