-
Notifications
You must be signed in to change notification settings - Fork 166
LG-7817 Ensure that screen reader follows search page hierarchy #7459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2e1d735
5c17ab6
de5c2f5
4a53fc8
4f7fe44
2fb5558
98fdf24
9c2d88f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
|
@@ -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); | ||
|
|
@@ -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} /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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} | ||
svalexander marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <BackButton onClick={toPreviousStep} /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I said in slack, the screenreader read "back" twice because it read "back" for both the arrow "<" and the word "back"
I fixed this glitch by adding
aria-hidden="true"to the arrow "<". Documentation notes thataria-hiddenis a way to fix duplicated content.