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

WCAG 2.2: Images ‖ Focus Appearance / Focus Visible #3846

Closed
1 of 2 tasks
Tracked by #3946
querkmachine opened this issue Jun 23, 2023 · 0 comments · Fixed by #3819
Closed
1 of 2 tasks
Tracked by #3946

WCAG 2.2: Images ‖ Focus Appearance / Focus Visible #3846

querkmachine opened this issue Jun 23, 2023 · 0 comments · Fixed by #3819
Assignees
Labels
accessibility images WCAG 2.2 All items related to WCAG 2.2 update activities

Comments

@querkmachine
Copy link
Member

querkmachine commented Jun 23, 2023

What

The current focus style, when used on linked images, is only visible on the bottom edge of the link.

Resources

Why

The new WCAG 2.2 Level AAA criterion 'Focus Appearance' says:

When the keyboard focus indicator is visible, an area of the focus indicator meets all the following:

  • is at least as large as the area of a 2 CSS pixel thick perimeter of the unfocused component or sub-component, and
  • has a contrast ratio of at least 3:1 between the same pixels in the focused and unfocused states.

As the current focus style does not form a 2 pixel perimeter around and does not visually enclose the linked image, it fails to meet this criterion.

'Focus Visible', a Level AA criterion that exists in WCAG 2.1 and is currently included in WCAG 2.2 largely unchanged, says:

Any keyboard operable user interface has a mode of operation where the keyboard focus indicator is visible.

As our existing focus styles are created using box-shadows—which render outside of the element's bounding box—and are only visible below the linked image, the focus style is not visible to a user in situations where the image is at the bottom of the viewport, such as if the user has been automatically scrolled to that position when navigating through content with the keyboard.

In this situation, our current focus style could be argued to fail this criterion.

Who needs to work on this

  • Developers

Who needs to review this

  • Accessibility specialist
  • Designer
  • Developers

Done when

  • Alternative focus styles for linked images have been investigated
  • Next steps have been agreed
@querkmachine querkmachine added accessibility images WCAG 2.2 All items related to WCAG 2.2 update activities labels Jun 23, 2023
@querkmachine querkmachine linked a pull request Jun 23, 2023 that will close this issue
@querkmachine querkmachine self-assigned this Jun 26, 2023
@querkmachine querkmachine moved this from Backlog 🗄 to Needs review 🔍 in GOV.UK Design System cycle board Jun 27, 2023
@querkmachine querkmachine moved this from Needs review 🔍 to Ready to release 🚀 in GOV.UK Design System cycle board Jul 14, 2023
@36degrees 36degrees moved this from Ready to release 🚀 to Done 🏁 in GOV.UK Design System cycle board Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility images WCAG 2.2 All items related to WCAG 2.2 update activities
Projects
Development

Successfully merging a pull request may close this issue.

1 participant