-
Notifications
You must be signed in to change notification settings - Fork 69
feat(web): add "Skip to content" link #2337
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Based on the PF/SkipToContent and intended to provide navigational aid for keyboard and screen reader users to skip navigation links and other focusable elements preceding the main content. It also helps to conform to success criterion 2.4.1: Bypass Blocks, > A mechanism is available to bypass blocks of content that are repeated > on multiple webpages. See - https://www.w3.org/WAI/WCAG22/quickref/?versions=2.1&showtechniques=241#bypass-blocks - https://webaim.org/projects/screenreadersurvey9/#skip - https://www.w3.org/WAI/test-evaluate/easy-checks/skip-link/
Avoids using the same name as the underlying PF component to reduce ambiguity for developers.
In an attempt to make it highly visible as stated at https://www.w3.org/WAI/test-evaluate/easy-checks/skip-link/ > Ideally the skip navigation link should be visible as the first link > on the page. However, some designers like to hide it from view until it > receives keyboard focus. **This is acceptable as long as it becomes highly > visible on focus**.
When they are in a :focus-visible state
Because there are pages, such Log in, that might not need it.
Since there is actually nothing to skip there.
Renamed the component to make it more agnostic. While it defaults to "skip to content," it can be configured to skip to navigation or other sections as needed.
imobachgs
approved these changes
May 7, 2025
Merged
imobachgs
added a commit
that referenced
this pull request
May 26, 2025
Prepare to release Agama 15: * #2258 * #2270 * #2277 * #2279 * #2283 * #2284 * #2285 * #2286 * #2287 * #2288 * #2291 * #2292 * #2293 * #2295 * #2297 * #2299 * #2300 * #2301 * #2302 * #2303 * #2305 * #2306 * #2307 * #2308 * #2309 * #2313 * #2314 * #2315 * #2317 * #2318 * #2319 * #2320 * #2321 * #2322 * #2323 * #2324 * #2325 * #2328 * #2329 * #2330 * #2331 * #2335 * #2336 * #2337 * #2338 * #2339 * #2340 * #2342 * #2345 * #2346 * #2348 * #2349 * #2350 * #2351 * #2352 * #2353 * #2354 * #2355 * #2357 * #2358 * #2359 * #2360 * #2361 * #2362 * #2363 * #2364 * #2365 * #2366 * #2368 * #2369 * #2370 * #2371 * #2372 * #2374 * #2377 * #2378 * #2379 * #2380 * #2381 * #2382 * #2384 * #2385 * #2386 * #2388 * #2389 * #2390 * #2391 * #2392 * #2394 * #2397 * #2398 * #2401 * #2403
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
There is no a way in the Agama web interface for keyboard users easily bypass repeated content (navigation links and other focusable elements) as the WCAG criterion 2.4.1 Bypass Blocks states.
Solution
To add an skip link as a first focusable element, relying on PF/SkipToContent component. Apart of addressing mentioned issue, it should mitigate #1521
Testing
Screenshots
How link looks when hit via TAB. Using the Waterwhole color from https://brand.suse.com/design-language#color on purpose to accomplish the "This is acceptable as long as it becomes highly visible on focus." part of https://www.w3.org/WAI/test-evaluate/easy-checks/skip-link/
Future work
Component is ready for adding a "Skip to main navigation" link or whatever other needed skip link. However, it is not part of this PR because it needs more work for rendering it only when the navigation is visible.
It's still necessary to evaluate whether it's better to move focus, upon navigation, to the first focusable element within #main-content, or possibly to the first focusable form element on the new page. However, it could be problematic, as screen reader users might miss the surrounding context, requiring them to navigate back or to the top of the page for clarity. So, let keep postponing such a decision until having more knowledge from an accessibility perspective, to avoid introducing behaviors that may be difficult to reverse later without triggering a wave of complaints.
Relevant resources