brainsum / cookieconsent

A Javascript based solution for blocking/allowing even 3rd party cookies to comply with GDPR
https://brainsum.github.io/cookieconsent/
ISC License
409 stars 89 forks source link

Unable to specify where HTML will be rendered #134

Open webartistse opened 5 months ago

webartistse commented 5 months ago

Now the bar and modal will be added as first child in body which causes bad structure for SEO and for accessibility directive as well. For good structure of headings the H1 should be first followed by H2 for the imost important content. Cookieconcent cause the the document to start with a H2 from cookiebar and modal.

I suggest an option to choose which element ro replace (if found) so you can choose where to place the rendered HTML. Otherwise place the code as last child in body.

I created a PR that place most of the HTML last here: https://github.com/brainsum/cookieconsent/pull/133