cusdis
cusdis copied to clipboard
Lighthouse Accessibility issue: <frame> or <iframe> elements do not have a title
Hello, when embedding the comment widget with this code snippet
<div id="cusdis_thread"
data-host="https://cusdis.com"
data-app-id="{{ APP_ID }}"
data-page-id="{{ PAGE_ID }}"
data-page-url="{{ PAGE_URL }}"
data-page-title="{{ PAGE_TITLE }}"
>
<script async src="https://cusdis.com/js/cusdis.es.js"></script>
I get the following issue from Lighthouse:
Would you consider adding a default/customisable title to the iframe loaded by the script?
I was experiencing the same issue https://web.dev/frame-title/?utm_source=lighthouse&utm_medium=devtools
https://github.com/djyde/cusdis/blob/73ba006f3f5cbd83ca38a30485215cb1abf5d473/widget/index.js#L39
看起来这里加一句singleTonIframe.title = xxx
就行,不过每个本地化文件都要加一条对应翻译