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

Read template should use more structured HTML #34

Open
caktus-philip opened this issue May 4, 2015 · 2 comments
Open

Read template should use more structured HTML #34

caktus-philip opened this issue May 4, 2015 · 2 comments

Comments

@caktus-philip
Copy link
Contributor

The current read template puts the fields and field values into a single DIV and separates them by <br> tags. The code is below for reference.

I have two suggestions for improvement. First, wrap each field label + value in a block element (div, p, or li). That would make them a lot easier to style and more friendly to screen readers and content scrapers.

Second, add a class or id to the containing div to make it CSS-helpful.

<div>
  {# we have a form, just to make it easy to go through the data and display it #}
  {% for field in form %}
    <br/>
    {{ field.label_tag }} {{ field.value }}
  {% endfor %}
</div>
@dpoirier
Copy link
Contributor

dpoirier commented May 4, 2015

Good ideas. The <br/> was just a quick 'n dirty way to get something up and running.

@caktus-philip
Copy link
Contributor Author

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

No branches or pull requests

2 participants