Search code examples
javascripthtmlcssseosplidejs

Text is not selectable and it's causing SEO problems


We have two sites that has same problem. We are using sliders by SplideJS. Wince we have 2 branches, we need to have 2 types of data in our homepage in any given time. And once a branch is selected e.g. The Netherlands, the whole page should display the content about The Netherlands. we previously used sliders and tabs but they had a synchronization problem so we switched to whole sliders.

I need to make the price in this section show in google. Below, you can see the settings for SplideJS.

To summarize: I have draggable slider and non-selectable text(s). I need to make these texts show up in Google/SEO. !IMPORTANT NOTE: Our SEO expert said the text is seen as an image.

    pricingSplide = new Splide('#pricingsplide', {
      speed: 400,
      type: 'loop',
      padding: '0rem',
      rewind: false,
      drag:true
    });


Solution

  • It looks like SplideJS applies user-select properties to the entire track.

    You could potentially circumvent this by adding the following to your CSS:

    .splide__track.splide__track--draggable {
      user-select: unset;
    }
    

    However, this may also affect the functionality of the slider so use with caution and also target specific sliders if possible.