@@ -58,7 +58,7 @@ export function footer(data: EventData): HTMLDivElement {
5858 `${ CLASSES . cell } ${ CLASSES . rowheader } ` ,
5959 { role : 'rowheader' }
6060 ) ;
61- footerHeader . setAttribute ( 'aria-label' , 'Package price' ) ;
61+ footerHeader . ariaLabel = 'Package price' ;
6262
6363 footerRow . append (
6464 footerHeader ,
@@ -75,6 +75,7 @@ function packageHeader(pkg: Package, display: DisplayOption) {
7575 `${ CLASSES . cell } ${ CLASSES . columnheader } ${ CLASSES . package } ` ,
7676 { role : 'columnheader' }
7777 ) ;
78+ el . ariaLabel = 'Package' ;
7879
7980 const name = createElement ( 'div' , CLASSES . descriptor , {
8081 textContent : pkg . name ,
@@ -117,6 +118,7 @@ function perkRow(perk: Perk, packages: Package[]) {
117118 `${ CLASSES . cell } ${ CLASSES . rowheader } ${ CLASSES . perk } ` ,
118119 { role : 'rowheader' }
119120 ) ;
121+ rowHeader . ariaLabel = 'Perk' ;
120122
121123 const description = createElement ( 'div' , CLASSES . descriptor , {
122124 textContent : perk . description ,
@@ -187,7 +189,7 @@ function perkValue(perk: Perk, pkg: Package) {
187189}
188190
189191function packageFooter ( pkg : Package ) {
190- return createElement ( 'div' , `${ CLASSES . cell } ${ CLASSES . package } ` , {
192+ const el = createElement ( 'div' , `${ CLASSES . cell } ${ CLASSES . package } ` , {
191193 role : 'gridcell' ,
192194 textContent : pkg . price . toLocaleString ( 'en-US' , {
193195 style : 'currency' ,
@@ -196,4 +198,6 @@ function packageFooter(pkg: Package) {
196198 maximumFractionDigits : 0 ,
197199 } ) ,
198200 } ) ;
201+ el . ariaLabel = 'Package price' ;
202+ return el ;
199203}
0 commit comments