@@ -278,60 +278,42 @@ export const interactive_roles = non_abstract_roles.filter(
278278
279279export const presentation_roles = [ 'presentation' , 'none' ] ;
280280
281- /**
282- * @type {ARIARoleRelationConcept[] }
283- */
281+ /** @type {ARIARoleRelationConcept[] } */
284282export const non_interactive_element_role_schemas = [ ] ;
285- elementRoles . entries ( ) . forEach ( ( [ schema , roles ] ) => {
283+
284+ /** @type {ARIARoleRelationConcept[] } */
285+ export const interactive_element_role_schemas = [ ] ;
286+
287+ for ( const [ schema , roles ] of elementRoles . entries ( ) ) {
286288 if ( [ ...roles ] . every ( ( role ) => role !== 'generic' && non_interactive_roles . includes ( role ) ) ) {
287289 non_interactive_element_role_schemas . push ( schema ) ;
288290 }
289- } ) ;
290291
291- /**
292- * @type {ARIARoleRelationConcept[] }
293- */
294- export const interactive_element_role_schemas = [ ] ;
295- elementRoles . entries ( ) . forEach ( ( [ schema , roles ] ) => {
296292 if ( [ ...roles ] . every ( ( role ) => interactive_roles . includes ( role ) ) ) {
297293 interactive_element_role_schemas . push ( schema ) ;
298294 }
299- } ) ;
295+ }
300296
301297const interactive_ax_objects = [ ...AXObjects . keys ( ) ] . filter (
302298 ( name ) => AXObjects . get ( name ) . type === 'widget'
303299) ;
304300
305- /**
306- * @type {ARIARoleRelationConcept[] }
307- */
301+ /** @type {ARIARoleRelationConcept[] } */
308302export const interactive_element_ax_object_schemas = [ ] ;
309- elementAXObjects . entries ( ) . forEach (
310- /**
311- * @param {any } _
312- */
313- ( [ schema , ax_object ] ) => {
314- if ( [ ...ax_object ] . every ( ( role ) => interactive_ax_objects . includes ( role ) ) ) {
315- interactive_element_ax_object_schemas . push ( schema ) ;
316- }
317- }
318- ) ;
303+
304+ /** @type {ARIARoleRelationConcept[] } */
305+ export const non_interactive_element_ax_object_schemas = [ ] ;
319306
320307const non_interactive_ax_objects = [ ...AXObjects . keys ( ) ] . filter ( ( name ) =>
321308 [ 'windows' , 'structure' ] . includes ( AXObjects . get ( name ) . type )
322309) ;
323310
324- /**
325- * @type {ARIARoleRelationConcept[] }
326- */
327- export const non_interactive_element_ax_object_schemas = [ ] ;
328- elementAXObjects . entries ( ) . forEach (
329- /**
330- * @param {any } _
331- */
332- ( [ schema , ax_object ] ) => {
333- if ( [ ...ax_object ] . every ( ( role ) => non_interactive_ax_objects . includes ( role ) ) ) {
334- non_interactive_element_ax_object_schemas . push ( schema ) ;
335- }
311+ for ( const [ schema , ax_object ] of elementAXObjects . entries ( ) ) {
312+ if ( [ ...ax_object ] . every ( ( role ) => interactive_ax_objects . includes ( role ) ) ) {
313+ interactive_element_ax_object_schemas . push ( schema ) ;
336314 }
337- ) ;
315+
316+ if ( [ ...ax_object ] . every ( ( role ) => non_interactive_ax_objects . includes ( role ) ) ) {
317+ non_interactive_element_ax_object_schemas . push ( schema ) ;
318+ }
319+ }
0 commit comments