1414 * What is pinned:
1515 * - each picker IS the primitive (a Radix combobox trigger), shows what the
1616 * entry or the dialog holds, and no native select is left;
17- * - each picker keeps the accessible name the native control had (the
18- * object picker had none, and has none);
17+ * - each picker keeps the accessible name the native control had, and the
18+ * object picker, which had none, is named by its *Link to object* label
19+ * (objectstack#26732);
1920 * - every option of every picker writes what the native control wrote:
2021 * the inspector's `onNavPatch` value as JSON text plus the keys it holds
2122 * as `undefined` (JSON erases those), the *New object* save and the
@@ -158,7 +159,7 @@ afterEach(() => {
158159 vi . unstubAllGlobals ( ) ;
159160} ) ;
160161
161- /** The object picker's handle: it has no accessible name, as the native control had none. */
162+ /** The object picker's handle, kept from when it had no accessible name ( the native control had none) . */
162163const OBJECT_PICKER = 'nav-link-object' ;
163164const CHOOSE_OBJECT = en ( 'engine.studio.nav.chooseObject' ) ;
164165const CHOOSE = en ( 'engine.inspector.appNav.choose' ) ;
@@ -337,21 +338,22 @@ describe('the nav-item inspector picks with the shared Select (objectui#11865)',
337338 } ) ;
338339
339340 // The names were read on the native controls; red there only because the object picker is found by its test id.
340- it ( 'each picker keeps the name its label gave the native control; the object picker had none' , async ( ) => {
341+ // The object picker had none there; objectstack#26732 names it by its *Link to object* label.
342+ it ( 'each picker keeps the name its label gave the native control; the object picker is named by its label' , async ( ) => {
341343 const names : Record < string , string [ ] > = { } ;
342344 for ( const key of [ 'objBorn' , 'pageBorn' , 'dashBound' , 'reportBorn' , 'actionBorn' , 'compBorn' , 'docBorn' , 'urlDefault' ] ) {
343345 renderEntry ( key ) ;
344346 names [ key ] = screen . getAllByRole ( 'combobox' ) . map ( ( c ) => {
345347 // objectui#12455 — the inspector's Icon picker is a combobox named by its label too.
346- const named = [ 'Page' , 'Dashboard' , 'Report' , 'Action' , 'Component' , 'Doc page' , 'Book' , 'Open in' , 'Icon' ] . find (
348+ const named = [ 'Link to object' , ' Page', 'Dashboard' , 'Report' , 'Action' , 'Component' , 'Doc page' , 'Book' , 'Open in' , 'Icon' ] . find (
347349 ( n ) => screen . queryByRole ( 'combobox' , { name : n } ) === c ,
348350 ) ;
349351 return named ?? '' ;
350352 } ) ;
351353 cleanup ( ) ;
352354 }
353355 expect ( names ) . toEqual ( {
354- objBorn : [ '' , 'Icon' ] ,
356+ objBorn : [ 'Link to object ' , 'Icon' ] ,
355357 pageBorn : [ 'Page' , 'Icon' ] ,
356358 dashBound : [ 'Dashboard' , 'Icon' ] ,
357359 reportBorn : [ 'Report' , 'Icon' ] ,
@@ -361,7 +363,7 @@ describe('the nav-item inspector picks with the shared Select (objectui#11865)',
361363 urlDefault : [ 'Open in' , 'Icon' ] ,
362364 } ) ;
363365 renderEntry ( 'objBorn' ) ;
364- expect ( screen . getByTestId ( OBJECT_PICKER ) ) . not . toHaveAccessibleName ( ) ;
366+ expect ( screen . getByTestId ( OBJECT_PICKER ) ) . toHaveAccessibleName ( 'Link to object' ) ;
365367 } ) ;
366368
367369 it ( 'each picker lists its options in the order the native control did' , async ( ) => {
0 commit comments