WordPress.org

Make WordPress Core

#44536 closed enhancement (invalid)

Twenty Seventeen: article tag lacks role="article" parameter

Reported by: webest Owned by:
Milestone: Priority: normal
Severity: minor Version: 4.9.7
Component: Bundled Theme Keywords: has-patch close
Focuses: accessibility Cc:
PR Number:

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)

44536.patch (53.2 KB) - added by Shital Patel 17 months ago.
Added role in article tag

Download all attachments as: .zip

Change History (8)

#1 @SergeyBiryukov
17 months ago

  • Component changed from Themes to Bundled Theme

@Shital Patel
17 months ago

Added role in article tag

#2 @Shital Patel
16 months ago

  • Focuses coding-standards added
  • Keywords has-patch added; needs-patch removed

#3 @audrasjb
14 months 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 @afercia
14 months 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)

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


14 months ago

#6 @afercia
14 months ago

Discussed during today's accessibility bug scrub and agreed this ticket is a candidate to be closed. Pending feedback from the Theme team.

#7 @pento
13 months ago

  • Milestone 4.9.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.