Skip to content

Commit

Permalink
fix form nav button imports (#29700)
Browse files Browse the repository at this point in the history
* fix form nav button imports

* fix explainer focus
  • Loading branch information
amponce authored May 13, 2024
1 parent e07413f commit 6d870fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import FormNavButtons from 'platform/forms-system/src/js/components/FormNavButtons';
import FormNavButtons from '@department-of-veterans-affairs/platform-forms-system/FormNavButtons';
import { waitForRenderThenFocus } from '@department-of-veterans-affairs/platform-utilities/ui';
import ReviewPageNavigationAlert from '../alerts/ReviewPageNavigationAlert';

const ResolutionExplainerWidget = ({
Expand Down Expand Up @@ -28,7 +29,10 @@ const ResolutionExplainerWidget = ({
goBack();
}
};

React.useEffect(() => {
// focus on the h3 when the page loads for screen readers
waitForRenderThenFocus('h3');
}, []);
return (
<form
onSubmit={event => {
Expand All @@ -41,9 +45,8 @@ const ResolutionExplainerWidget = ({
close-btn-aria-label="Close notification"
disable-analytics="false"
full-width="false"
show-icon
status="info"
visible="true"
visible
>
<h3 slot="headline">
Next, you’ll be asked to choose a relief option for each debt you
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import FormNavButtons from 'platform/forms-system/src/js/components/FormNavButtons';
import FormNavButtons from '@department-of-veterans-affairs/platform-forms-system/FormNavButtons';
import { waitForRenderThenFocus } from '@department-of-veterans-affairs/platform-utilities/ui';

const ExplainerComponent = ({
headline,
Expand All @@ -11,6 +12,10 @@ const ExplainerComponent = ({
goBack,
goForward,
}) => {
React.useEffect(() => {
// focus on the h3 when the page loads for screen readers
waitForRenderThenFocus('h3');
}, []);
return (
<form>
<fieldset className="vads-u-margin-y--2">
Expand Down

0 comments on commit 6d870fd

Please sign in to comment.