@@ -494,6 +494,69 @@ describe('<pf-v6-tooltip>', function() {
494494 } ) ;
495495 } ) ;
496496
497+ describe ( 'announcer live region' , function ( ) {
498+ beforeEach ( async function ( ) {
499+ element = await fixture < PfV6Tooltip > ( html `
500+ < pf-v6-tooltip content ="Announced text ">
501+ < button > Trigger</ button >
502+ </ pf-v6-tooltip >
503+ ` ) ;
504+ } ) ;
505+
506+ describe ( 'after calling show()' , function ( ) {
507+ beforeEach ( async function ( ) {
508+ await element . show ( ) ;
509+ await element . updateComplete ;
510+ } ) ;
511+
512+ it ( 'should populate the live region with tooltip content' , async function ( ) {
513+ const snapshot = await a11ySnapshot ( ) ;
514+ const text = JSON . stringify ( snapshot ) ;
515+ expect ( text ) . to . include ( 'Announced text' ) ;
516+ } ) ;
517+
518+ describe ( 'then calling hide()' , function ( ) {
519+ beforeEach ( async function ( ) {
520+ await element . hide ( ) ;
521+ await element . updateComplete ;
522+ } ) ;
523+
524+ it ( 'should clear the live region' , async function ( ) {
525+ const snapshot = await a11ySnapshot ( ) ;
526+ const text = JSON . stringify ( snapshot ) ;
527+ expect ( text ) . to . not . include ( 'Announced text' ) ;
528+ } ) ;
529+ } ) ;
530+ } ) ;
531+ } ) ;
532+
533+ describe ( 'tooltip content inert state' , function ( ) {
534+ beforeEach ( async function ( ) {
535+ element = await fixture < PfV6Tooltip > ( html `
536+ < pf-v6-tooltip content ="Inert test ">
537+ < button > Trigger</ button >
538+ </ pf-v6-tooltip >
539+ ` ) ;
540+ } ) ;
541+
542+ it ( 'should exclude tooltip content from ax tree when hidden' , async function ( ) {
543+ const snapshot = await a11ySnapshot ( ) ;
544+ expect ( snapshot ) . to . not . axContainName ( 'Inert test' ) ;
545+ } ) ;
546+
547+ describe ( 'after calling show()' , function ( ) {
548+ beforeEach ( async function ( ) {
549+ await element . show ( ) ;
550+ await element . updateComplete ;
551+ } ) ;
552+
553+ it ( 'should include tooltip content in ax tree when visible' , async function ( ) {
554+ const snapshot = await a11ySnapshot ( ) ;
555+ expect ( snapshot ) . to . axContainName ( 'Inert test' ) ;
556+ } ) ;
557+ } ) ;
558+ } ) ;
559+
497560 describe ( 'with silent attribute' , function ( ) {
498561 beforeEach ( async function ( ) {
499562 element = await fixture < PfV6Tooltip > ( html `
0 commit comments