diff --git a/src/app/components/api/menuitem.ts b/src/app/components/api/menuitem.ts
index e577a050dca..f0058dcbc0d 100755
--- a/src/app/components/api/menuitem.ts
+++ b/src/app/components/api/menuitem.ts
@@ -110,7 +110,7 @@ export interface MenuItem {
/**
* How to handle query parameters in the router link for the next navigation. One of:
merge : Merge new with current parameters.
- preserve : Preserve current parameters.k.
+ preserve : Preserve current parameters.k.
*/
queryParamsHandling?: QueryParamsHandling;
/**
@@ -143,6 +143,10 @@ export interface MenuItem {
* @see {TooltipOptions}
*/
tooltipOptions?: TooltipOptions;
+ /**
+ * Id of the controlled element. Allows to set or override the aria-controls attribute of the HTML element that requires it for this MenuItem
+ */
+ overrideAriaControls?: string;
}
/**
diff --git a/src/app/components/steps/steps.ts b/src/app/components/steps/steps.ts
index af6aaa7b8f4..7ec227c6d13 100755
--- a/src/app/components/steps/steps.ts
+++ b/src/app/components/steps/steps.ts
@@ -24,6 +24,7 @@ import { Subscription } from 'rxjs';
role="tab"
[attr.aria-selected]="i === activeIndex"
[attr.aria-expanded]="i === activeIndex"
+ [attr.aria-controls]="item.overrideAriaControls"
pTooltip
[tooltipOptions]="item.tooltipOptions"
[ngClass]="{ 'p-highlight p-steps-current': isActive(item, i), 'p-disabled': item.disabled || (readonly && !isActive(item, i)) }"
diff --git a/src/app/showcase/doc/steps/confirmationdemo.ts b/src/app/showcase/doc/steps/confirmationdemo.ts
index 8639fb31d20..3399998dfda 100644
--- a/src/app/showcase/doc/steps/confirmationdemo.ts
+++ b/src/app/showcase/doc/steps/confirmationdemo.ts
@@ -5,7 +5,7 @@ import { Router } from '@angular/router';
@Component({
template: `
-
+
Confirmation
Enter your card details
diff --git a/src/app/showcase/doc/steps/paymentdemo.ts b/src/app/showcase/doc/steps/paymentdemo.ts
index 7e0f3ca2c54..81883e74b67 100644
--- a/src/app/showcase/doc/steps/paymentdemo.ts
+++ b/src/app/showcase/doc/steps/paymentdemo.ts
@@ -5,7 +5,7 @@ import { Router } from '@angular/router';
@Component({
template: `
-
+
Payment Information
Enter your card details
diff --git a/src/app/showcase/doc/steps/personaldemo.ts b/src/app/showcase/doc/steps/personaldemo.ts
index bfd7e2e7eb3..aacdd62f0c3 100644
--- a/src/app/showcase/doc/steps/personaldemo.ts
+++ b/src/app/showcase/doc/steps/personaldemo.ts
@@ -5,7 +5,7 @@ import { Router } from '@angular/router';
@Component({
template: `
-
+
Personal Information
Enter your personal information
diff --git a/src/app/showcase/doc/steps/routingdoc.ts b/src/app/showcase/doc/steps/routingdoc.ts
index 71483d259ea..3da0d87b6bb 100644
--- a/src/app/showcase/doc/steps/routingdoc.ts
+++ b/src/app/showcase/doc/steps/routingdoc.ts
@@ -34,19 +34,24 @@ export class RoutingDoc implements OnInit {
this.items = [
{
label: 'Personal',
- routerLink: ''
+ routerLink: '',
+ overrideAriaControls: 'personal-step'
+
},
{
label: 'Seat',
- routerLink: 'seat'
+ routerLink: 'seat',
+ overrideAriaControls: 'seat-step'
},
{
label: 'Payment',
- routerLink: 'payment'
+ routerLink: 'payment',
+ overrideAriaControls: 'payment-step'
},
{
label: 'Confirmation',
- routerLink: 'confirmation'
+ routerLink: 'confirmation',
+ overrideAriaControls: 'confirmation-step'
}
];
diff --git a/src/app/showcase/doc/steps/seatdemo.ts b/src/app/showcase/doc/steps/seatdemo.ts
index 7f417356755..b8ae189ba52 100644
--- a/src/app/showcase/doc/steps/seatdemo.ts
+++ b/src/app/showcase/doc/steps/seatdemo.ts
@@ -5,7 +5,7 @@ import { Router } from '@angular/router';
@Component({
template: `
-
+
Seat Information
Choose your seat