Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

single.html Produces Two Main Elements #149

Closed
ma10 opened this issue Jan 4, 2019 · 3 comments
Closed

single.html Produces Two Main Elements #149

ma10 opened this issue Jan 4, 2019 · 3 comments

Comments

@ma10
Copy link

ma10 commented Jan 4, 2019

layouts/_default/single.html produces two main elements, but there should be only one visible main element in each page, as the specification says.

With current single.html, the first main element starts before the section title, and the second starts before the content body.

IMO, from the accessibility point of view, the main should start before the content (article) title, and should end after the content body.

@budparr
Copy link
Member

budparr commented Jan 6, 2019

Thanks, @ma10 Maybe you can show me your repo. The theme itself doesn't duplicate the main element, as you can see in this screenshot.

screen shot 2019-01-06 at 10 17 12 am

@ma10
Copy link
Author

ma10 commented Jan 7, 2019

Thanks for the response.
Though, please note that I can't tell what the screenshot shows as I'm blind.

Since I don't have it under git, I attach a few files here.

To reproduce the problem, I did:

  1. hugo new site sample
  2. Clone the ananke theme
  3. Copy the config.toml from the examplesite and made minimum changes (see attached config.toml)
  4. Create a very simple sample page as content/post/test.md (see attached test.markdown)
  5. After generate the pages, look at public/post/test/index.html (see attached index.html)

The relevant part from the resulting file below:

    <main class="pb7" role="main">
  <article class="flex-l flex-wrap justify-between mw8 center ph3 ph0-l">
    <header class="mt4 w-100">
      <p class="f6 b helvetica tracked">
        POSTS
      </p>
      <h1 class="f1 athelas mb1">Test</h1>
            <time class="f6 mv4 dib tracked" datetime="2019-01-07T22:35:21&#43;09:00">January 7, 2019</time>      
                </header>
    <main class="nested-copy-line-height lh-copy serif f4 nested-links nested-img mid-gray pr4-l w-two-thirds-l">
<h1 id="testing">testing</h1>
<p>test for the main elements.</p>
<ul class="pa0">
</ul>
<div class="mt6">
      </div>
    </main>
    <aside class="w-30-l mt6-l">
    </aside>
  </article>
    </main>

@budparr
Copy link
Member

budparr commented Jan 8, 2019

you're right. I fixed this and will have the release out shortly. Thanks!

@budparr budparr closed this as completed Jan 8, 2019
budparr pushed a commit that referenced this issue Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants