ministryofjustice / moj-frontend

Use the MoJ Design System to design, build, and deliver accessible and consistent services.
https://design-patterns.service.justice.gov.uk/
MIT License
31 stars 18 forks source link

Review MOJ Pattern Library against WCAG 2.2 criteria #519

Closed gregtyler closed 8 months ago

gregtyler commented 11 months ago

Summary

Now that WCAG 2.2 is published, we need to review the components and patterns of the Pattern Library—and the documentation site itself—against the new criteria. We should then fix any issues we find, or offer additional guidance if we identify implementation risks.

New criteria in WCAG 2.2

Based on w3.org

gregtyler commented 11 months ago

Components

2.4.11 and 2.4.12 Focus Not Obscured

Layout With pop-out expanded (obscured link has focus)
image image

2.4.13 Focus Appearance

2.5.7 Dragging Movements

2.5.8 Target Size

3.2.6 Consistent Help

3.3.7 Redundant Entry

3.3.8 Accessible Authentication

gregtyler commented 11 months ago

The Pattern Library site

Reviewing custom components and our implementation of shared GDS and MOJ components

2.4.11 and 2.4.12 Focus Not Obscured

Current problem (focussed tag partially obscured under float but could be fully) With block example link
image image

2.4.13 Focus Appearance

2.5.7 Dragging Movements

2.5.8 Target Size

3.2.6 Consistent Help

3.3.7 Redundant Entry

3.3.8 Accessible Authentication

gregtyler commented 11 months ago

My suggestions

gregtyler commented 11 months ago

We discussed the Primary navigation search toggle today, and queried whether the proposed solution would be a backwards step for usability if users didn't expect the auto-closing behaviour. An alternative suggestion was to add an explicit close button, so that users are aware that it is open and closable.

We specifically discussed the WCAG wording around user-opened content:

Content opened by the user may obscure the component receiving focus. If the user can reveal the focused component without advancing the keyboard focus, the component with focus is not considered hidden due to author-created content.

This may be somewhat answered a mitigation suggestion that aligns with our original proposal:

When focus leaves the additional content, the additional content is hidden or collapsed. This is very similar to patterns discussed previously under Non-persistent opened information. A distinguishing factor can be that the user's last point of interaction in the disclosure is preserved (it persists) even though it may be hidden until a user returns. Some trees and left navigation patterns behave this way.

For now, I'll prototype a version that auto-closes for testing and wider feedback. We can specifically inspect the usability concerns and try another approach if they prove to be a blocker.

gregtyler commented 8 months ago

Fixed in 2.1.0 (via #545)