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

Update attachment link accessibility guidance #4278

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jon-kirwan
Copy link
Contributor

@jon-kirwan jon-kirwan commented Oct 3, 2024

What

Update attachment link accessibility guidance

Why

See https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html. The Attachment link component might fail 2.5.8 Target Size (Minimum) if not used in the correct way. The last two examples (with target blank
and with data attributes) show the component used without a containing element such as a paragraph tag or a list item element and the target height is only 20px high (24px is required for the success criterion).

This should be highlighted in the guidance.

Anything else

I explored a few other approaches here.

  • enable the Axe target-size rule, which is not enabled by default. Unfortunately, this doesn’t get flagged as a violation (because there are no intersecting elements in the examples).
  • embedding the final two examples within Govspeak or a paragraph element. However, I find this potentially confusing, as both examples demonstrate usage with data attributes or the target="_blank" attribute. Including extra elements might mislead users into thinking these are necessary for the component to work. Additionally, the component can be implemented in various ways that would still meet the success criteria, such as within a list item.

@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4278 October 3, 2024 13:16 Inactive
@jon-kirwan jon-kirwan linked an issue Oct 3, 2024 that may be closed by this pull request
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.

Attachment link maybe fails 2.5.8 Target Size (Minimum)
2 participants