diff --git a/ionic/components/action-sheet/action-sheet.ts b/ionic/components/action-sheet/action-sheet.ts
index 8cbd08aba6..d1a8f7b6ff 100644
--- a/ionic/components/action-sheet/action-sheet.ts
+++ b/ionic/components/action-sheet/action-sheet.ts
@@ -164,8 +164,8 @@ export class ActionSheet extends ViewController {
'
' +
'
' +
'
' +
- '
{{d.title}}
' +
- '
{{d.subTitle}}
' +
+ '
{{d.title}}
' +
+ '
{{d.subTitle}}
' +
'
' +
'
',
host: {
- 'role': 'dialog'
+ 'role': 'dialog',
+ '[attr.aria-labelledby]': 'hdrId',
+ '[attr.aria-describedby]': 'descId'
},
directives: [NgFor, NgIf, Icon]
})
class ActionSheetCmp {
private d: any;
+ private descId: string;
+ private hdrId: string;
+ private id: number;
constructor(
private _viewCtrl: ViewController,
@@ -201,6 +206,14 @@ class ActionSheetCmp {
if (this.d.cssClass) {
renderer.setElementClass(_elementRef.nativeElement, this.d.cssClass, true);
}
+
+ this.id = (++actionSheetIds);
+ if (this.d.title) {
+ this.hdrId = 'acst-hdr-' + this.id;
+ }
+ if (this.d.subTitle) {
+ this.descId = 'acst-subhdr-' + this.id;
+ }
}
onPageLoaded() {
@@ -399,3 +412,5 @@ class ActionSheetWpSlideOut extends Transition {
}
}
Transition.register('action-sheet-wp-slide-out', ActionSheetWpSlideOut);
+
+let actionSheetIds = -1;