Based on a discussion with an expert in web-a11y.slack.com, non-semantic elements like span and div are not required to have roles, and enforcing the application of a role on an element that doesn't need one may hurt accessibility.
The suggestion is to modify this rule / test so that it doesn't automatically flag any span or div without a role, at least when settings are at their default.
https://github.com/mvdschee/web-accessibility/blob/9a5be3ed43291a9cc0a9d2af281fb76f1e3d5b58/server/src/accessibilityPatterns.ts#L68
Based on a discussion with an expert in web-a11y.slack.com, non-semantic elements like
span
anddiv
are not required to haverole
s, and enforcing the application of arole
on an element that doesn't need one may hurt accessibility.The suggestion is to modify this rule / test so that it doesn't automatically flag any
span
ordiv
without arole
, at least when settings are at their default.Thank you.