Iframes Must Have Title
Attributes - I'm sure most bloggers don't yet know this one rule, that is, for
every iframe you must have the title attribute. I myself only realized after
getting an error at Lighthouse.
When we check a page that
has an iframe with the Lighthouse tool, for example, for example embed Youtube
videos, then we will get an error in accessibility which is "<frame>
or <iframe> elements do not have a title".
The error occurred because
the Youtube iframe was not equipped with the title attribute. So now every
iframe must have a title attribute.
The addition of the title
attribute to this iframe is perhaps not yet familiar to most bloggers because
there are not many who have socialized this. Google alone as the owner of
Youtube and Adsense has not yet completed the embed with the title attribute.
Why is adding the title
attribute to the iframe important?
Because screen reader users
like the blind rely on the title of the frame to explain the embeded content.
They will have difficulty reading and understanding content if the iframe is
not marked with the title attribute.
Adding descriptive and
unique titles allows users to quickly find the iframe they need.
So from now on, make sure
that all iframes have valid, descriptive and unique title attribute values. If
a page has more than 1 iframe, then the title attribute cannot be the same.
You can add the title
attribute to the iframe element as follows:
<iframe src="......." title="my blogger tutorial"></iframe>
The title tag in the iframe
must be descriptive and explain briefly and clearly about the embed content.
And the title attribute must
actually contain text, not blank like this example:
<iframe src="......." title="your title here"></iframe>
Likewise with the amp-iframe
tag, you should also complete with the title attribute as iframe.
Maybe usefull….