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

Add role=list to lists to fix VoiceOver not announcing as lists #845

Merged
merged 1 commit into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# NHS.UK frontend Changelog

## 6.1.3 - TBA

:wrench: **Fixes**
- Fix issue with VoiceOver on Safari (iOS and macOS) not announcing a list as a list. This affects some components that have a list with style `list-style-type: none`, ie those that have a class of `nhsuk-list` on the `<ul>`. This fixes the do/don't list and the error summary components. The contents list and pagination components don't seem to be affected.

## 6.1.2 - 8 August 2022

:wrench: **Fixes**
Expand Down
2 changes: 1 addition & 1 deletion packages/components/do-dont-list/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{%- if params.classes %} {{ params.classes }}{% endif %}"
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
<h{{ headingLevel }} class="nhsuk-do-dont-list__label">{{ params.title }}</h{{ headingLevel }}>
<ul class="nhsuk-list {% if params.type == 'tick' %}nhsuk-list--tick{% else %}nhsuk-list--cross{% endif %}">
<ul class="nhsuk-list {% if params.type == 'tick' %}nhsuk-list--tick{% else %}nhsuk-list--cross{% endif %}" role="list">
{%- for data in params.items %}
<li>
{%- if params.type == 'cross' %}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/error-summary/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{ params.descriptionHtml | safe if params.descriptionHtml else params.descriptionText }}
</p>
{% endif -%}
<ul class="nhsuk-list nhsuk-error-summary__list">
<ul class="nhsuk-list nhsuk-error-summary__list" role="list">
{%- for item in params.errorList %}
<li>
{%- if item.href %}
Expand Down