Closed ShanayaKR closed 1 year ago
Dear @ShanayaKR Many thanks for your comments.
Apologies @maheshmuralip , I have just had confirmation that the fix is actually to remove the "role='header'" attribute, rather than add in the aria-level attribute. This is because my fix above would essentially create nested h3s which is not accessible either. So the actual fix would be:
<h3 class="nhsuk-care-card__heading">
<span>
<span class="nhsuk-u-visually-hidden">Warning advice: </span>
<span class="nhsuk-care-card__heading-text">This is the heading text for a card<br></span>
</span>
</h3>
Thanks @ShanayaKR
@ShanayaKR A fix is added in the new version of NHS Blocks plugin 1.3.9. Thanks
*See below comment, as this solution is wrong
Describe the bug Apologies I wasn't sure if this should go in the nhs-blocks github, or this one.
Our Trust uses the Nightingale theme for our website, and we were recently audited for accessibility by the government. They raised one issue with the care card headings. Within the h3 (see code below) the span with the role="heading" was flagged as needing an aria-level attribute in order to meet accessibility standards.
To Reproduce This is the current HTML for a yellow/warning care card:
Expected behavior This is what I believe to be the correct HTML:
(aria-level="3" was added to line 2)
Additional context We have fixed this within our child theme using JavaScript to insert the attributes. Let me know if you want this code, but I imagine you won't need it as you can just add it directly into the block itself.
Though we have fixed several accessibility issues within our child theme, you may find it interesting to note that our website only received 2 issues when audited for accessibility, and only one of these was in the theme (the other was from the Care Opinion widget on our homepage).