Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#46714 closed defect (bug) (fixed)

Site Health Info: Bad value heading for attribute role on element dt

Reported by: mukesh27 Owned by: afercia
Priority: normal Milestone: 5.2
Component: Site Health Version: 5.2
Severity: normal Keywords: has-patch site-health
Cc: Focuses: accessibility

Description

In the WordPress Site Health Info page dt tag contains the attribute "role" with the value of "heading", Accordingly to HTML5 this is Error.

Code: <dt role="heading" aria-level="3">
Error: Bad value heading for attribute role on element dt.

According to ​w3c document dt tag use "listitem" role.

Attachments (3)

46714.diff​ (688 bytes ) - added by mukesh27 8 years ago.
Patch.
46714.2.diff​ (5.0 KB ) - added by afercia 8 years ago.
46714.3.diff​ (5.1 KB ) - added by afercia 8 years ago.

Download all attachments as: .zip

Change History (14)

@mukesh27
8 years ago

Patch.

#1 @mukesh27
8 years ago

  • Keywords site-health added

#2 @afercia
8 years ago

Related: #42002.

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


8 years ago

#4 @afercia
8 years ago

  • Keywords needs-refresh added
  • Milestone Awaiting Review → 5.2
  • Version → trunk

Moving to 5.2 as per today's accessibility bug-scrub as this is something that should be addressed before releasing. Agreed to remove the <dl> and use markup from the ARIA Authoring Practices example: ​https://www.w3.org/TR/wai-aria-practices-1.1/examples/accordion/accordion.html

@afercia
8 years ago

#5 @afercia
8 years ago

  • Keywords needs-refresh removed
  • Owner set to afercia
  • Status new → assigned

46714.2.diff​ builds on the previous patch and addresses also #46715.

  • removes the definition list and uses the markup from the ARIA Authoring Practices example
  • removes redundant ARIA roles

There's a problem though. The ARIA role="region" and aria-labelledby make the accordion panels be announced as ARIA landmarks. Thus, when the panels are open (not hidden), there are a lot of landmarks which is undesirable and confusing for assistive technologies users. Screenshots:

Firefox + NVDA:

http://cldup.com/NJ-XPBBtYQ.png

Safari + VoiceOver:

http://cldup.com/xq9nIcB5oQ.jpg

I'd like to discuss this issue with the accessibility team. Personally, I'd say these accordion panels shouldn't be perceived as landmarks.

Quoting from the ARIA Authoring Practices:
​https://www.w3.org/TR/wai-aria-practices-1.1/#accordion

Optionally, each element that serves as a container for panel content has role region and aria-labelledby with a value that refers to the button that controls display of the panel.

  • Avoid using the region role in circumstances that create landmark region proliferation, e.g., in an accordion that contains more than approximately 6 panels that can be expanded at the same time.
  • Role region is especially helpful to the perception of structure by screen reader users when panels contain heading elements or a nested accordion.

#6 @afercia
8 years ago

#46715 was marked as a duplicate.

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


8 years ago

#8 @joedolson
8 years ago

Agreed. These regions should not be landmark regions; that would result in an excessive profusion of landmarks, exactly as described in the ARIA authoring practices.

@afercia
8 years ago

#9 @afercia
8 years ago

46714.3.diff​ removes role="region" and aria-labelledby to avoid landmarks proliferation.

#10 @afercia
8 years ago

  • Resolution → fixed
  • Status assigned → closed

In 45087:

Accessibility: Improve the Site Health accordions.

  • removes the definition list and uses the markup from the ARIA Authoring Practices example
  • removes incorrect ARIA roles
  • avoids ARIA landmark regions proliferation

Props mukesh27 for the initial patch.
Fixes #46714.

#11 @spacedmonkey
7 years ago

  • Component Administration → Site Health
Note: See TracTickets for help on using tickets.