Update attachment link accessibility guidance #4278
+7
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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).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.