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

Fix GOV.UK logo not being exposed consistently with VoiceOver/Safari #4497

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

querkmachine
Copy link
Member

@querkmachine querkmachine commented Nov 24, 2023

In testing the new lockup in various accessibility tools, I found that VoiceOver on macOS does not expose the SVG's title element in the Web Rotor's list of links, although it will announce it audibly when the link or graphic is focused.

Additionally, VoiceOver on iOS only announced the 'GOV.UK' text if the logo graphic was by itself. It omitted it if there was other text (such as a product name) within the same link.

Adding an aria-label to the SVG seems to rectify both of these issues. It doesn't appear to have side effects in any other screen readers that I tested or when VO announces the link or graphic audibly.

Comparison

Taking screenshots of VoiceOver's GUI isn't easy in macOS, so here's a table of how the link is exposed by VoiceOver in Safari 17.1 on macOS 13.6.

Example (OS) Announcement - Before Announcement - After Web Rotor text - Before Web Rotor text - After
Logo only (macOS) link, image, gov dot U K link, image, gov dot U K / GOV.UK
Logo with product name (macOS) link, gov dot U K Product Name link, gov dot U K Product Name Product Name GOV.UK Product Name
Logo only (iOS) gov dot U K, link, image gov dot U K, link, image
Logo with product name (iOS) Product Name, link gov dot U K Product Name, link

VoiceOver on macOS does not expose the GOV.UK `title` element in the Web Rotor's list of links, although it will announce it
audibly when the link or graphic is focused.

Adding an `aria-label` to the SVG ensures that VO has text it can use for the Rotor.
@querkmachine querkmachine requested a review from a team November 24, 2023 14:53
@querkmachine querkmachine self-assigned this Nov 24, 2023
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4497 November 24, 2023 14:53 Inactive
Copy link

📋 Stats

File sizes

File Size
dist/govuk-frontend-5.0.0-beta.2.min.css 113.65 KiB
dist/govuk-frontend-5.0.0-beta.2.min.js 38.28 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 77.78 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 73.09 KiB
packages/govuk-frontend/dist/govuk/all.mjs 3.86 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.64 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 38.27 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.38 KiB

Modules

File Size
all.mjs 69.41 KiB
components/accordion/accordion.mjs 21.67 KiB
components/button/button.mjs 4.7 KiB
components/character-count/character-count.mjs 21.24 KiB
components/checkboxes/checkboxes.mjs 5.83 KiB
components/error-summary/error-summary.mjs 6.09 KiB
components/exit-this-page/exit-this-page.mjs 16.08 KiB
components/header/header.mjs 3.9 KiB
components/notification-banner/notification-banner.mjs 4.54 KiB
components/radios/radios.mjs 4.83 KiB
components/skip-link/skip-link.mjs 3.81 KiB
components/tabs/tabs.mjs 9.66 KiB

View stats and visualisations on the review app


Action run for 70be4b7

@querkmachine querkmachine marked this pull request as ready for review November 24, 2023 15:00
@querkmachine querkmachine merged commit e05aa97 into main Nov 24, 2023
46 checks passed
@querkmachine querkmachine deleted the transition-crown-v5 branch November 24, 2023 15:11
frankieroberto added a commit to x-govuk/govuk-components that referenced this pull request Nov 28, 2023
From the a PR on `govuk-frontend`:

> In testing the new lockup in various accessibility tools, I found that VoiceOver on macOS does not expose the SVG's title element in the Web Rotor's list of links, although it will announce it audibly when the link or graphic is focused.
>
> Additionally, VoiceOver on iOS only announced the 'GOV.UK' text if the logo graphic was by itself. It omitted it if there was other text (such as a product name) within the same link.
>
> Adding an aria-label to the SVG seems to rectify both of these issues. It doesn't appear to have side effects in any other screen readers that I tested or when VO announces the link or graphic audibly.

alphagov/govuk-frontend#4497
frankieroberto added a commit to x-govuk/govuk-components that referenced this pull request Nov 28, 2023
From the a PR on `govuk-frontend`:

> In testing the new lockup in various accessibility tools, I found that VoiceOver on macOS does not expose the SVG's title element in the Web Rotor's list of links, although it will announce it audibly when the link or graphic is focused.
>
> Additionally, VoiceOver on iOS only announced the 'GOV.UK' text if the logo graphic was by itself. It omitted it if there was other text (such as a product name) within the same link.
>
> Adding an aria-label to the SVG seems to rectify both of these issues. It doesn't appear to have side effects in any other screen readers that I tested or when VO announces the link or graphic audibly.

alphagov/govuk-frontend#4497
@romaricpascal romaricpascal mentioned this pull request Nov 28, 2023
owenatgov pushed a commit that referenced this pull request Jan 11, 2024
Fix GOV.UK logo not being exposed consistently with VoiceOver/Safari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants