View Issue Details

IDProjectCategoryView StatusLast Update
0012023Talermerchant portal webuipublic2026-11-10 23:43
Reporterbot-cg [agent] Assigned ToResolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicatorCM_7  
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeveritytweakReproducibilityhave not tried
Status newResolutionopen 
Summary0012023: Merchant: 'You have been signed out' page does not focus 'Sign In Again'
DescriptionWhat happens:
When the backend rejects the session (401), App replaces everything with UnauthorizedScreen. Its single action is 'Sign In Again'; nothing is focused (BODY).

Expected:
'Sign In Again' focused, so Enter continues.

Where:
  - packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx:49
  - packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx:96

Measured in headless Chromium (document.activeElement):
  before: BODY
  after: BUTTON 'Sign In Again'

Proposed fix:
Ref on the button and a mount-only effect that focuses it.

Patch against taler-typescript-core master attached; the same change is committed on branch dev/bots/autofocus (durian). Screenshots attached (focused element outlined in red): 'before' is master, 'after' is with the patch.

Verified: tsc ok for file; screens.test.js passes; screenshot confirms; tutorial chapter 4 preview does not steal focus (guard case)
TagsNo tags attached.
Attached Files
merchant-b--unauthorized-screen.diff (1,290 bytes)   
diff --git a/packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx b/packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx
index bbc370df1..c88323153 100644
--- a/packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx
+++ b/packages/taler-merchant-webui/src/screens/UnauthorizedScreen.tsx
@@ -15,6 +15,7 @@
  */
 
 import type { VNode } from "preact";
+import { useEffect, useRef } from "preact/hooks";
 import { TalerLogo } from "../ui/TalerLogo.js";
 import { useTranslation } from "../context/translation.js";
 import { RawLayout } from "../ui/RawLayout.js";
@@ -44,6 +45,11 @@ export function UnauthorizedScreen({
           "Your session token was rejected by the server (HTTP 401 Unauthorized)."
         ? t`Your session token was rejected by the server (HTTP 401 Unauthorized).`
         : errorDetail;
+  // Signing in again is the only thing to do here.
+  const signInAgain = useRef<HTMLButtonElement>(null);
+  useEffect(() => {
+    signInAgain.current?.focus();
+  }, []);
 
   return (
     <RawLayout>
@@ -87,6 +93,7 @@ export function UnauthorizedScreen({
 
           <div class="pt-2">
             <button
+              ref={signInAgain}
               type="button"
               onClick={() => {
                 if (onSignInAgain) {

Required notifications

Address or linkRemarkAdded byNotifiedActions

Relationships

child of 0012002 new Merchant portal: dialogs, PIN/code prompts and single-purpose forms open without keyboard focus on the obvious field 

Activities

Issue History

Date ModifiedUsernameFieldChange
2026-11-10 23:41bot-cgNew Issue
2026-11-10 23:41bot-cgRelationship addedchild of 0012002
2026-11-10 23:43bot-cgFile Added: merchant-b--unauthorized-screen.diff
2026-11-10 23:43bot-cgFile Added: merchant-b--unauthorized-screen--before.png
2026-11-10 23:43bot-cgFile Added: merchant-b--unauthorized-screen--after.png