diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5badbb2..0f7651a 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1013,13 +1013,15 @@
     <!-- Introduction title shown in fingerprint enrollment dialog to locate the sensor [CHAR LIMIT=29] -->
     <string name="security_settings_fingerprint_enroll_find_sensor_title">Touch the sensor</string>
     <!-- Introduction title shown in fingerprint enrollment dialog to locate the sensor [CHAR LIMIT=60] -->
-    <string name="security_settings_udfps_enroll_find_sensor_title">Touch &amp; hold the fingerprint icon</string>
+    <string name="security_settings_udfps_enroll_find_sensor_title">How to set up your fingerprint</string>
     <!-- Message shown in fingerprint enrollment dialog to locate the sensor -->
     <string name="security_settings_fingerprint_enroll_find_sensor_message">It\u2019s on the back of your phone. Use your index finger.</string>
     <!-- Message shown in fingerprint enrollment dialog to locate the sensor [CHAR LIMIT=NONE]-->
-    <string name="security_settings_udfps_enroll_find_sensor_message">The fingerprint sensor is on your screen</string>
+    <string name="security_settings_udfps_enroll_find_sensor_message">The fingerprint sensor is on your screen. You\u2019ll capture your fingerprint on the next screen.</string>
+    <!-- Button for starting fingerprint enrollment. [CHAR LIMIT=10]-->
+    <string name="security_settings_udfps_enroll_find_sensor_start_button">Start</string>
     <!-- Message announced to a11y users during fingerprint enrollment to help them locate the sensor. [CHAR LIMIT=NONE] -->
-    <string name="security_settings_udfps_enroll_find_sensor_a11y">The fingerprint sensor is on your screen. Move your finger across the screen to find the sensor.</string>
+    <string name="security_settings_udfps_enroll_a11y">Move your finger across the screen to find the sensor. Touch &amp; hold the fingerprint sensor.</string>
     <!-- Content description of graphic that shows where the fingerprint of the device is [CHAR LIMIT=NONE] -->
     <string name="security_settings_fingerprint_enroll_find_sensor_content_description">Illustration with device and fingerprint sensor location</string>
     <!-- Label text shown in fingerprint dialog for renaming a fingerprint template [CHAR LIMIT=22] -->
@@ -1033,7 +1035,9 @@
     <!-- Message shown in fingerprint enrollment dialog to begin enrollment [CHAR LIMIT=NONE] -->
     <string name="security_settings_fingerprint_enroll_start_message">Put your finger on the sensor and lift after you feel a vibration</string>
     <!-- Message shown in fingerprint enrollment dialog to begin enrollment [CHAR LIMIT=NONE] -->
-    <string name="security_settings_udfps_enroll_start_message">Keep your finger on the icon until you feel a vibration</string>
+    <string name="security_settings_udfps_enroll_start_message">Keep your finger on the sensor until you feel a vibration</string>
+    <!-- Title shown in fingerprint enrollment [CHAR LIMIT=NONE]-->
+    <string name="security_settings_fingerprint_enroll_udfps_title">Touch &amp; hold the fingerprint sensor</string>
     <!-- Title shown in fingerprint enrollment dialog to repeat touching the fingerprint sensor [CHAR LIMIT=40] -->
     <string name="security_settings_fingerprint_enroll_repeat_title">Lift, then touch again</string>
     <!-- Title shown in fingerprint enrollment dialog to repeat touching the fingerprint sensor [CHAR LIMIT=40] -->
@@ -1043,7 +1047,11 @@
     <!-- Message shown in fingerprint enrollment dialog to repeat touching the fingerprint sensor [CHAR LIMIT=NONE] -->
     <string name="security_settings_fingerprint_enroll_repeat_message">Keep lifting your finger to add the different parts of your fingerprint</string>
     <!-- Message shown in fingerprint enrollment dialog to repeat touching the fingerprint sensor [CHAR LIMIT=NONE] -->
-    <string name="security_settings_udfps_enroll_repeat_message">Touch &amp; hold each time the icon moves. This helps capture your full fingerprint.</string>
+    <string name="security_settings_udfps_enroll_repeat_message">Touch &amp; hold each time the fingerprint icon moves. This helps capture your full fingerprint.</string>
+    <!-- Message shown in fingerprint enrollment asking users to repeat touching the fingerprint sensor.-->
+    <string name="security_settings_udfps_enroll_repeat_a11y_message">This helps capture your full fingerprint</string>
+    <!-- Message read to a11y users when enrollment progress is made. The number is from 0 to 100. [CHAR LIMIT=NONE]-->
+    <string name="security_settings_udfps_enroll_progress_a11y_message">Enrolling fingerprint <xliff:g id="percentage" example="10">%d</xliff:g> percent</string>
     <!-- Title shown in fingerprint enrollment dialog once enrollment is completed [CHAR LIMIT=29] -->
     <string name="security_settings_fingerprint_enroll_finish_title">Fingerprint added</string>
     <!-- Message shown in fingerprint enrollment dialog once enrollment is completed -->
diff --git a/src/com/android/settings/biometrics/BiometricEnrollBase.java b/src/com/android/settings/biometrics/BiometricEnrollBase.java
index 22420d0..03e18d7 100644
--- a/src/com/android/settings/biometrics/BiometricEnrollBase.java
+++ b/src/com/android/settings/biometrics/BiometricEnrollBase.java
@@ -170,20 +170,28 @@
                 layoutTitle.setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_POLITE);
             }
             getLayout().setHeaderText(title);
+            getLayout().getHeaderTextView().setContentDescription(title);
             setTitle(title);
         }
     }
 
     protected void setHeaderText(int resId) {
         setHeaderText(resId, false /* force */);
+        getLayout().getHeaderTextView().setContentDescription(getText(resId));
     }
 
     protected void setHeaderText(CharSequence title) {
         getLayout().setHeaderText(title);
+        getLayout().getHeaderTextView().setContentDescription(title);
     }
 
     protected void setDescriptionText(int resId) {
-        getLayout().setDescriptionText(resId);
+        CharSequence previousDescription = getLayout().getDescriptionText();
+        CharSequence description = getString(resId);
+        // Prevent a11y for re-reading the same string
+        if (!TextUtils.equals(previousDescription, description)) {
+            getLayout().setDescriptionText(resId);
+        }
     }
 
     protected void setDescriptionText(CharSequence descriptionText) {
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
index 6bdd3f7..9b19ef7 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java
@@ -37,6 +37,8 @@
 import android.util.Log;
 import android.view.MotionEvent;
 import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.accessibility.AccessibilityManager;
 import android.view.animation.AnimationUtils;
 import android.view.animation.Interpolator;
 import android.widget.ProgressBar;
@@ -111,6 +113,8 @@
     private boolean mRestoring;
     private Vibrator mVibrator;
     private boolean mIsSetupWizard;
+    private AccessibilityManager mAccessibilityManager;
+    private boolean mIsAccessibilityEnabled;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -121,6 +125,9 @@
                 fingerprintManager.getSensorPropertiesInternal();
         mCanAssumeUdfps = props.size() == 1 && props.get(0).isAnyUdfpsType();
 
+        mAccessibilityManager = getSystemService(AccessibilityManager.class);
+        mIsAccessibilityEnabled = mAccessibilityManager.isEnabled();
+
         if (mCanAssumeUdfps) {
             if (BiometricUtils.isReverseLandscape(getApplicationContext())) {
                 setContentView(R.layout.udfps_enroll_enrolling_land);
@@ -134,8 +141,8 @@
         }
 
         mIsSetupWizard = WizardManagerHelper.isAnySetupWizard(getIntent());
-        if (mCanAssumeUdfps && !mIsSetupWizard) {
-            setHeaderText(R.string.security_settings_udfps_enroll_find_sensor_title);
+        if (mCanAssumeUdfps) {
+            updateTitleAndDescription();
         } else {
             setHeaderText(R.string.security_settings_fingerprint_enroll_repeat_title);
         }
@@ -282,7 +289,18 @@
     private void updateTitleAndDescription() {
         if (mSidecar == null || mSidecar.getEnrollmentSteps() == -1) {
             if (mCanAssumeUdfps) {
+                // setHeaderText(R.string.security_settings_fingerprint_enroll_udfps_title);
+                // Don't use BiometricEnrollBase#setHeaderText, since that invokes setTitle,
+                // which gets announced for a11y upon entering the page. For UDFPS, we want to
+                // announce a different string for a11y upon entering the page.
+                getLayout().setHeaderText(
+                        R.string.security_settings_fingerprint_enroll_udfps_title);
                 setDescriptionText(R.string.security_settings_udfps_enroll_start_message);
+
+                final CharSequence description = getString(
+                        R.string.security_settings_udfps_enroll_a11y);
+                getLayout().getHeaderTextView().setContentDescription(description);
+                setTitle(description);
             } else {
                 setDescriptionText(R.string.security_settings_fingerprint_enroll_start_message);
             }
@@ -295,8 +313,12 @@
             setDescriptionText(R.string.security_settings_udfps_enroll_start_message);
         } else {
             if (mCanAssumeUdfps) {
-                setHeaderText(R.string.security_settings_udfps_enroll_repeat_title_touch_icon);
-                setDescriptionText(R.string.security_settings_udfps_enroll_repeat_message);
+                setHeaderText(R.string.security_settings_fingerprint_enroll_repeat_title);
+                if (mIsAccessibilityEnabled) {
+                    setDescriptionText(R.string.security_settings_udfps_enroll_repeat_a11y_message);
+                } else {
+                    setDescriptionText(R.string.security_settings_udfps_enroll_repeat_message);
+                }
             } else {
                 setDescriptionText(R.string.security_settings_fingerprint_enroll_repeat_message);
             }
@@ -339,6 +361,18 @@
         if (!mCanAssumeUdfps) {
             mErrorText.removeCallbacks(mTouchAgainRunnable);
             mErrorText.postDelayed(mTouchAgainRunnable, HINT_TIMEOUT_DURATION);
+        } else {
+            if (mIsAccessibilityEnabled) {
+                final int percent = (int) (((float)(steps - remaining) / (float) steps) * 100);
+                CharSequence cs = getString(
+                        R.string.security_settings_udfps_enroll_progress_a11y_message, percent);
+                AccessibilityEvent e = AccessibilityEvent.obtain();
+                e.setEventType(AccessibilityEvent.TYPE_ANNOUNCEMENT);
+                e.setClassName(getClass().getName());
+                e.setPackageName(getPackageName());
+                e.getText().add(cs);
+                mAccessibilityManager.sendAccessibilityEvent(e);
+            }
         }
     }
 
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
index aee2c9a..012f486 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFindSensor.java
@@ -62,7 +62,7 @@
         mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);
         mFooterBarMixin.setSecondaryButton(
                 new FooterButton.Builder(this)
-                        .setText(R.string.skip_label)
+                        .setText(R.string.security_settings_fingerprint_enroll_enrolling_skip)
                         .setListener(this::onSkipButtonClick)
                         .setButtonType(FooterButton.ButtonType.SKIP)
                         .setTheme(R.style.SudGlifButton_Secondary)
@@ -72,8 +72,14 @@
         if (mCanAssumeUdfps) {
             setHeaderText(R.string.security_settings_udfps_enroll_find_sensor_title);
             setDescriptionText(R.string.security_settings_udfps_enroll_find_sensor_message);
-            final CharSequence description = getString(R.string.security_settings_udfps_enroll_find_sensor_a11y);
-            getLayout().getDescriptionTextView().setContentDescription(description);
+            mFooterBarMixin.setPrimaryButton(
+                    new FooterButton.Builder(this)
+                    .setText(R.string.security_settings_udfps_enroll_find_sensor_start_button)
+                    .setListener(this::onStartButtonClick)
+                    .setButtonType(FooterButton.ButtonType.NEXT)
+                    .setTheme(R.style.SudGlifButton_Primary)
+                    .build()
+            );
         } else {
             setHeaderText(R.string.security_settings_fingerprint_enroll_find_sensor_title);
             setDescriptionText(R.string.security_settings_fingerprint_enroll_find_sensor_message);
@@ -148,6 +154,11 @@
     }
 
     private void startLookingForFingerprint() {
+        if (mCanAssumeUdfps) {
+            // UDFPS devices use this screen as an educational screen. Users should tap the
+            // "Start" button to move to the next screen to begin enrollment.
+            return;
+        }
         mSidecar = (FingerprintEnrollSidecar) getSupportFragmentManager().findFragmentByTag(
                 FingerprintEnrollEnrolling.TAG_SIDECAR);
         if (mSidecar == null) {
@@ -201,6 +212,10 @@
         }
     }
 
+    private void onStartButtonClick(View view) {
+        startActivityForResult(getFingerprintEnrollingIntent(), ENROLL_REQUEST);
+    }
+
     protected void onSkipButtonClick(View view) {
         stopLookingForFingerprint();
         setResult(RESULT_SKIP);
