Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
IFRAME Ghost Reviewing Accessibility
Enrique Rodríguez, modificado hace 4 meses.
New Member
Mensajes: 10
Fecha de incorporación: 27/01/15
Mensajes recientes
Hi all,
I'm reviewing the accessibility of a portal in Liferay 7 CE. I have the following error in the checkup:
I'm trying to find that IFRAME but it's impossible. When I search in HTML markup, the IFRAME does not appear.
Where is this IFRAME and how can I edit it to pass the accessibility test?
I'm reviewing the accessibility of a portal in Liferay 7 CE. I have the following error in the checkup:
WCAG2AA.Principle2.Guideline2_4.2_4_1.H64.1
error: Iframe element requires a non-empty title attribute that identifies the frame.
<iframe src="" style="display: none;"></iframe>I'm trying to find that IFRAME but it's impossible. When I search in HTML markup, the IFRAME does not appear.
Where is this IFRAME and how can I edit it to pass the accessibility test?
David H Nebinger, modificado hace 8 años.
Liferay Legend
Mensajes: 14933
Fecha de incorporación: 2/09/06
Mensajes recientes
Who knows? I mean, it may be instantiated or removed via javscript. Kind of looks like some sort of tracking thing to me since it has display:none.
It's not an OOTB liferay thing, so it was likely injected by your own code/libs.
It's not an OOTB liferay thing, so it was likely injected by your own code/libs.
Enrique Rodríguez, modificado hace 4 meses.
New Member
Mensajes: 10
Fecha de incorporación: 27/01/15
Mensajes recientes
David H Nebinger:
It's not an OOTB liferay thing, so it was likely injected by your own code/libs.
I've run several tests to rule out IFRAME being injected by my own code. In a clean installation of Liferay 7CE the IFRAME is still present, and giving the same error of accessibility.

I have reviewed my code from top to bottom, the IFRAME is injected by Liferay for some reason I don't know.
Thanks for "help"…
Juan Gonzalez, modificado hace 8 años.
Liferay Legend
Mensajes: 3089
Fecha de incorporación: 28/10/08
Mensajes recientes
Interesting. Then, it will probably be rendered by some javascript component.
Jose Jimenez, modificado hace 8 años.
Regular Member
Mensajes: 176
Fecha de incorporación: 23/08/12
Mensajes recientes
Hi Enrique,
Could you attach the .html source code generated?
Looking for style="display: none;" in the Liferay source code, it doesn't seem to be used in conjunction with a iframe, anyway the html can helps
Best,
Jose
Could you attach the .html source code generated?
Looking for style="display: none;" in the Liferay source code, it doesn't seem to be used in conjunction with a iframe, anyway the html can helps
Best,
Jose
David H Nebinger, modificado hace 8 años.
Liferay Legend
Mensajes: 14933
Fecha de incorporación: 2/09/06
Mensajes recientes
The problem, of course, will be any dynamic DOM manipulation made on behalf of dynamic javascript. Viewing the source may or may not reveal a match.
I have a local vanilla copy of Liferay DXP, FP 38 running. If I view source and even view generated source, I have no iframes at all on the page. I'm talking a vanilla launch, no additional plugins, themes, etc. just the OOTB launch with the blue welcome portlet on it.
If you start pulling in js libraries for, say, ad displays, analytics frameworks, APM monitoring like NewRelic, etc., you start to lose control over what the page actually imports. For example, if you ever look at a page that includes the google analytics scripts, you'll sometimes find that there are all kinds of other scripts that get pulled in too that you didn't even realize. Try doing a view source on this forum page and check out all of the scripts that are pulled in for google ads, google analytics, insight, newrelic, plus a whole bunch of others that I don't remember or recognize.
Plus, if you're behind a corporate proxy/firewall, they can also inject into the DOM stream in order to do employee monitoring. And I'm guessing that certain state actors may do the same.
If you're running a browser like Chrome or Firefox and you have extensions installed, they too can manipulate the DOM also.
The point is that while the tool might be seeing an unnamed iframe, it could be coming from anywhere. You have to have to tools and knowhow to track it down and see where it originates from.
I have a local vanilla copy of Liferay DXP, FP 38 running. If I view source and even view generated source, I have no iframes at all on the page. I'm talking a vanilla launch, no additional plugins, themes, etc. just the OOTB launch with the blue welcome portlet on it.
If you start pulling in js libraries for, say, ad displays, analytics frameworks, APM monitoring like NewRelic, etc., you start to lose control over what the page actually imports. For example, if you ever look at a page that includes the google analytics scripts, you'll sometimes find that there are all kinds of other scripts that get pulled in too that you didn't even realize. Try doing a view source on this forum page and check out all of the scripts that are pulled in for google ads, google analytics, insight, newrelic, plus a whole bunch of others that I don't remember or recognize.
Plus, if you're behind a corporate proxy/firewall, they can also inject into the DOM stream in order to do employee monitoring. And I'm guessing that certain state actors may do the same.
If you're running a browser like Chrome or Firefox and you have extensions installed, they too can manipulate the DOM also.
The point is that while the tool might be seeing an unnamed iframe, it could be coming from anywhere. You have to have to tools and knowhow to track it down and see where it originates from.
Enrique Rodríguez, modificado hace 4 meses.
New Member
Mensajes: 10
Fecha de incorporación: 27/01/15
Mensajes recientes
Again, in a clean Liferay installation (without using any script or external service), IFRAME still appears, in the HTML markup it does not appear, but when I pass the accessibility test it does.
Minhchau Dang, modificado hace 8 años.
Liferay Master
Mensajes: 598
Fecha de incorporación: 22/10/07
Mensajes recientes
Enrique Rodríguez:
Again, in a clean Liferay installation (without using any script or external service), IFRAME still appears, in the HTML markup it does not appear, but when I pass the accessibility test it does.
What tool are you using for your accessibility test?
There was a thread in the community chat where someone mentioned using Koa11y and ran into a similar problem, but the instructions on the README for the repository don't work on my distribution of Linux (tested lts/argon, lts/boron, and lts/carbon versions of node.js), so I wasn't able to investigate it.
Enrique Rodríguez, modificado hace 4 meses.
New Member
Mensajes: 10
Fecha de incorporación: 27/01/15
Mensajes recientes
Minhchau Dang:
There was a thread in the community chat where someone mentioned using Koa11y…
Hi Minhchau, yes I'm working with Koa11y. Do you know of any problems with this application?
Really thanks
Minhchau Dang, modificado hace 8 años.
Liferay Master
Mensajes: 598
Fecha de incorporación: 22/10/07
Mensajes recientes
Enrique Rodríguez:
Hi Minhchau, yes I'm working with Koa11y. Do you know of any problems with this application?
I was actually secretly hoping that you weren't using Koa11y, because I couldn't get it to work on my machine. However, I discovered that when you checkout the repository, the default branch hasn't been released yet (so it's expected that it won't work right), so I switched to the 3.0 branch and was able to take a look at it.
Based on some experimentation, Koa11y detects the invisible iframe that's temporarily added for Senna.js as problematic, which is essentially a false positive. If for some reason you have some requirement that says you must get Koa11y to report no errors, currently the only way to get rid of the WCAG2AA.Principle2.Guideline2_4.2_4_1.H64.1 error is to set javascript.single.page.application.enabled=false in your portal properties.
Also be aware that certain Javascript interactions that create modal dialog windows won't have titles either, such as the ones created using Liferay.Util.openWindow, as described in LPS-68701.
Enrique Rodríguez, modificado hace 4 meses.
New Member
Mensajes: 10
Fecha de incorporación: 27/01/15
Mensajes recientes
Really thanks for the answer Minhchau. At least I have a beginning to solve this problem. 
Regards.
Regards.
Enrique Rodríguez, modificado hace 4 meses.
New Member
Mensajes: 10
Fecha de incorporación: 27/01/15
Mensajes recientes
Jose Jimenez:
Could you attach the .html source code generated?
Thanks for the answer, Jose.
Unfortunately I cannot share the HTML markup for privacy reasons. I know it's hard to help without seeing the code, so, thanks again.
Clean installation of Liferay 7 CE, I try to pass the AA accessibility test, and get an error with an empty IFRAME, it's this "curious"