File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,16 @@ const DYNAMIC_TWEAKS = [
163163 // Remove headings from folder and file lists.
164164 { selector : 'table[aria-labelledby=folders-and-files] :is(h2, h3)' ,
165165 tweak : makePresentational } ,
166+ // Remove table-related roles from release asset links.
167+ { selector : 'ul:not([role]):has(li[role="row"])' ,
168+ tweak : el => {
169+ // Add a list role, for future proofing in case GitHub double down on making these tables.
170+ el . setAttribute ( "role" , "list" ) ;
171+ el . querySelectorAll ( 'li[role="row"]' ) . forEach ( row => {
172+ row . removeAttribute ( "role" ) ;
173+ row . querySelectorAll ( '[role="cell"]' ) . forEach ( cell => cell . removeAttribute ( "role" ) ) ;
174+ } ) ;
175+ } } ,
166176] ;
167177
168178/*** Lights, camera, action! ***/
You can’t perform that action at this time.
0 commit comments