2

I'm have an accessibility & SEO problem. I want to display more information and punctuation for the people using a screen reader. Will this code will be understand as duplicate content by Google and other search engines?

If yes, what can I do to avoid this behaviour ?

<!-- For screen reader, not visible by user -->

<span class="visually-hidden">
    Place of the event: <?php echo $event->getName() ?>.
</span>


<!-- 
Original content, with condition & no punctuation.
Not visible by screen reader to avoid repetition 
-->

<span aria-hidden="true">
    <?php echo truncate_text($event->getName(), 35) ?>
</span>
1
  • 2
    Duplicate content isn't the issue. Duplicate content is only a big problem when content is duplicated from another site. Even on your own site, you can duplicate whole pages without getting penalized, Google will just pick one to index. Duplicating small amounts of text within the same page isn't an issue at all. See What is duplicate content and how can I avoid being penalized for it on my site? You might have to worry about hidden content penalties. Commented Jun 6, 2017 at 9:20

1 Answer 1

2

If you duplicate the text on the same page and change visibility depending on the viewer/screenreader you don't have to worry IF you make sure that search engines are allowed to read your CSS/JS files. Some websites are blocking CSS/JS for bots. That would make the text seem duplicated since Google wouldn't "see" that you are hiding text.

This is what you do:

  1. Make sure your CSS + JS files are not blocked for Google and other search engines e.g. in your robots.txt.
  2. Test the page(s) in Google Search Console. You can fetch the page as Google bot and see how Google will render the page. This is where you can discover if any of your important CSS/JS files are blocked. If you don't have a Search Console account you can get one for free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.