@@ -756,7 +756,8 @@ export function check_element(node, context) {
756756 name === 'aria-activedescendant' &&
757757 ! is_dynamic_element &&
758758 ! is_interactive_element ( node . name , attribute_map ) &&
759- ! attribute_map . has ( 'tabindex' )
759+ ! attribute_map . has ( 'tabindex' ) &&
760+ ! has_spread
760761 ) {
761762 w . a11y_aria_activedescendant_has_tabindex ( attribute ) ;
762763 }
@@ -810,9 +811,9 @@ export function check_element(node, context) {
810811 const role = roles_map . get ( current_role ) ;
811812 if ( role ) {
812813 const required_role_props = Object . keys ( role . requiredProps ) ;
813- const has_missing_props = required_role_props . some (
814- ( prop ) => ! attributes . find ( ( a ) => a . name === prop )
815- ) ;
814+ const has_missing_props =
815+ ! has_spread &&
816+ required_role_props . some ( ( prop ) => ! attributes . find ( ( a ) => a . name === prop ) ) ;
816817 if ( has_missing_props ) {
817818 w . a11y_role_has_required_aria_props (
818819 attribute ,
@@ -828,6 +829,7 @@ export function check_element(node, context) {
828829
829830 // interactive-supports-focus
830831 if (
832+ ! has_spread &&
831833 ! has_disabled_attribute ( attribute_map ) &&
832834 ! is_hidden_from_screen_reader ( node . name , attribute_map ) &&
833835 ! is_presentation_role ( current_role ) &&
@@ -845,6 +847,7 @@ export function check_element(node, context) {
845847
846848 // no-interactive-element-to-noninteractive-role
847849 if (
850+ ! has_spread &&
848851 is_interactive_element ( node . name , attribute_map ) &&
849852 ( is_non_interactive_roles ( current_role ) || is_presentation_role ( current_role ) )
850853 ) {
@@ -853,6 +856,7 @@ export function check_element(node, context) {
853856
854857 // no-noninteractive-element-to-interactive-role
855858 if (
859+ ! has_spread &&
856860 is_non_interactive_element ( node . name , attribute_map ) &&
857861 is_interactive_roles ( current_role ) &&
858862 ! a11y_non_interactive_element_to_interactive_role_exceptions [ node . name ] ?. includes (
@@ -947,6 +951,7 @@ export function check_element(node, context) {
947951
948952 // no-noninteractive-element-interactions
949953 if (
954+ ! has_spread &&
950955 ! has_contenteditable_attr &&
951956 ! is_hidden_from_screen_reader ( node . name , attribute_map ) &&
952957 ! is_presentation_role ( role_static_value ) &&
@@ -964,6 +969,7 @@ export function check_element(node, context) {
964969
965970 // no-static-element-interactions
966971 if (
972+ ! has_spread &&
967973 ( ! role || role_static_value !== null ) &&
968974 ! is_hidden_from_screen_reader ( node . name , attribute_map ) &&
969975 ! is_presentation_role ( role_static_value ) &&
@@ -981,11 +987,11 @@ export function check_element(node, context) {
981987 }
982988 }
983989
984- if ( handlers . has ( 'mouseover' ) && ! handlers . has ( 'focus' ) ) {
990+ if ( ! has_spread && handlers . has ( 'mouseover' ) && ! handlers . has ( 'focus' ) ) {
985991 w . a11y_mouse_events_have_key_events ( node , 'mouseover' , 'focus' ) ;
986992 }
987993
988- if ( handlers . has ( 'mouseout' ) && ! handlers . has ( 'blur' ) ) {
994+ if ( ! has_spread && handlers . has ( 'mouseout' ) && ! handlers . has ( 'blur' ) ) {
989995 w . a11y_mouse_events_have_key_events ( node , 'mouseout' , 'blur' ) ;
990996 }
991997
@@ -995,7 +1001,7 @@ export function check_element(node, context) {
9951001 if ( node . name === 'a' || node . name === 'button' ) {
9961002 const is_hidden = get_static_value ( attribute_map . get ( 'aria-hidden' ) ) === 'true' ;
9971003
998- if ( ! is_hidden && ! is_labelled && ! has_content ( node ) ) {
1004+ if ( ! has_spread && ! is_hidden && ! is_labelled && ! has_content ( node ) ) {
9991005 w . a11y_consider_explicit_label ( node ) ;
10001006 }
10011007 }
@@ -1054,7 +1060,7 @@ export function check_element(node, context) {
10541060 if ( node . name === 'img' ) {
10551061 const alt_attribute = get_static_text_value ( attribute_map . get ( 'alt' ) ) ;
10561062 const aria_hidden = get_static_value ( attribute_map . get ( 'aria-hidden' ) ) ;
1057- if ( alt_attribute && ! aria_hidden ) {
1063+ if ( alt_attribute && ! aria_hidden && ! has_spread ) {
10581064 if ( / \b ( i m a g e | p i c t u r e | p h o t o ) \b / i. test ( alt_attribute ) ) {
10591065 w . a11y_img_redundant_alt ( node ) ;
10601066 }
@@ -1087,15 +1093,15 @@ export function check_element(node, context) {
10871093 ) ;
10881094 return has ;
10891095 } ;
1090- if ( ! attribute_map . has ( 'for' ) && ! has_input_child ( node ) ) {
1096+ if ( ! has_spread && ! attribute_map . has ( 'for' ) && ! has_input_child ( node ) ) {
10911097 w . a11y_label_has_associated_control ( node ) ;
10921098 }
10931099 }
10941100
10951101 if ( node . name === 'video' ) {
10961102 const aria_hidden_attribute = attribute_map . get ( 'aria-hidden' ) ;
10971103 const aria_hidden_exist = aria_hidden_attribute && get_static_value ( aria_hidden_attribute ) ;
1098- if ( attribute_map . has ( 'muted' ) || aria_hidden_exist === 'true' ) {
1104+ if ( attribute_map . has ( 'muted' ) || aria_hidden_exist === 'true' || has_spread ) {
10991105 return ;
11001106 }
11011107 let has_caption = false ;
@@ -1141,6 +1147,7 @@ export function check_element(node, context) {
11411147
11421148 // Check content
11431149 if (
1150+ ! has_spread &&
11441151 ! is_labelled &&
11451152 ! has_contenteditable_binding &&
11461153 a11y_required_content . includes ( node . name ) &&
0 commit comments