Common Focus Order Issues in Pregnancy Apps: Causes and Fixes

* User complaints – On the Google Play Store, several pregnancy trackers have a 3‑star average with recurring reviews: “I can’t get to the ‘Add appointment’ button without tapping the whole screen thr

May 28, 2026 · 7 min read · Common Issues

1. What causes focus‑order issues in pregnancy apps

Root causeWhy it shows up in pregnancy apps
Hard‑coded tab indicesMany UI designers copy‑paste XML/HTML snippets for weekly trackers, symptom logs, or hormone charts. If each copy retains a tabindex value, the logical order is broken when the screen grows.
Dynamic list inflationWeekly “baby‑development” lists, medication tables, and push‑notification cards are built at runtime. When items are inserted with addView() (Android) or appendChild() (Web) without updating the focus chain, newly added rows inherit the default order, which is often after the last focusable element on the page, not after the previous row.
Custom view componentsPregnancy apps frequently ship custom pickers for due‑date, contraction timers, or weight‑gain sliders. If the component does not expose proper accessibility focus events (requestFocus(), focusableInTouchMode), screen readers will skip it or place it at the end of the order.
Conditional UI branches“If you’re in the first trimester, show diet tips; otherwise hide them.” Hiding/showing sections with visibility=gone (Android) or display:none (Web) does not automatically remove them from the focus order on all platforms, leading to “phantom” focus stops.
Third‑party SDK overlaysAdvertising or analytics SDKs often inject floating buttons (e.g., “Rate us”, “Share”). Because they are added after the main layout, they appear at the end of the tab order, stealing focus from critical form fields like “Enter due date”.
Inconsistent platform conventionsAndroid expects a left‑to‑right, top‑to‑bottom order; iOS VoiceOver follows a similar but not identical rule set. When a cross‑platform framework (React Native, Flutter) is used without explicit focus‑order mapping, the generated order can differ per OS, confusing users who switch devices.
Lack of semantic groupingPregnancy apps contain many related controls (e.g., “Morning sickness severity” radio group). If they are not wrapped in a proper group (android:accessibilityTraversalAfter, role="radiogroup"), the focus jumps between unrelated elements, breaking mental models.

---

2. Real‑world impact

---

3. Five concrete examples of focus‑order issues in pregnancy apps

  1. Weekly development carousel skips the “Save” button
  1. Symptom‑tracker checklist leaves a dead focus gap
  1. Due‑date picker modal steals focus from the “Next” button
  1. Nutrition‑tips side panel appears after the main form
  1. Cross‑session “Share progress” button hidden on iOS

---

4. How to detect focus‑order issues

Detection methodWhat to look forHow SUSA helps
Manual exploratory testingUse a hardware keyboard (Android) or Tab key (Web) to move focus. Verify that focus moves logically from top‑left to bottom‑right, and that every interactive element receives focus exactly once.Upload the APK or URL to SUSA. The platform runs a persona called *curious* that simulates Tab navigation across every screen, logging any element that is skipped or receives focus out of order.
Screen‑reader walkthroughEnable TalkBack (Android) or VoiceOver (iOS) and listen to the announced order. Look for “focus moved to background” or “skipped element”.SUSA’s *accessibility* persona performs WCAG 2.1 AA testing, automatically flagging “focus order” violations and providing a per‑screen “untapped element” list.
Automated accessibility audit toolsAxe, Lighthouse, or Android Lint can surface “focusable elements not reachable via sequential navigation”.SUSA generates Appium regression scripts that include driver.getPageSource() after each navigation step, then asserts that the focus traversal sequence matches the visual order.
Unit‑level focus‑order assertionsIn UI tests, call assertFocusOrder(expectedIds) after each screen is rendered.The CLI (pip install susatest-agent) can inject a “focus‑order validator” hook into your CI pipeline, emitting JUnit XML failures whenever the runtime order diverges from the declared order.
Cross‑session learningRun the app multiple times with different data sets (e.g., different trimesters). Observe if new dynamic rows break the order.SUSA’s cross‑session learning remembers previously discovered focus gaps and re‑checks them on each new run, surfacing regressions instantly.

---

5. Fixes – code‑level guidance for each example

1️⃣ Weekly development carousel

*Android (Kotlin)*


// After inflating the ViewPager2, set the FAB's traversal order
fab.isFocusable = true
ViewCompat.setAccessibilityTraversalAfter(fab, viewPager.id)

*Web (React)*


// Ensure the FAB receives a lower tabindex than the carousel
<button id="saveBtn" tabIndex={0}>Save</button>
<div id="carousel" role="region" tabIndex={-1}>…</div>

2️⃣ Symptom‑tracker checklist


// When adding a new symptom row
val newRow = LayoutInflater.from(context).inflate(R.layout.symptom_row, container, false)
container.addView(newRow)

// Update traversal chain
if (container.childCount > 1) {
    val prev = container.getChildAt(container.childCount - 2)
    ViewCompat.setAccessibilityTraversalAfter(newRow, prev.id)
}

// React – keep a refs array and set `tabIndex` sequentially
symptoms.map((s,i) => (
  <input
    key={s.id}
    ref={el => refs.current[i] = el}
    tabIndex={i}
    type="checkbox"
    aria-label={s.label}
  />
));

3️⃣ Due‑date picker modal

*Android (XML)*


<!-- Ensure the modal’s close button is first, then the underlying Next button -->
<Button
    android:id="@+id/closeModal"
    android:accessibilityTraversalAfter="@id/datePicker"
/>
<Button
    android:id="@+id/nextBtn"
    android:accessibilityTraversalAfter="@id/closeModal"
/>

*Web (HTML)*


<div role="dialog" aria-modal="true" id="datePicker">
  <button id="closeDialog">Close</button>
  <!-- hidden but focusable Next button inside the dialog -->
  <button id="nextBtn" tabindex="0">Next</button>
</div>

4️⃣ Nutrition‑tips side panel


// When sliding the panel in, move it before the submit button in the view hierarchy
val parent = submitButton.parent as ViewGroup
parent.removeView(sidePanel)
parent.addView(sidePanel, parent.indexOfChild(submitButton))

// Web – insert the panel before the submit button in the DOM
const form = document.getElementById('dailyLog')
form.insertBefore(sidePanel, form.querySelector('#submitBtn'))

5️⃣ Cross‑session “Share progress” button


// iOS – completely remove from accessibility tree when hidden
shareButton.isHidden = true
shareButton.isAccessibilityElement = false

// Android – use `visibility = View.GONE` *and* `importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO`
shareButton.visibility = View.GONE
shareButton.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO

---

6. Prevention – catching focus‑order problems before release

  1. Define a focus‑order map early
  1. Integrate SUSA into CI/CD
  1. Automated regression script generation
  1. Component‑level unit tests
  1. Persona‑driven exploratory sprints
  1. Documentation & lint rules
  1. Cross‑platform consistency checks

By making focus order a first‑class requirement—backed by automated detection (SUSA), CI enforcement, and component‑level tests—pregnancy apps can eliminate the navigation friction that currently drives down ratings, increase conversion to premium plans, and, most importantly, provide a safe, inclusive experience for expecting parents of all abilities.

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free