tech-docs-gem icon indicating copy to clipboard operation
tech-docs-gem copied to clipboard

Bug: Anchor links are not keyboard or screen reader accessible

Open andrewhick opened this issue 6 months ago • 0 comments

The link icon which appears next to each heading on hover is not keyboard accessible, or presented to screen reader users.

Options to fix:

  1. Remove the anchor link functionality entirely from the gem - possibly drastic and we don't know how many people currently rely on this functionality.
  2. Develop a configuration option to turn anchor links on or off - probably the most balanced option
  3. Make the anchor links fully keyboard and screen reader accessible - the ideal option, but potentially difficult to implement

We believe this fails WCAG 2.1.1 Keyboard and probably 4.1.2 Name, Role, Value.

For context, this was originally raised as WCAG Primer issue 131 from accessibility testing on the Primer. Within the Primer group, we decided that although the functionality is potentially a useful enhancement for some people, it would be hard to make accessible and the easiest course of action is to remove it if we can. For comparison, GOV.UK does not have this functionality.

A level 1 heading with a link icon along with its code. The link's code includes `aria-hidden="true" and tabindex="-1"

andrewhick avatar May 30 '25 14:05 andrewhick