@@ -42,7 +42,7 @@ describe('CalendarBase', () => {
42
42
` ( '$Name shows the current month by default' , ( { Calendar, props} ) => {
43
43
let { getByLabelText, getAllByLabelText, getByRole, getAllByRole} = render ( < Calendar { ...props } /> ) ;
44
44
45
- let calendar = getByRole ( 'group ' ) ;
45
+ let calendar = getByRole ( 'application ' ) ;
46
46
expect ( calendar ) . toBeVisible ( ) ;
47
47
48
48
let heading = getByRole ( 'heading' ) ;
@@ -311,7 +311,7 @@ describe('CalendarBase', () => {
311
311
` ( '$Name should show era for BC dates' , ( { Calendar} ) => {
312
312
let { getByRole} = render ( < Calendar defaultFocusedValue = { new CalendarDate ( 'BC' , 2 , 1 , 5 ) } /> ) ;
313
313
314
- let group = getByRole ( 'group ' ) ;
314
+ let group = getByRole ( 'application ' ) ;
315
315
expect ( group ) . toHaveAttribute ( 'aria-label' , 'January 2 BC' ) ;
316
316
317
317
let heading = getByRole ( 'heading' ) ;
@@ -464,7 +464,7 @@ describe('CalendarBase', () => {
464
464
${ 'v3 RangeCalendar' } | ${ RangeCalendar }
465
465
` ( '$Name should pass through data attributes' , ( { Calendar} ) => {
466
466
let { getByTestId} = render ( < Calendar data-testid = "foo" /> ) ;
467
- expect ( getByTestId ( 'foo' ) ) . toHaveAttribute ( 'role' , 'group ' ) ;
467
+ expect ( getByTestId ( 'foo' ) ) . toHaveAttribute ( 'role' , 'application ' ) ;
468
468
} ) ;
469
469
470
470
it . each `
@@ -477,7 +477,7 @@ describe('CalendarBase', () => {
477
477
expect ( ref . current ) . toHaveProperty ( 'UNSAFE_getDOMNode' ) ;
478
478
479
479
let wrapper = ref . current . UNSAFE_getDOMNode ( ) ;
480
- expect ( wrapper ) . toHaveAttribute ( 'role' , 'group ' ) ;
480
+ expect ( wrapper ) . toHaveAttribute ( 'role' , 'application ' ) ;
481
481
} ) ;
482
482
483
483
it . each `
@@ -512,7 +512,7 @@ describe('CalendarBase', () => {
512
512
${ 'v3 RangeCalendar' } | ${ RangeCalendar } | ${ { defaultValue : { start : new CalendarDate ( 2019 , 6 , 5 ) , end : new CalendarDate ( 2019 , 6 , 5 ) } } }
513
513
` ( '$Name should be labeled by month heading by default' , async ( { Calendar, props} ) => {
514
514
let { getByRole} = render ( < Calendar { ...props } /> ) ;
515
- let calendar = getByRole ( 'group ' ) ;
515
+ let calendar = getByRole ( 'application ' ) ;
516
516
let body = getByRole ( 'grid' ) ;
517
517
expect ( calendar ) . toHaveAttribute ( 'id' ) ;
518
518
expect ( calendar ) . toHaveAttribute ( 'aria-label' , 'June 2019' ) ;
@@ -525,7 +525,7 @@ describe('CalendarBase', () => {
525
525
${ 'v3 RangeCalendar' } | ${ RangeCalendar } | ${ { defaultValue : { start : new CalendarDate ( 2019 , 6 , 5 ) , end : new CalendarDate ( 2019 , 6 , 5 ) } } }
526
526
` ( '$Name should support labeling with aria-label' , ( { Calendar, props} ) => {
527
527
let { getByRole} = render ( < Calendar { ...props } aria-label = "foo" /> ) ;
528
- let calendar = getByRole ( 'group ' ) ;
528
+ let calendar = getByRole ( 'application ' ) ;
529
529
let body = getByRole ( 'grid' ) ;
530
530
expect ( calendar ) . toHaveAttribute ( 'id' ) ;
531
531
expect ( calendar ) . toHaveAttribute ( 'aria-label' , 'foo, June 2019' ) ;
@@ -538,7 +538,7 @@ describe('CalendarBase', () => {
538
538
${ 'v3 RangeCalendar' } | ${ RangeCalendar } | ${ { defaultValue : { start : new CalendarDate ( 2019 , 6 , 5 ) , end : new CalendarDate ( 2019 , 6 , 5 ) } } }
539
539
` ( '$Name should support labeling with aria-labelledby' , ( { Calendar, props} ) => {
540
540
let { getByRole} = render ( < Calendar { ...props } aria-labelledby = "foo" /> ) ;
541
- let calendar = getByRole ( 'group ' ) ;
541
+ let calendar = getByRole ( 'application ' ) ;
542
542
let body = getByRole ( 'grid' ) ;
543
543
expect ( calendar ) . toHaveAttribute ( 'id' ) ;
544
544
expect ( calendar ) . toHaveAttribute ( 'aria-label' , 'June 2019' ) ;
@@ -554,7 +554,7 @@ describe('CalendarBase', () => {
554
554
${ 'v3 RangeCalendar' } | ${ RangeCalendar } | ${ { defaultValue : { start : new CalendarDate ( 2019 , 6 , 5 ) , end : new CalendarDate ( 2019 , 6 , 5 ) } } }
555
555
` ( '$Name should support labeling with aria-labelledby and aria-label' , ( { Calendar, props} ) => {
556
556
let { getByRole} = render ( < Calendar { ...props } aria-label = "cal" aria-labelledby = "foo" /> ) ;
557
- let calendar = getByRole ( 'group ' ) ;
557
+ let calendar = getByRole ( 'application ' ) ;
558
558
let body = getByRole ( 'grid' ) ;
559
559
expect ( calendar ) . toHaveAttribute ( 'id' ) ;
560
560
expect ( calendar ) . toHaveAttribute ( 'aria-label' , 'cal, June 2019' ) ;
@@ -570,7 +570,7 @@ describe('CalendarBase', () => {
570
570
${ 'v3 RangeCalendar' } | ${ RangeCalendar } | ${ { defaultValue : { start : new CalendarDate ( 2019 , 6 , 5 ) , end : new CalendarDate ( 2019 , 6 , 5 ) } } }
571
571
` ( '$Name should support labeling with a custom id' , ( { Calendar, props} ) => {
572
572
let { getByRole} = render ( < Calendar { ...props } id = "hi" aria-label = "cal" aria-labelledby = "foo" /> ) ;
573
- let calendar = getByRole ( 'group ' ) ;
573
+ let calendar = getByRole ( 'application ' ) ;
574
574
let body = getByRole ( 'grid' ) ;
575
575
expect ( calendar ) . toHaveAttribute ( 'id' , 'hi' ) ;
576
576
expect ( calendar ) . toHaveAttribute ( 'aria-label' , 'cal, June 2019' ) ;
@@ -586,7 +586,7 @@ describe('CalendarBase', () => {
586
586
${ 'v3 RangeCalendar' } | ${ RangeCalendar } | ${ { defaultValue : { start : new CalendarDate ( 2019 , 6 , 5 ) , end : new CalendarDate ( 2019 , 6 , 5 ) } } }
587
587
` ( '$Name should support labeling with multiple visible months' , ( { Calendar, props} ) => {
588
588
let { getByRole, getAllByRole} = render ( < Calendar { ...props } aria-label = "Calendar" visibleMonths = { 3 } /> ) ;
589
- let calendar = getByRole ( 'group ' ) ;
589
+ let calendar = getByRole ( 'application ' ) ;
590
590
let months = getAllByRole ( 'grid' ) ;
591
591
expect ( months ) . toHaveLength ( 3 ) ;
592
592
expect ( calendar ) . toHaveAttribute ( 'id' ) ;
0 commit comments