Skip to content

Commit 9443698

Browse files
authored
Merge pull request #22 from harryhmc/logo-aria-fix
Set ARIA role to img for NHSLogo and OrganisationLogo components
2 parents a6e3fba + b0143ff commit 9443698

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/header/components/NHSLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const NHSLogo: React.FC<HTMLProps<HTMLAnchorElement>> = ({ className, alt, ...re
2121
<svg
2222
className="nhsuk-logo"
2323
xmlns="http://www.w3.org/2000/svg"
24-
role="presentation"
24+
role="img"
2525
focusable="false"
2626
viewBox="0 0 40 16"
2727
aria-labelledby="nhsuk-logo_title"

src/components/header/components/OrganisationalLogo.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ const OrganisationalLogo: React.FC<OrganisationalLogoProps> = ({ logoUrl, alt, .
1717
<svg
1818
className="nhsuk-logo"
1919
xmlns="http://www.w3.org/2000/svg"
20-
role="presentation"
20+
role="img"
2121
focusable="false"
2222
viewBox="0 0 40 16"
23+
aria-labelledby="nhsuk-logo_title"
2324
>
25+
<title id="nhsuk-logo_title">{alt}</title>
2426
<path className="nhsuk-logo__background" d="M0 0h40v16H0z"></path>
2527
<path
2628
className="nhsuk-logo__text"

0 commit comments

Comments
 (0)