File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @patternfly/elements " : patch
3+ ---
4+ ` <pf-table> ` : fix accessibility audit failures
5+
6+ - Fix column header ARIA role (` colheader ` -> ` columnheader ` )
7+ - Add accessible label to the row expand/collapse toggle button
8+ - Add ` aria-controls ` linking the toggle button to its expansion content
Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ import { createContextWithRoot } from '@patternfly/pfe-core/functions/context.js
22
33export const thRoleContext : {
44 __context__ : unknown ;
5- } = createContextWithRoot < 'rowheader' | 'colheader ' > ( 'pf-th-role' ) ;
5+ } = createContextWithRoot < 'rowheader' | 'columnheader ' > ( 'pf-th-role' ) ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export class PfTh extends LitElement {
5151 @property ( ) key ! : string ;
5252
5353 @consume ( { context : thRoleContext } )
54- private contextualRole : 'colheader ' | 'rowheader' = 'rowheader' ;
54+ private contextualRole : 'columnheader ' | 'rowheader' = 'rowheader' ;
5555
5656 override connectedCallback ( ) : void {
5757 super . connectedCallback ( ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { provide } from '@lit/context';
1414export class PfThead extends LitElement {
1515 static readonly styles : CSSStyleSheet [ ] = [ styles ] ;
1616
17- @provide ( { context : thRoleContext } ) private thRowContext = 'colheader ' ;
17+ @provide ( { context : thRoleContext } ) private thRowContext = 'columnheader ' ;
1818
1919 connectedCallback ( ) : void {
2020 super . connectedCallback ( ) ;
Original file line number Diff line number Diff line change @@ -109,7 +109,9 @@ export class PfTr extends LitElement {
109109 < pf-td id ="toggle-cell ">
110110 < pf-button id ="toggle-button "
111111 aria-expanded =${ String ( this . expanded ) as 'true' | 'false' }
112+ aria-controls =${ ifDefined ( this . expanded ? 'expansion' : undefined ) }
112113 plain
114+ label="Details"
113115 @click=${ this . #onClick} >
114116 < pf-icon id ="toggle-icon "
115117 icon ="angle-right "
You can’t perform that action at this time.
0 commit comments