-
Notifications
You must be signed in to change notification settings - Fork 166
LG-9345 Maintain material consistency in IPP pages #8104
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
e2bef7a
982303c
d9a2ea9
075dfe5
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 |
|---|---|---|
|
|
@@ -112,7 +112,7 @@ function InPersonLocationPostOfficeSearchStep({ onChange, toPreviousStep, regist | |
| address={foundAddress?.address || ''} | ||
| /> | ||
| )} | ||
| <BackButton includeBorder onClick={toPreviousStep} /> | ||
| <BackButton role="link" includeBorder 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. Are we planning to prevent the spacebar from activating these fake links, since a link wouldn't be expected to be activated when pressing Space?
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. Ideally no, and I don't think this alters the functionality of the HTML element, rather just how it is presented to AT. And I could've sworn spacebar still triggered the back button, but maybe I need to test again and in another browser.
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. Ok, so I've tested the functionality of the back buttons in both Safari and Firefox and they respond to both Space and Enter/mouse click events.
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. My expectation is that it wouldn't be activated when hitting Spacebar. It's a small detail, and maybe it ends up being helpful to have both options to activate, but if the idea with this is to make a link behave strictly as a link ought to behave, then I'd expect part of that to restrict interaction to the supported keypresses. In general, I'm become a bit wary of this proposed behavior, but I see the upstream uswds/uswds#4385 has recently been approved, so that train may have already left the station.
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. I mean, your point is taken. What I'm doing here isn't really material honesty either, it's a button that is masquerading as a link, but still works like a button. At least now a screen reader will match what a sighted user might assume from the element's styling. |
||
| </> | ||
| ); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ function InPersonPrepareStep({ toPreviousStep, value }) { | |
| setIsSubmitting(true); | ||
| removeUnloadProtection(); | ||
| await trackEvent('IdV: prepare submitted'); | ||
| window.location.href = (event.target as HTMLAnchorElement).href; | ||
| window.location.href = inPersonURL!; | ||
|
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 like that this is more explicit/easier to read |
||
| } | ||
| }; | ||
|
|
||
|
|
@@ -59,7 +59,7 @@ function InPersonPrepareStep({ toPreviousStep, value }) { | |
| {flowPath === 'hybrid' && <FormStepsButton.Continue />} | ||
| {inPersonURL && flowPath === 'standard' && ( | ||
| <div className="margin-y-5"> | ||
| <SpinnerButton href={inPersonURL} onClick={onContinue} isBig isWide> | ||
| <SpinnerButton onClick={onContinue} isBig isWide> | ||
| {t('forms.buttons.continue')} | ||
| </SpinnerButton> | ||
| </div> | ||
|
|
@@ -78,7 +78,7 @@ function InPersonPrepareStep({ toPreviousStep, value }) { | |
| )} | ||
| </p> | ||
| <InPersonTroubleshootingOptions /> | ||
| <BackButton includeBorder onClick={toPreviousStep} /> | ||
| <BackButton role="link" includeBorder onClick={toPreviousStep} /> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
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.
i feel like this change also makes the code easier to read