Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.1.X, 7.2.X, 7.3.X, Master
-
7.2.x, 7.1.x
-
Committed
-
3
Description
The customer discovered a use-case where
<liferay-ui:asset-tags-selector id="test"/>
will generate a duplicate ID testassetTagNames in the HTML of the page, causing an accessibility issue.
Reproduction steps:
1) Create a dummy MVC portlet with the below in the view.jsp:
<liferay-ui:asset-tags-selector id="test"/>
2) Compile, deploy (See attached plugin [^com.liferay.docs.mvcportlet-1.0.0.jar] )
3) Place it on a page and inspect the DOM:
Expected:
No IDs belonging to the asset tag selector should be duplicated
Actual behavior:
The text field and the tag selector field have both id="testassetTagNames"
Reproduced on 7.1.x @ 385d3bbfc0d1ec86cd564076c2c7d06e5bfdeb5ca9014ceade204c7ea48eb082
Reproduced on master @ 7456baa3c43b0b99045a078309a57fa9e38bd3e8cb72be25406a7a8c168c9adf, the console will also print:
[DOM] Found 2 elements with non-unique id #testassetTagNames: (More info: https://goo.gl/9p2vKq) <input class="form-control lfr-tag-selector-input field-input-text" id="testassetTagNames" maxlength="75" size="15" title="Add Tags" type="text" tabindex="null" autocomplete="off"> <input class="form-control lfr-tag-selector-input" id="testassetTagNames" maxlength="75" size="15" title="Add Tags" type="text">
On the OOTB Web Content Display portlet:
Reproduced on 7.1.x : just add a new piece of web content through the portlet and expand the tag selector in the "Metadata" section: there will be 2 elements with duplicate ID.
Not reproduced on master, there won't be ID duplication.
This case is similar to
LPS-101182, but in that LPS categories are involved instead and multiple issues come from the fact of having duplicate IDs.
* Please see Zendesk Support tab for further comments and attachments.
Attachments
Issue Links
- is related to
-
AUI-3192 Duplicate IDs generated by aui-form-field-deprecated
-
- Closed
-