Make WordPress Core

Opened 6 weeks ago

Last modified 11 days ago

#65766 accepted defect (bug)

Search engine visibility missing aria-describedby

Reported by: joedolson Owned by: joedolson
Priority: normal Milestone: 7.2
Component: Administration Version:
Severity: normal Keywords: has-patch
Cc: Focuses: accessibility

Description

The search engine visibility setting has a description field that should be associated with the related checkbox using aria-describedby

Attachments (4)

65766.diff (954 bytes ) - added by sawf1y 6 weeks ago.
Diff for PR
65766_1.diff (954 bytes ) - added by sawf1y 5 weeks ago.
Changed attribute order to match wp-admin/install.php
65766_2.diff (2.0 KB ) - added by sawf1y 5 weeks ago.
01 se visibility.png (92.2 KB ) - added by afercia 11 days ago.

Download all attachments as: .zip

Change History (14)

#1 @joedolson
6 weeks ago

  • Owner set to joedolson
  • Status newaccepted

#2 @abcd95
6 weeks ago

In core, wp-admin/install.php already implements this for the exact same setting during the installation flow, using id="privacy-desc" and aria-describedby="privacy-desc". So I think all we need to do is -

  • Add id="blog-public-desc" to the description <p> tags (this covers both the default checkbox view and the blog_privacy_selector radio button view).
  • Add aria-describedby="blog-public-desc" to the <input type="checkbox"> and the <input type="radio"> elements.

Should do the job imo.

This ticket was mentioned in PR #12794 on WordPress/wordpress-develop by @sawf1y.


6 weeks ago
#3

  • Keywords has-patch added; needs-patch removed

Added attribute aria-describedby
Related to the Trac ticket 65766

@sawf1y
6 weeks ago

Diff for PR

@sawf1y
5 weeks ago

Changed attribute order to match wp-admin/install.php

#4 @sawf1y
5 weeks ago

@abcd95 asked in PR comment:
Could we also add aria-describedby="public-desc" to the radio buttons here and id="public-desc" to the <p class="description"> here as well? This will ensure the setting is fully accessible even when blog_privacy_selector is active, matching wp-admin/install.php

Me: File wp-admin/install.php contains aria-describedby attribute within input id="blog-norobots". Should I add aria-describedby to input.blog-public, input.blog-norobots or probably both?

@abcd95 commented on PR #12794:


5 weeks ago
#5

Thanks for updating the attribute ordering, @sawfly! That looks much cleaner now.

Just a reminder regarding the remaining part of the review: the radio button section inside if ( has_action( 'blog_privacy_selector' ) ) (lines 215–219) is still missing aria-describedby and an id on its description paragraph.

To make the accessibility fix complete across all view states, could you also update that branch? In wp-admin/install.php, core handles this exact radio button setup similarly, you can refer from there for consistency check.

@sawf1y commented on PR #12794:


5 weeks ago
#6

Thanks for updating the attribute ordering, @sawfly! That looks much cleaner now.

Just a reminder regarding the remaining part of the review: the radio button section inside if ( has_action( 'blog_privacy_selector' ) ) (lines 215–219) is still missing aria-describedby and an id on its description paragraph.

To make the accessibility fix complete across all view states, could you also update that branch? In wp-admin/install.php, core handles this exact radio button setup similarly, you can refer from there for consistency check.

Dear @himanshupathak95 . Thanks for your involving in this PR. I've done as you asked to match install.php. In this comment you had asked to add aria-describedby to both radio buttons? In wp-admin/install.php the first radio button does not have attribute aria-describedby. I asked you in reply. So, if the goal was to match public visibiliti option exactly with wp-admin/install.php, that it have done now

@sawf1y
5 weeks ago

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


5 weeks ago

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


3 weeks ago

#9 @joedolson
3 weeks ago

  • Milestone Awaiting Review7.2

#10 @afercia
11 days ago

Note that, as reported on the linked PR, when the action blog_privacy_selector is in use, this setting uses two radio buttons instead of a single checkbox. See attached screenshot.

In that case, I'm not sure using aria-describedby on the second radio button is correct. Rather, I'd consider using it directly on fhe <fieldset> element. @joedolson any thoughts about this pattern?

The same pattern is used on the install page and should be adjusted there as well.

Not to mention on the Reading Settings page there's another description that is not associated, the one for the two radio buttons related to 'For each post in a feed, include'.

Note: See TracTickets for help on using tickets.