Skip to main content
All CollectionsScanning
Configure Source Code Exclusions on a Scan
Configure Source Code Exclusions on a Scan

How to set up source code snippets to omit from scans

Updated over a week ago

This article gives instructions for advanced users on how to configure a source code exclude for a website scan.

Article Navigation


Introduction

The Source Code Exclude feature allows users to configure custom exclusions to website scans. The exclusions target particular elements and stop the contents from being flagged as issues.

Add exclusions to accessibility, readability, and misspelling checks on a customer level and then apply them to specific domains.


Add a Source Code Exclusion to the Accessibility Module

This section gives instructions on how to add a source code exclusion to the module on a customer level and then apply it to a domain.

  1. Click Admin Settings (gear icon) on the top menu bar of any page in Monsido. The Domain Settings page opens.

    Note: The Admin Settings button is only available to site admins.

    The location of the Admin Settings button on the top menu bar, in line with the Monsido Home button.
  2. Select Source Code Excludes from the menu on the left side of the page.

    The location of the Source Code Excludes option, on the left menu under the domain name.

    The Source Code Excludes page opens.

  3. Click Add Source Code Exclude.

    The location of the Add Source Code Exclude button, in line with the page header, on the top right side of the page..

    The Source Code Excludes page opens.

  4. Click to select Accessibility.

    The location of the Accessibility option on the Source Code Exclude creation page. It is the first option.
  5. The Source Code Exclude details page opens.

    The Source Code Exclude details page. The fields are described in text below.
  6. Short Description (required): Click in the text field and type in a short description for this excluded snippet.

  7. Default for CMS: Click in the field and identify the CMS from the drop-down menu, if applicable.

    Note: If a CMS is selected here and a domain with the same selected CMS exists on the account, the domain will automatically have the source code exclude applied to it.

    Note: If you use a CMS and it is not present in the list, contact Monsido Support to see if it can be added.

  8. Type (required): Click in the field and select the exclusion type from the drop-down menu.

    • Exact: Identifies and filters out all instances where the complete and exact HTML snippet appears. For example, the snippet https:/ /www. example. com/ is an exact match for:

      • https:/ /www. example. com/

      While these HTML snippets are NOT a match:

      • https:/ /www. example. com

      • http:/ /www. example. com/

      • https:/ /example. com/

      • https:/ /example. com/?something=1

      • https:/ /example. com/#something=1

    • Regex: Identifies and filters out specific patterns of HTML through the use of regular expressions.

    • Contains: Identifies and filters out all snippets that contain the HTML values entered. For example, the snippet example.com is a match for these HTML values:

      • https:/ /www. example. com/

      • https:/ /www. example. com

      • http:/ /www. example. com/

      • https:/ /example. com/

      • https:/ /example. com/?query=1

      • https:/ /example. com/subpage

      • https:/ /example. com/subpage/product_page

  9. Value (required): Click in the text input field and type or paste in the HTML snippet to be excluded.

  10. Identify specific HTML snippets for the filter and enter them into the value field.

  11. See the section Locate HTML snippets to use in a Source Code Exclude for instructions on how to find the snippets.

Note: The Source Code Exclude is now stored on an account level but not applied to any domains. See the steps HERE to apply the Source Code Exclude to a domain.


Add a Source Code Exclusion to the Readability module

This section gives instructions on how to exclude a segment of the webpage from the spellcheck.

  1. Click Admin Settings (gear icon) on the top menu bar of any page in Monsido. The Domain Settings page opens.

    Note: The Admin Settings button is only available to site admins.

    The location of the Admin Settings button on the top menu bar, in line with the Monsido Home button.
  2. Select Source Code Excludes from the menu on the left side of the page.

    The location of the Source Code Excludes option, on the left menu under the domain name.

    The Source Code Excludes page opens.

  3. Click Add Source Code Exclude.

    The location of the Add Source Code Exclude button, in line with the page header, on the top right side of the page..

    The Source Code Exclude page opens.

  4. Click Readability.

    The location of the Readability button on the Source Code Exclude page. It is the third option.

    The Source Code Exclude details page opens.

    The Source Code Exclude details page. The fields are described in text below.
  5. Description (required): Click in the text field and type in a short description for the excluded snippet.

  6. Default for CMS: Click in the field and select the CMS from the drop-down menu, or select None if there is no CMS. If your CMS is not on the list, contact Monsido Support to see if it can be added.

  7. CSS Target Selector (required): Click in the field and select an existing CSS selector pattern from the drop-down menu, or click + to add a new one.

    The scan identifies elements that match the entered CSS selector patterns and omits them from the results.

    Note: There is no limit to the number of CSS Target Selectors that you can add.

    For more information, see the user guide article:

  8. Click Save to save the source code exclusion. The Details page closes and the Source Code Excludes list page is visible. The new source code exclusion is on the list.

  9. Add the updated script to the website HTML code.

Note: The Source Code Exclude is now stored on an account level but not applied to any domains. See the steps HERE to apply the Source Code Exclude to a domain.

For more information, see the user guide articles:


Add Source Code Exclusion to the Spellcheck Module

This section gives instructions on how to exclude a segment of the webpage from the spellcheck.

  1. Click Admin Settings (gear icon) on the top menu bar of any page in Monsido. The Domain Settings page opens.

    Note: The Admin Settings button is only available to site admins.

    The location of the Admin Settings button on the top menu bar, in line with the Monsido Home button.
  2. Select Source Code Excludes from the menu on the left side of the page.

    The location of the Source Code Excludes option, on the left menu under the domain name.

    The Source Code Excludes page opens.

  3. Click Add Source Code Exclude.

    The location of the Add Source Code Exclude button, in line with the page header, on the top right side of the page..

    The Source Code Exclude page opens.

  4. Click Misspellings.

  5. The Source Code Exclude details page opens.

    The Source Code Exclude details page. The fields are described in text below.
  6. Description (required): Click in the text field and type in a short description for the excluded snippet.

  7. Default for CMS: Click in the field and select the CMS from the drop-down menu, or select None if there is no CMS. If your CMS is not on the list, contact Monsido Support to see if it can be added.

  8. CSS Target Selector (required): Click in the field and select an existing CSS selector pattern from the drop-down menu, or click + to add a new one.

    Once added, subsequent scans identify elements that match the entered CSS selector patterns and omits them from the results.

    Note: There is no limit on the number of CSS Target Selectors that can be added.

    For more information, see the user guide article:

  9. Click Save to save the source code exclusion. The Details page closes and the Source Code Excludes list page is visible. The new source code exclusion is on the list.

Note: The Source Code Exclude is now stored on an account level but not applied to any domains. See the steps HERE to apply the source code exclusion to a domain.

For more information, see the user guide articles:


Apply the Source Code Exclusion to a Domain

This section gives instructions on how to apply a source code exclusion to a domain.

  1. Click Admin Settings (gear icon) on the top menu bar of any page in Monsido. The Domain Settings page opens.

    Note: The Admin Settings button is only available to site admins.

    The location of the Admin Settings button on the top menu bar, in line with the Monsido Home button.
  2. Click Action on the same row as the domain to scan.

    The location of the Action button on the same row as a domain, in the Actions column.
  3. Select Edit Domain from the drop-down list.

    Image of the location of the Edit Domain option in the Actions menu.

    The Edit Domain pane opens.

    The Edit Domain pane, for this action click the Features tab at the top of the pane or scroll down the page to the Features section.
  4. Locate the Features section.

  5. In the Source Code Excludes field: Click the drop-down arrow and select the domain that contains the source code.

  6. Click Save at the bottom of the page.


Locate HTML snippets to use in a Source Code Exclusion

This section gives instructions on how to locate HTML snippets that can be used to set up a source code exclusion.


Locate snippets in FastTrack:

HTML snippets that affect the website compliance level can be found in FastTrack, along with a list of the checks the snippets are flagged for.

How to find HTML snippets that affect website compliance levels:

  1. Click the domain URL on the domain list, on the left side of the Monsido landing page. The domain dashboard opens.

  2. Click Accessibility (icon of a person standing with arms outstretched) on the menu bar at the top of the domain dashboard. The Accessibility page opens.

    The location of the Accessibility button on the page menu bar.
  3. Click Fast Track, from the menu on the left side of the page.

    The location of the Fast Track button on the left menu bar of the Accessibility page.

    The Accessibility Fast Track pane opens.

    Image of the list of the checks that flagged the snippets for further attention.
  4. Locate and copy the HTML snippets to include and paste them into the form for Source Code Excludes.


Locate snippets in Accessibility Page Details:

  1. From the PageDetails section for any page within Monsido, click Accessibility (icon of a human with outstretched arms) on the top menu bar.

    The location of the Accessibility button on the page menu bar.
  2. Snippets with potential errors are listed on the right side panel of the page.

    Image of the full page with the side panel that gives the snippet information.
  3. Copy the HTML snippets to include and paste them into the form for Source Code Excludes.

For more information, see the user guide article:


Additional Resources

For more information, see the user guide articles:

See Monsido for Developers for documentation containing advanced help for developers.

For definitions and explanations of acronyms and abbreviations used in the Monsido User Guide, see:

For further assistance, contact the Monsido support team at support@monsido.com or use the Monsido chat and help features inside the application.

Image of the toolbar with the Help Center buttons highlighted.

Did this answer your question?