grav-plugin-events icon indicating copy to clipboard operation
grav-plugin-events copied to clipboard

Event plugin pages html is not valid

Open WhiteWolfSix opened this issue 8 years ago • 0 comments

There are few code errors that leads to various issues when trying to validate event page. Here are some of them in events.html.twig An img element must have an alt attribute, except under certain conditions.

          <div class="featured-event-masthead">
            {% set image = event.media.images|first %}
            {% if image != null %}
              {{ image.cropZoom(1200,400).html }}
            {% endif %}
            <h3 class="featured-event-title"><a href="{{ event.url }}">{{ event.title }}</a></h3>
          </div>

Self-closing syntax (/>) used on a non-void HTML element. Ignoring the slash and treating as a start tag. <a href="{{ event.url }}" class="event-button" />{{ 'PLUGIN_EVENTS.EVENTS.BUTTON'|t }}</a>

Section lacks heading. Consider using h2-h6 elements to <section class="featured-events">

I only tried validate page created by events.html.twig, haven't validate other pages.

WhiteWolfSix avatar Dec 10 '16 08:12 WhiteWolfSix