@@ -756,7 +756,8 @@ export function check_element(node, context) {
756
756
name === 'aria-activedescendant' &&
757
757
! is_dynamic_element &&
758
758
! is_interactive_element ( node . name , attribute_map ) &&
759
- ! attribute_map . has ( 'tabindex' )
759
+ ! attribute_map . has ( 'tabindex' ) &&
760
+ ! has_spread
760
761
) {
761
762
w . a11y_aria_activedescendant_has_tabindex ( attribute ) ;
762
763
}
@@ -810,9 +811,9 @@ export function check_element(node, context) {
810
811
const role = roles_map . get ( current_role ) ;
811
812
if ( role ) {
812
813
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 ) ) ;
816
817
if ( has_missing_props ) {
817
818
w . a11y_role_has_required_aria_props (
818
819
attribute ,
@@ -828,6 +829,7 @@ export function check_element(node, context) {
828
829
829
830
// interactive-supports-focus
830
831
if (
832
+ ! has_spread &&
831
833
! has_disabled_attribute ( attribute_map ) &&
832
834
! is_hidden_from_screen_reader ( node . name , attribute_map ) &&
833
835
! is_presentation_role ( current_role ) &&
@@ -845,6 +847,7 @@ export function check_element(node, context) {
845
847
846
848
// no-interactive-element-to-noninteractive-role
847
849
if (
850
+ ! has_spread &&
848
851
is_interactive_element ( node . name , attribute_map ) &&
849
852
( is_non_interactive_roles ( current_role ) || is_presentation_role ( current_role ) )
850
853
) {
@@ -853,6 +856,7 @@ export function check_element(node, context) {
853
856
854
857
// no-noninteractive-element-to-interactive-role
855
858
if (
859
+ ! has_spread &&
856
860
is_non_interactive_element ( node . name , attribute_map ) &&
857
861
is_interactive_roles ( current_role ) &&
858
862
! a11y_non_interactive_element_to_interactive_role_exceptions [ node . name ] ?. includes (
@@ -947,6 +951,7 @@ export function check_element(node, context) {
947
951
948
952
// no-noninteractive-element-interactions
949
953
if (
954
+ ! has_spread &&
950
955
! has_contenteditable_attr &&
951
956
! is_hidden_from_screen_reader ( node . name , attribute_map ) &&
952
957
! is_presentation_role ( role_static_value ) &&
@@ -964,6 +969,7 @@ export function check_element(node, context) {
964
969
965
970
// no-static-element-interactions
966
971
if (
972
+ ! has_spread &&
967
973
( ! role || role_static_value !== null ) &&
968
974
! is_hidden_from_screen_reader ( node . name , attribute_map ) &&
969
975
! is_presentation_role ( role_static_value ) &&
@@ -981,11 +987,11 @@ export function check_element(node, context) {
981
987
}
982
988
}
983
989
984
- if ( handlers . has ( 'mouseover' ) && ! handlers . has ( 'focus' ) ) {
990
+ if ( ! has_spread && handlers . has ( 'mouseover' ) && ! handlers . has ( 'focus' ) ) {
985
991
w . a11y_mouse_events_have_key_events ( node , 'mouseover' , 'focus' ) ;
986
992
}
987
993
988
- if ( handlers . has ( 'mouseout' ) && ! handlers . has ( 'blur' ) ) {
994
+ if ( ! has_spread && handlers . has ( 'mouseout' ) && ! handlers . has ( 'blur' ) ) {
989
995
w . a11y_mouse_events_have_key_events ( node , 'mouseout' , 'blur' ) ;
990
996
}
991
997
@@ -995,7 +1001,7 @@ export function check_element(node, context) {
995
1001
if ( node . name === 'a' || node . name === 'button' ) {
996
1002
const is_hidden = get_static_value ( attribute_map . get ( 'aria-hidden' ) ) === 'true' ;
997
1003
998
- if ( ! is_hidden && ! is_labelled && ! has_content ( node ) ) {
1004
+ if ( ! has_spread && ! is_hidden && ! is_labelled && ! has_content ( node ) ) {
999
1005
w . a11y_consider_explicit_label ( node ) ;
1000
1006
}
1001
1007
}
@@ -1054,7 +1060,7 @@ export function check_element(node, context) {
1054
1060
if ( node . name === 'img' ) {
1055
1061
const alt_attribute = get_static_text_value ( attribute_map . get ( 'alt' ) ) ;
1056
1062
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 ) {
1058
1064
if ( / \b ( i m a g e | p i c t u r e | p h o t o ) \b / i. test ( alt_attribute ) ) {
1059
1065
w . a11y_img_redundant_alt ( node ) ;
1060
1066
}
@@ -1087,15 +1093,15 @@ export function check_element(node, context) {
1087
1093
) ;
1088
1094
return has ;
1089
1095
} ;
1090
- if ( ! attribute_map . has ( 'for' ) && ! has_input_child ( node ) ) {
1096
+ if ( ! has_spread && ! attribute_map . has ( 'for' ) && ! has_input_child ( node ) ) {
1091
1097
w . a11y_label_has_associated_control ( node ) ;
1092
1098
}
1093
1099
}
1094
1100
1095
1101
if ( node . name === 'video' ) {
1096
1102
const aria_hidden_attribute = attribute_map . get ( 'aria-hidden' ) ;
1097
1103
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 ) {
1099
1105
return ;
1100
1106
}
1101
1107
let has_caption = false ;
@@ -1141,6 +1147,7 @@ export function check_element(node, context) {
1141
1147
1142
1148
// Check content
1143
1149
if (
1150
+ ! has_spread &&
1144
1151
! is_labelled &&
1145
1152
! has_contenteditable_binding &&
1146
1153
a11y_required_content . includes ( node . name ) &&
0 commit comments