mdn / developer-portal

The code that generates the MDN Web Docs Developer Portal.
Mozilla Public License 2.0
61 stars 38 forks source link

Newsletter signup should not be nested inside main #1759

Closed schalkneethling closed 3 years ago

schalkneethling commented 3 years ago

An aside element should not be contained within another landmark element. Currently, the newsletter is contained within the main element which is incorrect.

I tested moving the newsletter container outside the main element and there is no detrimental visual impact. The current markup is as follows:

<div id="main">
  <main role="main">
    <div class="mzp-l-content">
      <aside id="newsletter" class="newsletter-signup mzp-c-newsletter"></aside>
    </div>
  </main>
</div>

We should change this to:

<div id="main">
  <main role="main"></main>
  <div class="mzp-l-content">
    <aside id="newsletter" class="newsletter-signup mzp-c-newsletter"></aside>
  </div>
</div>

In fact, we can even change it to:

<main id="main" role="main"></main>
<div class="mzp-l-content">
  <aside id="newsletter" class="newsletter-signup mzp-c-newsletter"></aside>
</div>