• Resolved gabortoth

    (@gabortoth)


    Hi there,

    We’re having an issue with Canard in terms of HTML validation.

    We use Canard with the ‘Also display tagged posts outside the Featured Content area’ option turned on in the ‘Featured Content’ section.

    With this option on, it generates Article tags in the featured section with the exact same ID attributes as in the main list of posts. This is listed as a validity issue by most webpage tests.

    Also it would come in handy to add post titles in aria-labels to the links (A tags) containing the main picture in the featured block, as it is also listed as an issue.

    Thanks & cheers,
    Gabor

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter gabortoth

    (@gabortoth)

    Hm, okay, I realized it’s rather easy to do in the theme editor. If someone else faces the same issue, I resolved these by adding some parts to content-featured-post.php in the theme editor:

    Instead of the original:

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <a class="post-thumbnail" href="<?php the_permalink(); ?>">

    I used this:

    <article id="featured-post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-label="<?php the_title(); ?>">
    • This reply was modified 2 years ago by gabortoth.
    • This reply was modified 2 years ago by gabortoth.
    • This reply was modified 2 years ago by gabortoth.
    • This reply was modified 2 years ago by gabortoth.
    • This reply was modified 2 years ago by gabortoth.
Viewing 1 replies (of 1 total)
  • The topic ‘Duplicate DOM IDs in Canard’ is closed to new replies.