IFRAME Ghost Reviewing Accessibility

thumbnail
Enrique Rodríguez, modified 4 Months ago. New Member Posts: 10 Join Date: 1/27/15 Recent Posts
Hi all,
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?
thumbnail
David H Nebinger, modified 8 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
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.
thumbnail
Enrique Rodríguez, modified 4 Months ago. New Member Posts: 10 Join Date: 1/27/15 Recent Posts
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"…
thumbnail
Juan Gonzalez, modified 8 Years ago. Liferay Legend Posts: 3089 Join Date: 10/28/08 Recent Posts
Interesting. Then, it will probably be rendered by some javascript component.
thumbnail
Jose Jimenez, modified 8 Years ago. Regular Member Posts: 176 Join Date: 8/23/12 Recent Posts
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 emoticon

Best,
Jose
thumbnail
David H Nebinger, modified 8 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
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.
thumbnail
Enrique Rodríguez, modified 4 Months ago. New Member Posts: 10 Join Date: 1/27/15 Recent Posts
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.

emoticon
thumbnail
Minhchau Dang, modified 8 Years ago. Liferay Master Posts: 598 Join Date: 10/22/07 Recent Posts
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.
thumbnail
Enrique Rodríguez, modified 4 Months ago. New Member Posts: 10 Join Date: 1/27/15 Recent Posts
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 emoticon
thumbnail
Minhchau Dang, modified 8 Years ago. Liferay Master Posts: 598 Join Date: 10/22/07 Recent Posts
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.
thumbnail
Enrique Rodríguez, modified 4 Months ago. New Member Posts: 10 Join Date: 1/27/15 Recent Posts
Really thanks for the answer Minhchau. At least I have a beginning to solve this problem. emoticon

Regards.
thumbnail
Enrique Rodríguez, modified 4 Months ago. New Member Posts: 10 Join Date: 1/27/15 Recent Posts
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" emoticon