[wp-trac] [WordPress Trac] #44536: Twenty Seventeen: article tag lacks role="article" parameter
WordPress Trac
noreply at wordpress.org
Sat Sep 22 14:08:47 UTC 2018
#44536: Twenty Seventeen: article tag lacks role="article" parameter
-----------------------------+----------------------------
Reporter: webest | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 4.9.9
Component: Bundled Theme | Version: 4.9.7
Severity: minor | Resolution:
Keywords: has-patch close | Focuses: accessibility
-----------------------------+----------------------------
Changes (by afercia):
* keywords: has-patch => has-patch close
Comment:
Thanks @webest and welcome to Trac.
> As recommended by WCAG
Maybe I've missed something, but I'm not sure the
[https://www.w3.org/TR/WCAG21/ 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**)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44536#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list