Opened 7 years ago
Closed 6 years ago
#44536 closed enhancement (invalid)
Twenty Seventeen: article tag lacks role="article" parameter
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 4.9.7 |
Component: | Bundled Theme | Keywords: | has-patch close |
Focuses: | accessibility | Cc: |
Description
As recommended by WCAG and Web Accessibility Checklist https://a11yproject.com/checklist.html all articles in Twenty Seventeen theme need ARIA landmark <article role="article">.
Attachments (1)
Change History (8)
#3
@
6 years ago
- Focuses coding-standards removed
- Milestone changed from Awaiting Review to 4.9.9
Hi @webest welcome on WordPress Trac and thank you for the ticket!
As seen during accessibility team meeting, let's move some tickets to 4.9.9 milestone to see if it can land in the next minor.
Cheers,
Jb
#4
@
6 years ago
- Keywords close added
Thanks @webest and welcome to Trac.
As recommended by WCAG
Maybe I've missed something, but I'm not sure the WCAG 2.1 recommend in any way to add a role to an HTML element that already conveys the same semantics natively. Also, the a11yproject checklist you linked mentions that this should be done only if there's the need to support old browsers.
Twenty Seventeen is doing it for this exact reason, to support (very) old browser / screen reader combinations, but only for elements that have a native, default, role which is also a landmark (the main <header>, <nav>, <main>, <aside>, etc.), as these elements are really important to communicate the main section of a page and allow navigation through landmarks.
The <article>
element isn't a landmark and I'm not sure what the value added by role="article"
would be. Also, modern browsers already correctly expose the <article>
element native role and if I remember correctly it was discussed a few times to remove the redundant roles from all the WordPress bundled themes.
For reference, see the article element in HTML 5.2:
https://www.w3.org/TR/html52/sections.html#the-article-element
Allowed ARIA role attribute values:
article (default - do not set)
Added role in article tag