@@ -1011,18 +1011,29 @@ describe("sessions view", () => {
10111011 ) ;
10121012 const thinkingField = fieldByLabel ( "Thinking" ) ;
10131013 const reasoningField = fieldByLabel ( "Reasoning" ) ;
1014- expect ( thinkingField ?. getAttribute ( "title" ) ) . toContain ( "thinking level override" ) ;
1014+ // The tooltip rides the focus-capable openclaw-tooltip component (hover +
1015+ // keyboard focus), not a native title attribute that never shows on focus.
1016+ const tooltipContent = ( field : HTMLLabelElement | undefined ) => {
1017+ const wrapper = field ?. parentElement ;
1018+ return wrapper ?. tagName . toLowerCase ( ) === "openclaw-tooltip"
1019+ ? ( wrapper as HTMLElement & { content ?: string } ) . content
1020+ : undefined ;
1021+ } ;
1022+ expect ( tooltipContent ( thinkingField ) ) . toContain ( "thinking level override" ) ;
1023+ expect ( tooltipContent ( reasoningField ) ) . toContain ( "display" ) ;
10151024 // The wrapping label stays the accessible NAME; the tooltip is exposed as
10161025 // the accessible DESCRIPTION so screen readers keep the short control name.
10171026 const thinkingSelect = thinkingField ?. querySelector ( "select" ) ;
10181027 expect ( thinkingSelect ?. hasAttribute ( "aria-label" ) ) . toBe ( false ) ;
10191028 expect ( thinkingSelect ?. getAttribute ( "aria-description" ) ) . toContain ( "provider profile" ) ;
10201029 const reasoningSelect = reasoningField ?. querySelector ( "select" ) ;
1021- expect ( reasoningField ?. getAttribute ( "title" ) ) . toContain ( "display" ) ;
10221030 expect ( reasoningSelect ?. hasAttribute ( "aria-label" ) ) . toBe ( false ) ;
10231031 expect ( reasoningSelect ?. getAttribute ( "aria-description" ) ) . toContain ( "display" ) ;
1024- // Fields without a tooltip stay untitled.
1025- expect ( fieldByLabel ( "Fast" ) ?. hasAttribute ( "title" ) ) . toBe ( false ) ;
1032+ // Fields without a tooltip get neither wrapper nor description.
1033+ expect ( tooltipContent ( fieldByLabel ( "Fast" ) ) ) . toBeUndefined ( ) ;
1034+ expect ( fieldByLabel ( "Fast" ) ?. querySelector ( "select" ) ?. hasAttribute ( "aria-description" ) ) . toBe (
1035+ false ,
1036+ ) ;
10261037 } ) ;
10271038
10281039 it ( "opens details for sessions without checkpoints but ignores nested control clicks" , async ( ) => {
0 commit comments