1"use strict";(globalThis.webpackChunk_atlas_docs_zen=globalThis.webpackChunk_atlas_docs_zen||[]).push([[387],{473(e,s,n){n.r(s),n.d(s,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>l,metadata:()=>a,toc:()=>r});const a=JSON.parse('{"id":"address-lookup/messages","title":"Messages","description":"Address Lookup uses a small default set of messages to communicate specific events to the user. All of Address Lookup\'s default messages can be overridden. They are outlined below:","source":"@site/docs/address-lookup/messages.mdx","sourceDirName":"address-lookup","slug":"/address-lookup/messages","permalink":"/docs/address-lookup/messages","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Messages","sidebar_label":"Messages"},"sidebar":"addressfinder","previous":{"title":"CSS Classes","permalink":"/docs/address-lookup/css-classes"},"next":{"title":"Callbacks","permalink":"/docs/address-lookup/callbacks"}}');var t=n(5723),i=n(4056);const l={title:"Messages",sidebar_label:"Messages"},d=void 0,o={},r=[{value:"Initial Message",id:"initial-message",level:2},{value:"Accessibility (Screen Reader) Message",id:"accessibility-screen-reader-message",level:2},{value:"No Match",id:"no-match",level:2},{value:"No Match Action",id:"no-match-action",level:2},{value:"Unhide Label",id:"unhide-label",level:2},{value:"Fallback Message",id:"fallback-message",level:2}];function c(e){const s={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"Address Lookup uses a small default set of messages to communicate specific events to the user. All of Address Lookup's default messages can be overridden. They are outlined below:"}),"\n",(0,t.jsx)(s.h2,{id:"initial-message",children:"Initial Message"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"msgInitial"})}),"\n",(0,t.jsx)(s.p,{children:"Displays when the Address Lookup is opened and the input field is empty."}),"\n",(0,t.jsxs)(s.p,{children:["Defaults to ",(0,t.jsx)(s.code,{children:'"Start typing to find address"'})]}),"\n",(0,t.jsx)(s.h2,{id:"accessibility-screen-reader-message",children:"Accessibility (Screen Reader) Message"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"msgList"})}),"\n",(0,t.jsx)(s.p,{children:"The aria-label assigned to the address suggestion list. This message will only be picked up by screen readers."}),"\n",(0,t.jsxs)(s.p,{children:["Defaults to ",(0,t.jsx)(s.code,{children:'"Select your address"'})]}),"\n",(0,t.jsx)(s.h2,{id:"no-match",children:"No Match"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"msgNoMatch"})}),"\n",(0,t.jsx)(s.p,{children:"Displays when no suggestions could be found for the query."}),"\n",(0,t.jsxs)(s.p,{children:["Defaults to ",(0,t.jsx)(s.code,{children:'"No matches found"'})]}),"\n",(0,t.jsx)(s.h2,{id:"no-match-action",children:"No Match Action"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"msgNoMatchAction"})}),"\n",(0,t.jsxs)(s.p,{children:["Label for an optional actionable item presented beneath ",(0,t.jsx)(s.code,{children:"msgNoMatch"})," when a search returns no matches. Use it to offer users an out when they cannot find their address, e.g. a jump to manual address entry. The item renders when both a non-empty label and an ",(0,t.jsx)(s.code,{children:"onNoMatchAction"})," callback are provided; selecting it by click or keyboard closes Address Lookup and invokes the callback."]}),"\n",(0,t.jsxs)(s.p,{children:["Defaults to ",(0,t.jsx)(s.code,{children:'""'})," (disabled)"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-javascript",children:'AddressLookup.setup({\n apiKey: "ak_test",\n inputField: "#line_1",\n msgNoMatchAction: "Enter address manually",\n onNoMatchAction: function () {\n // e.g. reveal a manual address entry form\n },\n});\n'})}),"\n",(0,t.jsx)(s.h2,{id:"unhide-label",children:"Unhide Label"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"msgUnhide"})}),"\n",(0,t.jsx)(s.p,{children:"Displayed to the user if Address Fields have been hidden. It is shown as a clickable element to trigger manual address entry."}),"\n",(0,t.jsxs)(s.p,{children:["Defaults to ",(0,t.jsx)(s.code,{children:'"Enter address manually"'})]}),"\n",(0,t.jsx)(s.h2,{id:"fallback-message",children:"Fallback Message"}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.code,{children:"msgFallback"})}),"\n",(0,t.jsx)(s.p,{children:"Shown when Address Lookup is unable to provide suggestions for any reason (e.g. key is not available)."}),"\n",(0,t.jsxs)(s.p,{children:["Defaults to ",(0,t.jsx)(s.code,{children:'"Please enter your address manually"'})]}),"\n",(0,t.jsxs)(s.admonition,{type:"tip",children:[(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Accessibility"})}),(0,t.jsx)(s.p,{children:"Keep in mind these messages are also important for users who rely on the screen-reader. When altering the message be sure that the necessary meaning and intent is understandable to visually impaired users who will be getting audio cues from their screen-reader."})]})]})}function h(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},4056(e,s,n){n.d(s,{R:()=>l,x:()=>d});var a=n(2155);const t={},i=a.createContext(t);function l(e){const s=a.useContext(i);return a.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),a.createElement(i.Provider,{value:s},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.