Read template should use more structured HTML
- Dominant language
- Python
- Stars
- 16
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
The current read template puts the fields and field values into a single DIV and separates them by `
` 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.
```
{# we have a form, just to make it easy to go through the data and display it #}
{% for field in form %}
{{ field.label_tag }} {{ field.value }}
{% endfor %}
```
Contributor guide
Research direction
Locate the read template that renders the form fields and inspect its current markup. Decide on the requested block-level field structure and a CSS hook for the containing element, then verify that the rendered read view no longer relies on br tags and remains usable for styling and screen readers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, html, python
- Domain
- accessibility, frontend, web-dev
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100