Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/consent-notice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,14 @@ export default class ConsentNotice extends React.Component {
manager={manager}
/>
);

const visibleHeader = t(['!', 'consentNotice', 'title']);
const notice = (
<div
role="dialog"
aria-describedby="id-cookie-notice"
aria-labelledby="id-cookie-title"
aria-labelledby={
visibleHeader && config.showNoticeTitle ? 'id-cookie-title' : 'id-cookie-notice'
}
id="klaro-cookie-notice"
tabIndex="0"
autofocus={config.autoFocus}
Expand All @@ -242,7 +244,7 @@ export default class ConsentNotice extends React.Component {
}`}
>
<div className="cn-body">
{t(['!', 'consentNotice', 'title']) && config.showNoticeTitle && (
{visibleHeader && config.showNoticeTitle && (
<h2 id="id-cookie-title">
{t(['consentNotice', 'title'])}
</h2>
Expand Down