diff --git a/src/martixBase.ts b/src/martixBase.ts index ac44dee907..2facd71ea2 100644 --- a/src/martixBase.ts +++ b/src/martixBase.ts @@ -345,7 +345,9 @@ export class QuestionMatrixBaseModel extends Question { //a11y public getCellAriaLabel(rowTitle:string, columnTitle:string):string { - return `row ${rowTitle}, column ${columnTitle}`; + const row = (this.getLocalizationString("matrix_row") || "row").toLocaleLowerCase(); + const column = (this.getLocalizationString("matrix_column") || "column").toLocaleLowerCase(); + return `${row} ${rowTitle}, ${column} ${columnTitle}`; } public get isNewA11yStructure(): boolean { diff --git a/src/question_matrixdropdownbase.ts b/src/question_matrixdropdownbase.ts index 07a0f30028..190d7c7c7d 100644 --- a/src/question_matrixdropdownbase.ts +++ b/src/question_matrixdropdownbase.ts @@ -82,7 +82,7 @@ export class MatrixDropdownCell { private updateCellQuestionTitleDueToAccessebility(row: MatrixDropdownRowModelBase): void { this.questionValue.locTitle.onGetTextCallback = (str: string): string => { if(!row || !row.getSurvey()) return this.questionValue.title; - const rowTitle = row.locText && row.locText.renderedHtml; + const rowTitle = row.getAccessbilityText(); if(!rowTitle) return this.questionValue.title; return this.column.colOwner.getCellAriaLabel(rowTitle, this.questionValue.title); }; @@ -286,6 +286,9 @@ implements ISurveyData, ISurveyImpl, ILocalizableOwner { public get locText(): LocalizableString { return null; } + public getAccessbilityText(): string { + return this.locText && this.locText.renderedHtml; + } public get hasPanel(): boolean { if (!this.data) return false; return this.data.hasDetailPanel(this); diff --git a/src/question_matrixdynamic.ts b/src/question_matrixdynamic.ts index 0194a8899a..c72fc773e4 100644 --- a/src/question_matrixdynamic.ts +++ b/src/question_matrixdynamic.ts @@ -31,7 +31,9 @@ export class MatrixDynamicRowModel extends MatrixDropdownRowModelBase implements public get rowName() { return this.id; } - + public getAccessbilityText(): string { + return (this.index + 1).toString(); + } public get shortcutText(): string { const matrix = this.data; const index = matrix.visibleRows.indexOf(this) + 1; diff --git a/tests/markup/snapshots/matrixdynamic-default.snap.html b/tests/markup/snapshots/matrixdynamic-default.snap.html index b2f109d309..3d746e326b 100644 --- a/tests/markup/snapshots/matrixdynamic-default.snap.html +++ b/tests/markup/snapshots/matrixdynamic-default.snap.html @@ -22,9 +22,9 @@
-