Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(seo): Replaces h1 tags with spans #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexisCK
Copy link

@AlexisCK AlexisCK commented Feb 1, 2021

For SEO purposes.

hx tags should not be used.

@felixgirault felixgirault self-assigned this Feb 1, 2021
@felixgirault
Copy link
Contributor

Hello,
The use of hx tags is more of an accessibility concern than SEO.
Did this caused you a problem in search results ?
Orejime being initialized with JS after the page is loaded, I doubt that search engines are indexing its contents, but I might be wrong.

@AlexisCK
Copy link
Author

AlexisCK commented Feb 1, 2021

Hello,

Content seems to be indexed by Google.

Examples :

  • site:cm-larochelle.fr La CMA respecte vos données personnelles.
  • site:byflox.com Nous utilisons

Other tags can be used for digital accessibility, instead of hx?

@felixgirault
Copy link
Contributor

We didn't see any texts from Orejime in search results, could you give us some more precise links?
Indeed, we can use <div role="heading"> tags, but I can't find any evidence that they are indexed differently, I would have to test that. Unless you have any insights?

@Tomowok
Copy link

Tomowok commented Jun 17, 2021

Hello, You can see results from Orejime here with his example : "site:cm-larochelle.fr La CMA respecte vos données personnelles"

@felixgirault
Copy link
Contributor

The problem seems to arise on websites where the modal pops up right when entering.
Orejime creates a react portal (via react-modal) to put the modal. By default, it is right besides the other orejime components, at the top of <body>.
Do you think moving the portal at the very end of the document could solve the problem ? The <h1> would then be the last of the document, so any previous one would probably superseed it.

@sbonaventure
Copy link

Hello,

Indeed, if you do this search https://www.google.fr/search?q=site%3Acm-larochelle.fr+La+CMA+respecte+vos+donn%C3%A9es+personnelles Google shows an extract of the page which contains the search term and not the description of the page ...

If we do a different search, for example: https://www.google.fr/search?q=site%3Acm-larochelle.fr+confidentialit%C3%A9 the first result of the search is identical, but the extract is different, it also corresponds to the content of the meta tag:
<meta name="description" content="Qui sommes-nous&nbsp;? L’adresse de notre site Web est&nbsp;: https://www.cm-larochelle.fr Dans le cadre de ses activités, l’éditeur du présent site Internet est amené à traiter des données à caractère personnel. La présente Politique de Confidentialité et de Protection des Données à Caractère Personnel (PCP/DCP) présente les informations nécessaires à la compréhension…" />

I'm not an SEO expert, but I think google is doing too smart things, like showing us the snippet that matches our search if it finds one ...

Also, if I do the exercise with a different search engine, it only displays the content of this meta tag : https://www.qwant.com/?client=ext-chrome-sb&q=site%3Acm-larochelle.fr+La+CMA+respecte+vos+donn%C3%A9es+personnelles&t=web

For me this concern does not relate to the HTML structure of Oréjime, but only to the construction of the page and the presence or not of a <meta name =" description "[...] /> tag. Indeed, Oréjime inserts the information banner as the first element of the DOM, and in the absence of a suitable meta tag, it is this content that will be crawled first. The cookie banner is an object that has a very specific role: it conditions the consultation of content. This is a prerequisite for the consultation. This information must be consulted before viewing the content.

Also, I guess replacing the titles <h1> with <span> shouldn't change this. But if an SEO expert goes through it, I would like to have his opinion on this subject (although in my opinion this does not change much to the implementation we have chosen, given that we make websites usable for human beings - potentially disabled - and not crawlers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants