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

"Skip to content" link component #2151

Open
GCHQ-Developer-847 opened this issue Jul 12, 2024 · 4 comments · May be fixed by #3101
Open

"Skip to content" link component #2151

GCHQ-Developer-847 opened this issue Jul 12, 2024 · 4 comments · May be fixed by #3101
Assignees
Labels
a11y This addresses accessibility needs and/or concerns
Milestone

Comments

@GCHQ-Developer-847
Copy link
Contributor

GCHQ-Developer-847 commented Jul 12, 2024

Summary

A "skip to content" link provides the user with a method to gain direct access to the primary content on a page, bypassing content which is repeated across multiple pages, such as the website's navigation links.

💬 Description

One example of this kind of functionality is the one which is currently on the ICDS website, which becomes visible when focussed. The user can tab to this link and press Enter, and their focus will be moved to the main content on the page.

This ticket is to create a new ICDS component for this kind of link.

The aim with this component is to enable developers to cater for the WCAG success criterion 2.4.1 in their apps. The "skip to content" link technique is a solution to this requirement which is recommended by W3C.

💰 User value

"Skip to content" links allow users who navigate sequentially through web pages (such as a screen reader user or someone who is navigating using the keyboard) to access the main content on a page more quickly and easily.

Providing this as a new component will help to encourage and facilitate developers to implement this kind of functionality in their apps and therefore help with the accessibility of these apps.

📚 User Stories

As a user who navigates using a keyboard or screen reader
I need a way to access the main content on a page quickly and easily
So that I can start to utilise the app's functionality sooner, such as finding information I am looking for.

📝 Acceptance Criteria

Given that I move my focus to the "skip to content" link
When I press Enter
Then my focus moves to the link's target element.

Given that I move my focus to the "skip to content" link
And I have a screen reader enabled
When I press Enter
Then the screen reader's virtual cursor moves to the link's target element.

✏ Designs

...

🧾 Guidance

...

Additional info

It might be useful to look at the solution for mi6/ic-design-system#616 to help with the virtual cursor behaviour.

@GCHQ-Developer-847 GCHQ-Developer-847 added the a11y This addresses accessibility needs and/or concerns label Jul 12, 2024
@GCHQ-Developer-847
Copy link
Contributor Author

GCHQ-Developer-847 commented Jul 12, 2024

I have created this ticket with some of the basic information I thought it would be useful to start with. To be updated by a designer once the design process begins.


Just a few things which I think are worth considering when this is being designed:

  • Should we just use the same look and feel as we use with the existing "skip to content" link on the ICDS website?
    • Another option I have seen used is to style it like the back to top component.
    • ^ This is understandable because the behaviour is kind of similar, as it moving the user's focus to somewhere else on the page. But in some ways it is different, e.g. the back to top component does not only become visible when focussed.
    • The ICDS website uses an ic-link. Would this be better so that it is easier (i.e. require less styling) for developers to add another "skip to content" link on a page (taking the user to different content, e.g. the "skip to page content" link on the ICDS Components page) which has a similar look and feel?
  • Related to the point mentioned above, should there be a variant (perhaps in a similar vein to the inline tabs variant) with no padding which makes it easier to use for other "skip to content" links on the page?
  • Should we give developers the option to make the link always visible? Some may want this; in fact, W3C describe it as preferable (although having it visible only when focussed is acceptable). But I guess they could probably just an IcLink instead.
  • Will this component fit well in different app layouts? Probably will generally be fine if it only appears when focussed.

@MI6-255 MI6-255 added this to the PI 10 V3 milestone Aug 28, 2024
@MI6-255 MI6-255 moved this from In Refinement to Design to-do in Intelligence Community Design System Oct 17, 2024
@MI6-255
Copy link
Contributor

MI6-255 commented Oct 17, 2024

Designer needs this in Figma first

@MI6-255 MI6-255 moved this from Design to-do to Ready for dev in Intelligence Community Design System Jan 22, 2025
@GCHQ-Developer-741 GCHQ-Developer-741 self-assigned this Jan 23, 2025
@GCHQ-Developer-741 GCHQ-Developer-741 moved this from Ready for dev to Dev In Progress in Intelligence Community Design System Jan 23, 2025
@GCHQ-Developer-741 GCHQ-Developer-741 linked a pull request Jan 28, 2025 that will close this issue
26 tasks
@GCHQ-Developer-741 GCHQ-Developer-741 moved this from Dev In Progress to In Review in Intelligence Community Design System Jan 28, 2025
@MI6-255 MI6-255 modified the milestones: PI 10 V3, PI 11 V3 Jan 28, 2025
@GCHQ-Developer-741 GCHQ-Developer-741 linked a pull request Jan 30, 2025 that will close this issue
26 tasks
@MI6-255
Copy link
Contributor

MI6-255 commented Feb 5, 2025

Do not release until guidance is in

@MI6-255
Copy link
Contributor

MI6-255 commented Feb 19, 2025

Test on our v3 site

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y This addresses accessibility needs and/or concerns
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

3 participants