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

Inaccessible task list markup #3303

Closed
Heydon opened this Issue Apr 8, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@Heydon

Heydon commented Apr 8, 2017

Hi! Great product. Just thought you ought to know the rendered markup for task lists (https://gohugo.io/content/markdown-extras) is inaccessible i.e. the checkboxes are not correctly labeled.

<ul class="task-list">
  <li><input type="checkbox" disabled="" class="task-list-item"> a task list item</li>
  <li><input type="checkbox" disabled="" class="task-list-item"> list syntax required</li>
  <li><input type="checkbox" disabled="" class="task-list-item"> incomplete</li>
  <li><input type="checkbox" checked="" disabled="" class="task-list-item"> completed</li>
</ul>

You can fix this by wrapping the input and text in a <label>:

<ul class="task-list">
<li><label><input type="checkbox" disabled="" class="task-list-item"> a task list item</label></li>
<li><label><input type="checkbox" disabled="" class="task-list-item"> list syntax required</label></li>
<li><label><input type="checkbox" disabled="" class="task-list-item"> incomplete</label></li>
<li><label><input type="checkbox" checked="" disabled="" class="task-list-item"> completed</label></li>
</ul>

@bep bep added the Enhancement label Apr 8, 2017

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Apr 8, 2017

Member

Thanks ... You should tell that to GitHub as well; I think I ripped the markup from them.

Member

bep commented Apr 8, 2017

Thanks ... You should tell that to GitHub as well; I think I ripped the markup from them.

@Heydon

This comment has been minimized.

Show comment
Hide comment
@Heydon

Heydon Apr 8, 2017

@bep Yeah, fair enough! 😁

Heydon commented Apr 8, 2017

@bep Yeah, fair enough! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment