We are using Google reCaptcha for our web forms. I recently ran an accessibility scan on our web forms and the scan is flagging a new error -- the reCaptcha is using an iframe that does not include a title attribute. However, the reCaptcha iframe does have role="presentation". If an iframe has role="presentation", is a title attribute still required for accessibility purposes? The relevant guideline is WCAG 2.0 A 2.4.1.
If an iframe has role="presentation" is a title attribute still required for accessibility purposes?
-
I'm of the opinion that this is either a false positive or it's a thing Google has to change (good luck getting them to do that). Also dealing with this at the moment and trying to tell the QA person that I can't change it is like talking to a block of wood.– tobybotJun 26, 2018 at 16:14
1 Answer
EDIT (thanks to @andrewmacpherson): The iframe
now can have the "presentation" role, but you still need an empty title
attribute for non-ARIA technologies
Original answer:
iframe
can't have the "presentation" role.
According to Document conformance requirements for use of ARIA attributes in HTML, they are restricted to application
, document
, or img
roles.
That being said, you should always use the title
attribute for iframe
elements for assistive technologies not using ARIA.
-
1Thanks! Unfortunately, the iframe code is being generated by Google's external JavaScript file, so I don't have direct control over it. Nov 7, 2017 at 14:10
-
The document linked to here is still a working draft, and it appears to have changed since then. According to the current version of ARIA in HTML (14 December 2018), iframe can have the presentation role. Feb 2, 2019 at 4:15