Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 days ago

#54962 closed defect (bug) (reported-upstream)

WordPress 5.9 Archive Block

Reported by: cpcusteve's profile cpcusteve Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.9
Component: Widgets Keywords: has-test-info
Focuses: accessibility Cc:

Description

After upgrade to 5.9, the “Archive” block has started adding a title, “Archives”. On examining the HTML code, there is a class missing from the 5.9 version, see below.

Before upgrade:
<aside id="block-13" class="widget widget_block widget_archive"><div class=" wp-block-archives-dropdown"><label class="screen-reader-text" for="wp-block-archives-61f2ddc72ff4f">Archives</label>

After upgrade:
<aside id="block-13" class="widget widget_block widget_archive"><div class=" wp-block-archives-dropdown wp-block-archives"><label for="wp-block-archives-61f2dcbd374b6">Archives</label>

Note the missing “screen-reader-text” class declaration in “label”. Adding it back causes the title to disappear. In the meantime, have added the following to Additional CSS in the customizer to give the same result.

/* Lose the title associated with the "archive" block */
.wp-block-archives label {

display:none;

}

Change History (7)

This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.


3 years ago

#2 @Boniu91
3 years ago

  • Component changed from General to Widgets
  • Focuses accessibility added
  • Keywords has-testing-info added
  • Version set to 5.9

Hello @cpcusteve thanks for creating the issue. I was able to reproduce the issue.

Test Report

Env

  • WordPress 5.8.3 and 5.9
  • Windows 10
  • Theme: Twenty Twenty One

Steps to test

  1. On WordPress 5.8.3 go to the widgets section and add Archives block
  2. Visit the page that contains the widget and check the source. The following class is present in the label element:
    class="screen-reader-text"
    
  1. Update the WordPress to 5.9
  2. Visit the page that contains the widget and check the source. The following class is not present in the label element:
    class="screen-reader-text"
    

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


3 years ago

#4 @joedolson
3 years ago

This was an intentional change in https://github.com/WordPress/gutenberg/pull/30527

There was some discussion in that PR about adding an option to set the visibility of the label in the block, but I don't know whether there was any follow-up on it.

From an accessibility standpoint, the visible label is a significantly better default output; but a toggle to control visibility would be valuable.

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


3 years ago

#6 @sabernhardt
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

The enhancement issue is opened on GitHub:
https://github.com/WordPress/gutenberg/issues/41208

#7 @wordpressdotorg
2 days ago

  • Keywords has-test-info added; has-testing-info removed
Note: See TracTickets for help on using tickets.