Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import LocationCollection from './location-collection';
import LocationCollectionItem from './location-collection-item';
import AnalyticsContext from '../context/analytics';
import AddressSearch from './address-search';
import InPersonContext from '../context/in-person';

interface PostOffice {
address: string;
Expand Down Expand Up @@ -88,7 +87,6 @@ function InPersonLocationPostOfficeSearchStep({ onChange, toPreviousStep, regist
const [autoSubmit, setAutoSubmit] = useState(false);
const [isLoadingComplete, setIsLoadingComplete] = useState(false);
const { setSubmitEventMetadata } = useContext(AnalyticsContext);
const { arcgisSearchEnabled } = useContext(InPersonContext);

// ref allows us to avoid a memory leak
const mountedRef = useRef(false);
Expand Down Expand Up @@ -201,12 +199,14 @@ function InPersonLocationPostOfficeSearchStep({ onChange, toPreviousStep, regist
return (
<>
<PageHeading>{t('in_person_proofing.headings.location')}</PageHeading>
{arcgisSearchEnabled && (
<div aria-live="polite">
<AddressSearch onAddressFound={handleFoundAddress} registerField={registerField} />

@svalexander svalexander Dec 9, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is really a thought for design - but wondering if the search field should clear the user's input after clicking the search button. And if the "no matches found" text has enough prominence on the page. Right a user see's the address they input 2x on the page and it's hard to notice the "no match" text.

@svalexander svalexander Dec 9, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait, is the 2nd address shown on the page the one that was actually used by the search function?/ the closest match to the input? that's unclear. I'll add these thoughts in slack so design can comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crossing out the portions that are likely not applicable since the 2nd address is for debugging

)}
<p>{t('in_person_proofing.body.location.location_step_about')}</p>
{locationsContent}
<BackButton onClick={toPreviousStep} />
</div>
<div role="status">
<p>{t('in_person_proofing.body.location.location_step_about')}</p>
{locationsContent}
Comment thread
svalexander marked this conversation as resolved.
<BackButton onClick={toPreviousStep} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another thing happening with the screen reader...it's currently reading the text that appears alongside the search button after it reads out "back"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if that address is removed then this screen reader issue should be ignored.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've been trying to test this page but voiceover +chrome are acting up (constantly freezing and not auto reading the page) So I'm not 100% sure if it's just a chrome issue or if removing the "<" would fix the double reading of back (since the 2 pieces of text are separate).

</div>
</>
);
}
Expand Down