By default, the HTML's <header> element has an identical meaning to the banner landmark, unless it is a descendant of <aside>, <article>, <main>, <nav>, or <section>, at which point <header> exposes a generic role, and not the equivalent of the site-wide banner.
Since this <header> element is a child of an <article> element, it has the generic role.
Description
The following line is a bug and should be commented out/removed:
https://github.com/tomusborne/generatepress/blob/a4b04b12e1ad6c88c6109f23f196d61895f3d74b/inc/class-html-attributes.php#L290
This attribute gets applied to a
<header>
element. From https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/banner_role:Since this
<header>
element is a child of an<article>
element, it has the generic role.The generic role cannot have an
aria-label
attribute. From https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/generic_role:Steps to reproduce
Actual behavior
<header>
element contained within an<article>
element has anaria-label
attribute.Expected behavior
<header>
element contained within an<article>
element does not have anaria-label
attribute.References