ONSdigital / design-system

ONS Design System
https://service-manual.ons.gov.uk/design-system
MIT License
31 stars 20 forks source link

[Bug]: Link in pattern address example incorrect #3178

Closed alessioventuriniAND closed 4 months ago

alessioventuriniAND commented 4 months ago

What happened?

The link within the below example leads to an incorrect/non-existent page.

https://service-manual.ons.gov.uk/design-system/patterns/addresses/example-address-input-non-editable

To fix this we need to replace the current parameter as below :

<form action="#0">
    {{ onsAddressInput({
        "id": "address-input-non-editable",
        "dontWrap": true,
        "label": {
            "text": "Enter address or postcode and select from results",
            "id": "address-label-input-non-editable"
        },
        "isEditable": false,
        "mandatory": true,
        "externalInitialiser": true,
        "APIDomain": "#",
        'APIDomainBearerToken': "some_token",
        "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
        "ariaYouHaveSelected": "You have selected",
        "ariaMinChars": "Enter 3 or more characters for suggestions.",
        "ariaOneResult": "There is one suggestion available.",
        "ariaNResults": "There are {n} suggestions available.",
        "ariaLimitedResults": "Results have been limited to 10 suggestions. Type more characters to improve your search",
        "ariaGroupedResults": "There are {n} for {x}",
        "groupCount": "{n} addresses",
        "moreResults": "Enter more of the address to improve results",
        "resultsTitle": "Select an address",
        "resultsTitleId": "address-results",
        "noResults": "No results found. Try entering a different part of the address",
        "tooManyResults": "{n} results found. Enter more of the address to improve results",
        "typeMore": "Enter more of the address to get results",
        "autocomplete": "off",
        "errorTitle": "There is a problem with your answer",
        "errorMessageEnter": "Enter an address",
        "errorMessageSelect": "Select an address",
        "errorMessageAPI": "Sorry, there is a problem. We are working to fix it. Please try again later or",
        "errorMessageAPILinkText": "contact us for more help",
        "errorMessageAPILink": "#0",
        "options": {
            "regionCode": "gb-eng",
            "addressType": "residential"
        },
        "manualLink": "example-address-input-non-editable-register-address", <-- correct path 
        "manualLinkText": "I can’t find my address"
    }) }}
</form>

What was the expected outcome?

To be taken to the below example.

example-address-input-non-editable-register-address.njk

How is this problem impacting your service?

the link show a 404 page.

What list of steps can be followed to reproduce the bug or issue?

Click on the link within the non-editable address input example.

Example

No response

What version of the ONS Design System are you using?

70.0.4

What devices are you seeing the problem on?

Desktop, Mobile, Tablet

Device details

No response

What operating systems are you seeing the problem on?

No response

Operating system details

No response

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge, Microsoft Internet Explorer, Other

Browser details

No response