Configuring custom skip links
Help users who rely on screen readers to bypass irrelevant content by configuring custom skip links. Skip links provide users with tools to navigate to the most important parts of the application, and represent one of the most basic accessibility requirements.
For example, a skip link can direct the user straight to the navigation menu, so that the user does not have to tab through the page to reach it.
Pega Platform includes a default pySkipLinksToTarget section that is added automatically to your application. The section includes skip links to the main content, the search bar, and the navigation pane, and you do not need to configure it.
You can expand the default skip link section by configuring custom skip links and saving the section in the application ruleset.
Note the following accessibility best practices:
- Use no more than five skip links. Three is the recommended maximum.
- Ensure that the links are the first tab on a given page.
- Ensure that the links have visible focus and support Tab key navigation.
- Ensure that the links are visible to all users who use the Tab key for navigation.
- In the header of Dev Studio, click .
- On the New tab, define the text file record
configuration and context, and then click Create and
open.The file extension for text files that hold JavaScript code is js.
- In the text field, enter the skip link code.
- In the upper right corner of the form, click Save.
- Search for and open the harness to which you want to add the skip link section.
- On the Scripts & styles tab, in the Scripts section, click the Add a row icon.
- In the Type field of the new row, select js.
- In the Name field, select the text file with the skip link code.
- Click Save.
- Open the pySkipLinksToTarget section.
- From the Action list, add a Link control to the section.
- Select the new link, and then click the View properties icon.
- In the Cell properties window, on the
General and Presentation tabs,
define the look and behavior of the link.For more information, see Configuring common control settings.
- On the Actions tab, create a new action set:
- Click Create an action set.
- Click .
- Click .
- In the Function name field, enter the name of the function that you want to assign to the link.
- Define the contentType parameter for the area.
- Click Submit.
- On the section form, click Save as.
- In the Apply to field, select a class in your
application ruleset, and then click Create and
open.
- On the section form, click Save.
Creating a text file that holds the JavaScript code for the skip link
Adding the script to the harness
Adding the link to the default skip link section
Configuring the custom skip link
Saving the pySkipLinksToTarget section to the application ruleset