The section element is displayed with a generic role in the accessibility tree below. When using the article element, the accessibility tree correctly assigns it the role of 'article'. But, for section, it assigns it the 'generic' role instead of 'section' Why is it not assigned the 'section' role?
section
is an abstract role. It's a "superclass" role, meaning it's a category of role rather than a role that should be directly used by web technologies or authors. (See the red disclaimer at the top of that linked page).
The technical summary of the <section>
element states that it has an implicit role of—
region
if the element has an accessible name, otherwisegeneric
Presumably you've not provided the element with an accessible name, which is why its role is defaulting to generic
.