Hi! I've checked my site with W3C validator and realized that language switcher is not in way with W3C standart
`Attribute hreflang not allowed on element li at this point`
Seems like Drupal\bootstrap\Plugin\Preprocess\BootstrapDropdown is processing links and putting hreflang attribute even for links wrapper

Comments

YurkinPark created an issue. See original summary.

markhalliwell’s picture

Title: W3C validation of language links » [PP-1] Attribute hreflang not allowed on element li at this point
Version: 8.x-3.11 » 8.x-3.x-dev
Status: Active » Postponed
Issue tags: -w3c validator
Related issues: +#2454289: Attribute hreflang not allowed on element li at this point

This will only be removed if/when it is removed from core (which is what this code is based on).

markhalliwell’s picture

Category: Bug report » Task
Priority: Normal » Minor

FTR, W3C validator was merely created in an attempt to combat IE's complete disregard of XHTML back in the day.

It is an outdated "tool" that never really kept up with HTML5.

Why people continue to use it as a "gold standard" for how "good" a site is... is a joke.

Furthermore, the above message is only a "warning" (informative) not a real "error", meaning that browsers will likely just ignore it, not blow up and crash.

Thus, I'm downgrading the category and priority.