-
Notifications
You must be signed in to change notification settings - Fork 166
LG-7817 Ensure that screen reader maintains user's place on the page. #7487
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
a9db214
5ddc7fa
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 |
|---|---|---|
|
|
@@ -89,7 +89,6 @@ function InPersonLocationPostOfficeSearchStep({ onChange, toPreviousStep, regist | |
| 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,13 +200,16 @@ function InPersonLocationPostOfficeSearchStep({ onChange, toPreviousStep, regist | |
| return ( | ||
| <> | ||
| <PageHeading>{t('in_person_proofing.headings.po_search.location')}</PageHeading> | ||
| <p>{t('in_person_proofing.body.location.po_search.po_search_about')}</p> | ||
| {arcgisSearchEnabled && ( | ||
| <AddressSearch onAddressFound={handleFoundAddress} registerField={registerField} /> | ||
| )} | ||
| <p>{t('in_person_proofing.body.location.location_step_about')}</p> | ||
| {locationsContent} | ||
| <BackButton onClick={toPreviousStep} /> | ||
| <div aria-live="polite"> | ||
| {arcgisSearchEnabled && ( | ||
| <AddressSearch onAddressFound={handleFoundAddress} registerField={registerField} /> | ||
| )} | ||
| </div> | ||
| <div role="status"> | ||
|
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 would make the region a live region, meaning I'd expect a screen reader to read the entire contents of this region at the first opportunity. Is that expected? Since there's quite a lot of location content, would we want to let the user navigate this themselves, since it's not really a "status" text?
Contributor
Author
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. Yes, that was the screen reader behavior that I expected. I had interpreted these portions of the ticket
and
to mean that the screen reader should read the about text and then the locations text. You’re right that it is a lot of content, and I don’t personally use a screen reader, so I could be missing something. I will check in with product/design about your concerns and then get back to you.
Contributor
Author
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. We already verbally talked about this in a meeting yesterday. However, for posterity’s sake, I wanted to note that I checked in with design/product yesterday and there is a new ticket for the updated screen reader implementation. |
||
| <p>{t('in_person_proofing.body.location.po_search.po_search_about')}</p> | ||
| {locationsContent} | ||
| <BackButton onClick={toPreviousStep} /> | ||
| </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.
Can you explain why we're making this a live region? I'm not sure I follow from the ticket or pull request description how this is related to screen reader hierarchy.
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.
Oh, I see some of the references in the ticket to an earlier Slack thread. In my mind, I might expect there to be some announcement of a change in the page content, but more brief in terms of "Page updated" or "X results found", not announcing all of the new page content as live content.