@@ -22,67 +22,67 @@ export const A11yMixin = (superClass) =>
2222 } ;
2323 }
2424 static get observers ( ) {
25- return [ '_a11yUpdateGridSize (size, _columnTree)' ] ;
25+ return [ '__updateA11yGridSize (size, _columnTree)' ] ;
2626 }
2727
2828 /** @private */
29- _a11yGetHeaderRowCount ( _columnTree ) {
29+ __getA11yHeaderRowCount ( _columnTree ) {
3030 return _columnTree . filter ( ( level ) =>
3131 level . some ( ( col ) => col . headerRenderer || ( col . path && col . header !== null ) || col . header ) ,
3232 ) . length ;
3333 }
3434
3535 /** @private */
36- _a11yGetFooterRowCount ( _columnTree ) {
36+ __getA11yFooterRowCount ( _columnTree ) {
3737 return _columnTree . filter ( ( level ) => level . some ( ( col ) => col . headerRenderer ) ) . length ;
3838 }
3939
4040 /** @private */
41- _a11yUpdateGridSize ( size , _columnTree ) {
42- if ( size === undefined || _columnTree === undefined ) {
41+ __updateA11yGridSize ( size , columnTree ) {
42+ if ( size === undefined || columnTree === undefined ) {
4343 return ;
4444 }
4545
46- const bodyColumns = _columnTree [ _columnTree . length - 1 ] ;
46+ const bodyColumns = columnTree [ columnTree . length - 1 ] ;
4747 this . $ . table . setAttribute (
4848 'aria-rowcount' ,
49- size + this . _a11yGetHeaderRowCount ( _columnTree ) + this . _a11yGetFooterRowCount ( _columnTree ) ,
49+ size + this . __getA11yHeaderRowCount ( columnTree ) + this . __getA11yFooterRowCount ( columnTree ) ,
5050 ) ;
5151 this . $ . table . setAttribute ( 'aria-colcount' , ( bodyColumns && bodyColumns . length ) || 0 ) ;
5252
53- this . _a11yUpdateHeaderRows ( ) ;
54- this . _a11yUpdateFooterRows ( ) ;
53+ this . __updateA11yHeaderRows ( ) ;
54+ this . __updateA11yFooterRows ( ) ;
5555 }
5656
57- /** @protected */
58- _a11yUpdateHeaderRows ( ) {
57+ /** @private */
58+ __updateA11yHeaderRows ( ) {
5959 iterateChildren ( this . $ . header , ( headerRow , index ) => {
6060 headerRow . setAttribute ( 'aria-rowindex' , index + 1 ) ;
6161 } ) ;
6262 }
6363
64- /** @protected */
65- _a11yUpdateFooterRows ( ) {
64+ /** @private */
65+ __updateA11yFooterRows ( ) {
6666 iterateChildren ( this . $ . footer , ( footerRow , index ) => {
67- footerRow . setAttribute ( 'aria-rowindex' , this . _a11yGetHeaderRowCount ( this . _columnTree ) + this . size + index + 1 ) ;
67+ footerRow . setAttribute ( 'aria-rowindex' , this . __getA11yHeaderRowCount ( this . _columnTree ) + this . size + index + 1 ) ;
6868 } ) ;
6969 }
7070
7171 /**
7272 * @param {!HTMLElement } row
7373 * @param {number } index
74- * @protected
74+ * @private
7575 */
76- _a11yUpdateRowRowindex ( row , index ) {
77- row . setAttribute ( 'aria-rowindex' , index + this . _a11yGetHeaderRowCount ( this . _columnTree ) + 1 ) ;
76+ __updateA11yRowRowindex ( row , index ) {
77+ row . setAttribute ( 'aria-rowindex' , index + this . __getA11yHeaderRowCount ( this . _columnTree ) + 1 ) ;
7878 }
7979
8080 /**
8181 * @param {!HTMLElement } row
8282 * @param {boolean } selected
83- * @protected
83+ * @private
8484 */
85- _a11yUpdateRowSelected ( row , selected ) {
85+ __updateA11yRowSelected ( row , selected ) {
8686 // Jaws reads selection only for rows, NVDA only for cells
8787 row . setAttribute ( 'aria-selected' , Boolean ( selected ) ) ;
8888 iterateRowCells ( row , ( cell ) => {
@@ -92,9 +92,9 @@ export const A11yMixin = (superClass) =>
9292
9393 /**
9494 * @param {!HTMLElement } row
95- * @protected
95+ * @private
9696 */
97- _a11yUpdateRowExpanded ( row ) {
97+ __updateA11yRowExpanded ( row ) {
9898 if ( this . __isRowExpandable ( row ) ) {
9999 row . setAttribute ( 'aria-expanded' , 'false' ) ;
100100 } else if ( this . __isRowCollapsible ( row ) ) {
@@ -107,9 +107,9 @@ export const A11yMixin = (superClass) =>
107107 /**
108108 * @param {!HTMLElement } row
109109 * @param {number } level
110- * @protected
110+ * @private
111111 */
112- _a11yUpdateRowLevel ( row , level ) {
112+ __updateA11yRowLevel ( row , level ) {
113113 // Set level for the expandable rows itself, and all the nested rows.
114114 if ( level > 0 || this . __isRowCollapsible ( row ) || this . __isRowExpandable ( row ) ) {
115115 row . setAttribute ( 'aria-level' , level + 1 ) ;
@@ -121,9 +121,9 @@ export const A11yMixin = (superClass) =>
121121 /**
122122 * @param {!HTMLElement } row
123123 * @param {!HTMLElement } detailsCell
124- * @protected
124+ * @private
125125 */
126- _a11ySetRowDetailsCell ( row , detailsCell ) {
126+ __setA11yRowDetailsCell ( row , detailsCell ) {
127127 iterateRowCells ( row , ( cell ) => {
128128 if ( cell !== detailsCell ) {
129129 cell . setAttribute ( 'aria-controls' , detailsCell . id ) ;
@@ -134,14 +134,14 @@ export const A11yMixin = (superClass) =>
134134 /**
135135 * @param {!HTMLElement } row
136136 * @param {number } colspan
137- * @protected
137+ * @private
138138 */
139- _a11yUpdateCellColspan ( cell , colspan ) {
139+ __updateA11yCellColspan ( cell , colspan ) {
140140 cell . setAttribute ( 'aria-colspan' , Number ( colspan ) ) ;
141141 }
142142
143- /** @protected */
144- _a11yUpdateSorters ( ) {
143+ /** @private */
144+ __updateA11ySorters ( ) {
145145 Array . from ( this . querySelectorAll ( 'vaadin-grid-sorter' ) ) . forEach ( ( sorter ) => {
146146 let cellContent = sorter . parentNode ;
147147 while ( cellContent && cellContent . localName !== 'vaadin-grid-cell-content' ) {
0 commit comments