We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On the summary list component it is currently not possible to add ids to rows.keys, rows.values or the action item hrefs.
There should be the ability to add ids
Create a summary list component
The text was updated successfully, but these errors were encountered:
Suggested fix for actions in components/summary-list/template.njk lines 1-8
{%- macro _link(action) %} <a href="{{ action.href }}" {%- if action.classes %} class="{{ action.classes }}"{% endif %} {%- if action.id %} id="{{ action.id }}"{% endif %}> {{ action.html | safe if action.html else action.text }} {%- if action.visuallyHiddenText -%} <span class="nhsuk-u-visually-hidden"> {{ action.visuallyHiddenText }}</span> {% endif -%} </a> {% endmacro -%}
Suggested fix for adding IDs to key and value in components/summary-list/template.njk lines 12-17
<dt class="nhsuk-summary-list__key {%- if row.key.classes %} {{ row.key.classes }}{% endif %}" {% for attribute, value in row.key.attributes %} {{attribute}}="{{value}}"{% endfor %}> {{ row.key.html | safe if row.key.html else row.key.text }} </dt> <dd class="nhsuk-summary-list__value {%- if row.value.classes %} {{ row.value.classes }}{% endif %}" {% for attribute, value in row.value.attributes %} {{attribute}}="{{value}}"{% endfor %}> {{ row.value.html | indent(8) | trim | safe if row.value.html else row.value.text }} </dd>
Then in your nunjucks file you can use something like:
key: { text: "Starts on", attributes: { id: "starts-on-key" } }
Whilst maintaining flexibility to add other attributes not just ID if ever necessary.
Sorry, something went wrong.
No branches or pull requests
Bug Report
On the summary list component it is currently not possible to add ids to rows.keys, rows.values or the action item hrefs.
What is the issue?
There should be the ability to add ids
What steps are required to reproduce the issue?
Create a summary list component
Is there anything else you think would be useful in recreating the issue?
The text was updated successfully, but these errors were encountered: